Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>Test for bug 544642</title> |
michael@0 | 5 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 7 | </head> |
michael@0 | 8 | <body> |
michael@0 | 9 | <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=544642" |
michael@0 | 10 | target="_blank" >Mozilla Bug 544642</a> |
michael@0 | 11 | <p id="display"></p> |
michael@0 | 12 | <iframe id=iframe></iframe> |
michael@0 | 13 | <pre id="test"> |
michael@0 | 14 | <script class="testbody" type="application/javascript;version=1.8"> |
michael@0 | 15 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 16 | var gen = runTest(); |
michael@0 | 17 | |
michael@0 | 18 | addLoadEvent(function() { gen.next(); }); |
michael@0 | 19 | |
michael@0 | 20 | function runTest() { |
michael@0 | 21 | var iframe = $('iframe'); |
michael@0 | 22 | iframe.onerror = function() { gen.send("error"); }; |
michael@0 | 23 | iframe.onload = function() { gen.send("load"); }; |
michael@0 | 24 | |
michael@0 | 25 | iframe.src = "data:text/plain,hello"; |
michael@0 | 26 | is((yield), "load", "plaintext data"); |
michael@0 | 27 | |
michael@0 | 28 | iframe.src = "file://foo/bar"; |
michael@0 | 29 | is((yield), "error", "file"); |
michael@0 | 30 | |
michael@0 | 31 | // We should do this test too, however it brings up a modal dialog which |
michael@0 | 32 | // we can't dismiss. |
michael@0 | 33 | //iframe.src = "http:////"; |
michael@0 | 34 | //is((yield), "error", "invalid http"); |
michael@0 | 35 | |
michael@0 | 36 | SimpleTest.finish(); |
michael@0 | 37 | |
michael@0 | 38 | yield undefined; |
michael@0 | 39 | } |
michael@0 | 40 | |
michael@0 | 41 | </script> |
michael@0 | 42 | </pre> |
michael@0 | 43 | </body> |
michael@0 | 44 | </html> |