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();
21 let gInspectee = null;
24 addTest(async function setup() {
25 const url = document.getElementById(
"inspectorContent").href;
26 const { target, doc } = await attachURL(url);
28 const inspector = await target.getFront(
"inspector");
29 gWalker = inspector.walker;
33 addTest(function testChangeValue() {
34 const contentNode = gInspectee.querySelector(
"#a").firstChild;
36 promiseDone(gWalker.querySelector(gWalker.rootNode,
"#a").then(front =
> {
38 return gWalker.children(front, { maxNodes:
1 });
40 nodeFront = children.nodes[
0];
41 is(nodeFront.nodeType, Node.TEXT_NODE);
42 return nodeFront.setNodeValue(
"newvalue");
44 // We're only going to test that the change hit the document.
45 // There are other tests that make sure changes are propagated
47 is(contentNode.nodeValue,
"newvalue",
"Node should have a new value.");
48 }).then(runNextTest));
51 addTest(function cleanup() {
59 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug
</a>
60 <a id=
"inspectorContent" target=
"_blank" href=
"inspector-traversal-data.html">Test Document
</a>
62 <div id=
"content" style=
"display: none">