Bug 1329299 verify frameId in webrequest tests, r=kmag
☠☠ backed out by 639010128e5e ☠ ☠
authorShane Caraveo <scaraveo@mozilla.com>
Tue, 10 Jan 2017 14:29:04 -0800
changeset 328756 b446f3bf75e403e1baa30b2b0524be265d76ba8a
parent 328755 0897517041e2395686e68d1c924af488297636b8
child 328757 6555c8f6415595eff03a7ac9512475f395d1c0cc
push id35889
push usermixedpuppy@gmail.com
push dateTue, 10 Jan 2017 22:44:31 +0000
treeherderautoland@b446f3bf75e4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1329299
milestone53.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 1329299 verify frameId in webrequest tests, r=kmag MozReview-Commit-ID: LuQcGsogs7J
toolkit/components/extensions/test/mochitest/head_webrequest.js
--- a/toolkit/components/extensions/test/mochitest/head_webrequest.js
+++ b/toolkit/components/extensions/test/mochitest/head_webrequest.js
@@ -183,16 +183,19 @@ function background(events) {
           browser.test.assertEq(expected.test.requestId, details.requestId, "redirects will keep the same requestId");
         } else {
           // Save any values we want to validate in later events.
           expected.test.requestId = details.requestId;
           expected.test.tabId = details.tabId;
         }
         // Tests we don't need to do every event.
         browser.test.assertTrue(details.type.toUpperCase() in browser.webRequest.ResourceType, `valid resource type ${details.type}`);
+        if (details.type == "main_frame") {
+          browser.test.assertEq(0, details.frameId, "frameId is zero when type is main_frame bug 1329299");
+        }
       } else {
         // On events after onBeforeRequest, check the previous values.
         browser.test.assertEq(expected.test.requestId, details.requestId, "correct requestId");
         browser.test.assertEq(expected.test.tabId, details.tabId, "correct tabId");
       }
       if (name == "onBeforeSendHeaders") {
         if (expected.headers && expected.headers.request) {
           result.requestHeaders = processHeaders("request", expected, details);