Bug 897960 - walker should support mozbrowser iframes. Patch E. r=dcamp
authorPaul Rouget <paul@mozilla.com>
Mon, 09 Sep 2013 00:24:00 +0200
changeset 146206 f667bfe86c211736d286a75d98774277bec16b1b
parent 146205 03649632d78286a5a94f91164ade037bbc640f72
child 146207 3d50a4b732af31f5d607be382b26c70bb5092913
push id25245
push userryanvm@gmail.com
push dateMon, 09 Sep 2013 20:57:55 +0000
treeherdermozilla-central@a468b2e34b04 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdcamp
bugs897960
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 897960 - walker should support mozbrowser iframes. Patch E. r=dcamp
toolkit/devtools/server/tests/mochitest/inspector-helpers.js
toolkit/devtools/server/tests/mochitest/test_inspector-insert.html
--- a/toolkit/devtools/server/tests/mochitest/inspector-helpers.js
+++ b/toolkit/devtools/server/tests/mochitest/inspector-helpers.js
@@ -96,17 +96,17 @@ function sortOwnershipChildren(children)
 
 function serverOwnershipSubtree(walker, node) {
   let actor = walker._refMap.get(node);
   if (!actor) {
     return undefined;
   }
 
   let children = [];
-  let docwalker = _documentWalker(node);
+  let docwalker = _documentWalker(node, window);
   let child = docwalker.firstChild();
   while (child) {
     let item = serverOwnershipSubtree(walker, child);
     if (item) {
       children.push(item);
     }
     child = docwalker.nextSibling();
   }
--- a/toolkit/devtools/server/tests/mochitest/test_inspector-insert.html
+++ b/toolkit/devtools/server/tests/mochitest/test_inspector-insert.html
@@ -60,17 +60,17 @@ addTest(function testRearrange() {
     ok(!gInspectee.querySelector("#a").nextSibling, "a should now be at the end of the list.");
     return gWalker.children(longlist);
   }).then(response => {
     is(nodeA, response.nodes[response.nodes.length - 1], "a should now be the last returned child.");
     // Now move it to the middle of the list.
     nextNode = response.nodes[13];
     return gWalker.insertBefore(nodeA, longlist, nextNode);
   }).then(response => {
-    let sibling = inspector._documentWalker(gInspectee.querySelector("#a")).nextSibling();
+    let sibling = inspector._documentWalker(gInspectee.querySelector("#a"), window).nextSibling();
     is(sibling, nextNode.rawNode(), "Node should match the expected next node.");
     return gWalker.children(longlist);
   }).then(response => {
     is(nodeA, response.nodes[13], "a should be where we expect it.");
     is(nextNode, response.nodes[14], "next node should be where we expect it.");
   }).then(runNextTest));
 });