accessible/tests/mochitest/treeupdate/test_bug895082.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <title>Replace body test</title>
michael@0 5 <link rel="stylesheet" type="text/css"
michael@0 6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 7
michael@0 8 <script type="application/javascript"
michael@0 9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 10
michael@0 11 <script type="application/javascript"
michael@0 12 src="../common.js"></script>
michael@0 13 <script type="application/javascript"
michael@0 14 src="../role.js"></script>
michael@0 15 <script type="application/javascript"
michael@0 16 src="../events.js"></script>
michael@0 17
michael@0 18 <script type="application/javascript">
michael@0 19 function doTest()
michael@0 20 {
michael@0 21 var y = document.getElementById("y");
michael@0 22 var oldBody = document.body;
michael@0 23 var newBody = document.createElement("body")
michael@0 24 document.documentElement.insertBefore(newBody, oldBody);
michael@0 25 setTimeout(function() {
michael@0 26 document.documentElement.removeChild(oldBody);
michael@0 27 newBody.appendChild(y);
michael@0 28 ok(true, "we didn't assert");
michael@0 29 SimpleTest.finish();
michael@0 30 }, 0);
michael@0 31 }
michael@0 32
michael@0 33 SimpleTest.waitForExplicitFinish();
michael@0 34 addA11yLoadEvent(doTest);
michael@0 35 </script>
michael@0 36 </head>
michael@0 37 <body>
michael@0 38
michael@0 39 <a target="_blank"
michael@0 40 href="https://bugzilla.mozilla.org/show_bug.cgi?id=895082"
michael@0 41 title="Bug 895082 - replacing body element asserts">
michael@0 42 Bug 895082</a>
michael@0 43 <p id="display"></p>
michael@0 44 <div id="content" style="display: none"></div>
michael@0 45 <pre id="test">
michael@0 46 </pre>
michael@0 47
michael@0 48 <div><div id="y"></div></div>
michael@0 49
michael@0 50 </body>
michael@0 51 </html>

mercurial