content/base/test/test_bug544642.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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>

mercurial