4 https://bugzilla.mozilla.org/show_bug.cgi?id=
8 <title>Test for Bug
</title>
10 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
11 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css">
12 <script type=
"application/javascript" src=
"inspector-helpers.js"></script>
13 <script type=
"application/javascript">
16 window.onload = function() {
17 SimpleTest.waitForExplicitFinish();
22 let gInspectee = null;
24 addTest(async function setup() {
25 const url = document.getElementById(
"inspectorContent").href;
26 const { target, doc } = await attachURL(url);
27 const inspector = await target.getFront(
"inspector");
29 gWalker = inspector.walker;
33 addTest(function testRearrange() {
35 const listNode = gInspectee.querySelector(
"#longlist");
37 promiseDone(gWalker.querySelector(gWalker.rootNode,
"#longlist").then(front =
> {
40 const computed = gInspectee.defaultView.getComputedStyle(listNode);
41 is(computed.visibility,
"visible",
"Node should be visible to start with");
42 return gWalker.hideNode(listFront);
44 const computed = gInspectee.defaultView.getComputedStyle(listNode);
45 is(computed.visibility,
"hidden",
"Node should be hidden");
46 return gWalker.unhideNode(listFront);
48 const computed = gInspectee.defaultView.getComputedStyle(listNode);
49 is(computed.visibility,
"visible",
"Node should be visible again.");
50 }).then(runNextTest));
53 addTest(function cleanup() {
62 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug
</a>
63 <a id=
"inspectorContent" target=
"_blank" href=
"inspector-traversal-data.html">Test Document
</a>
65 <div id=
"content" style=
"display: none">