Bug 1249144 - [webext] Test explicitly the frameId/parentFrameId associated to the toplevel frame. r=billm
authorLuca Greco <lgreco@mozilla.com>
Thu, 18 Feb 2016 01:56:09 +0100
changeset 322752 f09b8b1fa4300db896d2c1276dd6a567d45a540a
parent 322751 a1c1b09432940839e162d7132bc69fb901754431
child 322753 e11ee5db95dd3ddb854f2670668f5b7db13a31c3
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1249144
milestone47.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 1249144 - [webext] Test explicitly the frameId/parentFrameId associated to the toplevel frame. r=billm MozReview-Commit-ID: 9E7LmdyHcnG
browser/components/extensions/test/browser/browser_ext_webNavigation_getFrames.js
--- a/browser/components/extensions/test/browser/browser_ext_webNavigation_getFrames.js
+++ b/browser/components/extensions/test/browser/browser_ext_webNavigation_getFrames.js
@@ -133,16 +133,19 @@ add_task(function* testWebNavigationFram
     getAllFramesDetails,
     getFrameResults,
   } = yield extension.awaitMessage("webNavigationFrames.done");
 
   is(getAllFramesDetails.length, 3, "expected number of frames found");
   is(getAllFramesDetails.length, collectedDetails.length,
      "number of frames found should equal the number onCompleted events collected");
 
+  is(getAllFramesDetails[0].frameId, 0, "the root frame has the expected frameId");
+  is(getAllFramesDetails[0].parentFrameId, -1, "the root frame has the expected parentFrameId");
+
   // ordered by frameId
   let sortByFrameId = (el1, el2) => {
     let val1 = el1 ? el1.frameId : -1;
     let val2 = el2 ? el2.frameId : -1;
     return val1 - val2;
   };
 
   collectedDetails = collectedDetails.sort(sortByFrameId);