content/base/test/test_bug28293.xhtml

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 <html xmlns="http://www.w3.org/1999/xhtml">
michael@0 2 <!--
michael@0 3 https://bugzilla.mozilla.org/show_bug.cgi?id=28293
michael@0 4 -->
michael@0 5 <head>
michael@0 6 <title>Test for Bug 28293</title>
michael@0 7 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
michael@0 9 <script>
michael@0 10 scriptInsertedExternalExecuted = false;
michael@0 11 res = 'A';
michael@0 12
michael@0 13 SimpleTest.waitForExplicitFinish();
michael@0 14 onload = function () {
michael@0 15
michael@0 16 res+='2';
michael@0 17
michael@0 18 s = document.createElement('script');
michael@0 19 s.textContent="res+='g';";
michael@0 20 s.defer = true;
michael@0 21 document.body.appendChild(s);
michael@0 22
michael@0 23 res+='3';
michael@0 24
michael@0 25 s = document.createElement('script');
michael@0 26 s.textContent="res+='i';done()";
michael@0 27 s.defer = true;
michael@0 28 document.body.appendChild(s);
michael@0 29
michael@0 30 res+='4';
michael@0 31 }
michael@0 32
michael@0 33 function done() {
michael@0 34 is(res, "AacBCDEFGeHIJb1M2g3i", "scripts executed in the wrong order");
michael@0 35 ok(scriptInsertedExternalExecuted, "Dynamic script did not block load");
michael@0 36 SimpleTest.finish();
michael@0 37 }
michael@0 38 </script>
michael@0 39 </head>
michael@0 40 <body>
michael@0 41 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=28293">Mozilla Bug 28293</a>
michael@0 42
michael@0 43 <script defer="defer">
michael@0 44 res += 'a';
michael@0 45 </script>
michael@0 46 <script defer="defer" src="data:text/plain,res+='b'"></script>
michael@0 47 <script defer="defer">
michael@0 48 res += 'c';
michael@0 49 </script>
michael@0 50 <script>
michael@0 51 res += 'B';
michael@0 52 </script>
michael@0 53 <script>
michael@0 54 res += 'C';
michael@0 55
michael@0 56 s = document.createElement('script');
michael@0 57 s.textContent="res+='D';";
michael@0 58 document.body.appendChild(s);
michael@0 59
michael@0 60 res += 'E';
michael@0 61 </script>
michael@0 62 <script>
michael@0 63 res += 'F';
michael@0 64 document.addEventListener("DOMContentLoaded", function() {
michael@0 65 res += '1'
michael@0 66 s = document.createElement('script');
michael@0 67 s.src="file_bug28293.sjs?res+='M';";
michael@0 68 document.body.appendChild(s);
michael@0 69 }, false);
michael@0 70 res += 'G';
michael@0 71 </script>
michael@0 72 <script defer="defer">
michael@0 73 res += 'e';
michael@0 74 </script>
michael@0 75 <script src="file_bug28293.sjs?res+='H';"></script>
michael@0 76 <script>
michael@0 77 <![CDATA[
michael@0 78 res += 'I';
michael@0 79 s = document.createElement('script');
michael@0 80 s.src="file_bug28293.sjs?scriptInsertedExternalExecuted=true;";
michael@0 81 document.body.appendChild(s);
michael@0 82 res += 'J';
michael@0 83 ]]>
michael@0 84 </script>
michael@0 85
michael@0 86 </body>
michael@0 87 </html>

mercurial