Bug 1264577 - Add a test case of caches for first-party isolation(adapted from Tor Browser patch 13749). r=mayhemer, r=arthuredelstein
authorTim Huang <tihuang@mozilla.com>
Tue, 01 Nov 2016 15:54:02 +0800
changeset 321332 4128e57e39bda4d6fe223e911906c81851d76e70
parent 321331 82d1209499f2c551d13362f1cf52d291443548bd
child 321333 908557c762f798605a2f96e4c943791cbada1b50
child 321358 81c8a80250c825a973c3e727900202690db8e01c
push id30923
push userphilringnalda@gmail.com
push dateMon, 07 Nov 2016 02:21:38 +0000
treeherdermozilla-central@908557c762f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer, arthuredelstein
bugs1264577, 13749
milestone52.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 1264577 - Add a test case of caches for first-party isolation(adapted from Tor Browser patch 13749). r=mayhemer, r=arthuredelstein
browser/components/originattributes/test/browser/browser.ini
browser/components/originattributes/test/browser/browser_cache.js
browser/components/originattributes/test/browser/file_cache.html
browser/components/originattributes/test/browser/file_thirdPartyChild.audio.ogg
browser/components/originattributes/test/browser/file_thirdPartyChild.embed.png
browser/components/originattributes/test/browser/file_thirdPartyChild.fetch.html
browser/components/originattributes/test/browser/file_thirdPartyChild.iframe.html
browser/components/originattributes/test/browser/file_thirdPartyChild.img.png
browser/components/originattributes/test/browser/file_thirdPartyChild.import.js
browser/components/originattributes/test/browser/file_thirdPartyChild.link.css
browser/components/originattributes/test/browser/file_thirdPartyChild.object.png
browser/components/originattributes/test/browser/file_thirdPartyChild.request.html
browser/components/originattributes/test/browser/file_thirdPartyChild.script.js
browser/components/originattributes/test/browser/file_thirdPartyChild.sharedworker.js
browser/components/originattributes/test/browser/file_thirdPartyChild.track.vtt
browser/components/originattributes/test/browser/file_thirdPartyChild.video.ogv
browser/components/originattributes/test/browser/file_thirdPartyChild.worker.fetch.html
browser/components/originattributes/test/browser/file_thirdPartyChild.worker.js
browser/components/originattributes/test/browser/file_thirdPartyChild.worker.request.html
browser/components/originattributes/test/browser/file_thirdPartyChild.worker.xhr.html
browser/components/originattributes/test/browser/file_thirdPartyChild.xhr.html
browser/components/originattributes/test/browser/head.js
--- a/browser/components/originattributes/test/browser/browser.ini
+++ b/browser/components/originattributes/test/browser/browser.ini
@@ -1,23 +1,42 @@
 [DEFAULT]
 tags = usercontextid firstpartyisolation originattributes
 support-files =
   dummy.html
   file_broadcastChannel.html
   file_broadcastChanneliFrame.html
+  file_cache.html
   file_favicon.html
   file_favicon.png
   file_favicon.png^headers^
   file_favicon_cache.html
   file_favicon_cache.png
   file_favicon_thirdParty.html
   file_firstPartyBasic.html
   file_sharedworker.html
   file_sharedworker.js
+  file_thirdPartyChild.audio.ogg
+  file_thirdPartyChild.embed.png
+  file_thirdPartyChild.fetch.html
+  file_thirdPartyChild.iframe.html
+  file_thirdPartyChild.img.png
+  file_thirdPartyChild.import.js
+  file_thirdPartyChild.link.css
+  file_thirdPartyChild.object.png
+  file_thirdPartyChild.request.html
+  file_thirdPartyChild.script.js
+  file_thirdPartyChild.sharedworker.js
+  file_thirdPartyChild.track.vtt
+  file_thirdPartyChild.video.ogv
+  file_thirdPartyChild.worker.fetch.html
+  file_thirdPartyChild.worker.js
+  file_thirdPartyChild.worker.request.html
+  file_thirdPartyChild.worker.xhr.html
+  file_thirdPartyChild.xhr.html
   head.js
   test.js
   test.js^headers^
   test.html
   test2.html
   test2.js
   test2.js^headers^
   test_firstParty.html
@@ -27,16 +46,17 @@ support-files =
   test_firstParty_http_redirect.html^headers^
   test_firstParty_iframe_http_redirect.html
   test_firstParty_postMessage.html
   window.html
   worker_blobify.js
   worker_deblobify.js
 
 [browser_broadcastChannel.js]
+[browser_cache.js]
 [browser_cookieIsolation.js]
 [browser_favicon_firstParty.js]
 [browser_favicon_userContextId.js]
 [browser_firstPartyIsolation.js]
 [browser_localStorageIsolation.js]
 [browser_blobURLIsolation.js]
 [browser_imageCacheIsolation.js]
 [browser_sharedworker.js]
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/browser_cache.js
@@ -0,0 +1,247 @@
+/*
+ * Bug 1264577 - A test case for testing caches of various submodules.
+ *   This test case will load two pages that each page loads various resources
+ *   within the same third party domain for the same originAttributes or different
+ *   originAttributes. And then, it verifies the number of cache entries and
+ *   the originAttributes of loading channels. If these two pages belong to
+ *   the same originAttributes, the number of cache entries for a certain
+ *   resource would be one. Otherwise, it would be two.
+ */
+
+const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
+
+let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
+let protocolProxyService = Cc["@mozilla.org/network/protocol-proxy-service;1"]
+                             .getService(Ci.nsIProtocolProxyService);
+
+const TEST_DOMAIN = "http://example.net";
+const TEST_PATH = "/browser/browser/components/originattributes/test/browser/";
+const TEST_PAGE = TEST_DOMAIN + TEST_PATH + "file_cache.html";
+
+let suffixes = ["iframe.html", "link.css", "script.js", "img.png", "object.png",
+                "embed.png", "xhr.html", "worker.xhr.html", "audio.ogg",
+                "video.ogv", "track.vtt",
+                "fetch.html", "worker.fetch.html",
+                "request.html", "worker.request.html",
+                "import.js", "worker.js", "sharedworker.js"];
+
+// A random value for isolating video/audio elements across different tests.
+let randomSuffix;
+
+function clearAllImageCaches() {
+  let tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"]
+                             .getService(SpecialPowers.Ci.imgITools);
+  let imageCache = tools.getImgCacheForDocument(window.document);
+  imageCache.clearCache(true);  // true=chrome
+  imageCache.clearCache(false); // false=content
+}
+
+function cacheDataForContext(loadContextInfo) {
+  return new Promise(resolve => {
+    let cacheEntries = [];
+    let cacheVisitor = {
+      onCacheStorageInfo(num, consumption) {},
+      onCacheEntryInfo(uri, idEnhance) {
+        cacheEntries.push({ uri: uri,
+                            idEnhance: idEnhance });
+      },
+      onCacheEntryVisitCompleted() {
+        resolve(cacheEntries);
+      },
+      QueryInterface(iid) {
+        if (iid.equals(Ci.nsICacheStorageVisitor))
+          return this;
+
+        throw Components.results.NS_ERROR_NO_INTERFACE;
+      }
+    };
+    // Visiting the disk cache also visits memory storage so we do not
+    // need to use Services.cache2.memoryCacheStorage() here.
+    let storage = Services.cache2.diskCacheStorage(loadContextInfo, false);
+    storage.asyncVisitStorage(cacheVisitor, true);
+  });
+}
+
+let countMatchingCacheEntries = function (cacheEntries, domain, fileSuffix) {
+  return cacheEntries.map(entry => entry.uri.asciiSpec)
+                     .filter(spec => spec.includes(domain))
+                     .filter(spec => spec.includes("file_thirdPartyChild." + fileSuffix))
+                     .length;
+};
+
+function observeChannels(onChannel) {
+  // We use a dummy proxy filter to catch all channels, even those that do not
+  // generate an "http-on-modify-request" notification, such as link preconnects.
+  let proxyFilter = {
+    applyFilter : function (aProxyService, aChannel, aProxy) {
+      // We have the channel; provide it to the callback.
+      onChannel(aChannel);
+      // Pass on aProxy unmodified.
+      return aProxy;
+    }
+  };
+  protocolProxyService.registerChannelFilter(proxyFilter, 0);
+  // Return the stop() function:
+  return () => protocolProxyService.unregisterChannelFilter(proxyFilter);
+}
+
+function startObservingChannels(aMode) {
+  let stopObservingChannels = observeChannels(function (channel) {
+    let originalURISpec = channel.originalURI.spec;
+    if (originalURISpec.includes("example.net")) {
+      let loadInfo = channel.loadInfo;
+
+      switch (aMode) {
+        case TEST_MODE_FIRSTPARTY:
+          ok(loadInfo.originAttributes.firstPartyDomain === "example.com" ||
+             loadInfo.originAttributes.firstPartyDomain === "example.org",
+             "first party for " + originalURISpec + " is " + loadInfo.originAttributes.firstPartyDomain);
+          break;
+
+        case TEST_MODE_NO_ISOLATION:
+          ok(ChromeUtils.isOriginAttributesEqual(loadInfo.originAttributes, ChromeUtils.fillNonDefaultOriginAttributes()),
+             "OriginAttributes for " + originalURISpec + " is default.");
+          break;
+
+        case TEST_MODE_CONTAINERS:
+          ok(loadInfo.originAttributes.userContextId === 1 ||
+             loadInfo.originAttributes.userContextId === 2,
+             "userContextId for " + originalURISpec + " is " + loadInfo.originAttributes.userContextId);
+          break;
+
+        default:
+          ok(false, "Unknown test mode.");
+      }
+    }
+  });
+  return stopObservingChannels;
+}
+
+let stopObservingChannels;
+
+// The init function, which clears image and network caches, and generates
+// the random value for isolating video and audio elements across different
+// test runs.
+function* doInit(aMode) {
+  yield SpecialPowers.pushPrefEnv({"set": [["network.predictor.enabled",         false],
+                                           ["network.predictor.enable-prefetch", false]]});
+  clearAllImageCaches();
+
+  let networkCache = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
+                        .getService(Ci.nsICacheStorageService);
+  networkCache.clear();
+
+  randomSuffix = Math.random();
+  stopObservingChannels = startObservingChannels(aMode);
+}
+
+// In the test function, we dynamically generate the video and audio element,
+// and assign a random suffix to their URL to isolate them across different
+// test runs.
+function* doTest(aBrowser) {
+
+  let argObj = {
+    randomSuffix: randomSuffix,
+    urlPrefix: TEST_DOMAIN + TEST_PATH,
+  };
+
+  yield ContentTask.spawn(aBrowser, argObj, function* (arg) {
+    let videoURL = arg.urlPrefix + "file_thirdPartyChild.video.ogv";
+    let audioURL = arg.urlPrefix + "file_thirdPartyChild.audio.ogg";
+    let trackURL = arg.urlPrefix + "file_thirdPartyChild.track.vtt";
+    let URLSuffix = "?r=" + arg.randomSuffix;
+
+    // Create the audio and video elements.
+    let audio = content.document.createElement('audio');
+    let video = content.document.createElement('video');
+    let audioSource = content.document.createElement('source');
+    let audioTrack = content.document.createElement('track');
+
+    // Assign attributes for the audio element.
+    audioSource.setAttribute("src", audioURL + URLSuffix);
+    audioSource.setAttribute("type", "audio/ogg");
+    audioTrack.setAttribute("src", trackURL);
+    audioTrack.setAttribute("kind", "subtitles");
+
+    // Append the audio and track element into the body, and wait until they're finished.
+    yield new Promise(resolve => {
+      let audioLoaded = false;
+      let trackLoaded = false;
+
+      let audioListener = () => {
+        audio.removeEventListener("canplaythrough", audioListener);
+
+        audioLoaded = true;
+        if (audioLoaded && trackLoaded) {
+          resolve();
+        }
+      };
+
+      let trackListener = () => {
+        audioTrack.removeEventListener("load", trackListener);
+
+        trackLoaded = true;
+        if (audioLoaded && trackLoaded) {
+          resolve();
+        }
+      };
+
+      audio.appendChild(audioSource);
+      audio.appendChild(audioTrack);
+      audio.autoplay = true;
+
+      audioTrack.addEventListener("load", trackListener, false);
+      audio.addEventListener("canplaythrough", audioListener, false);
+      content.document.body.appendChild(audio);
+    });
+
+    // Append the video element into the body, and wait until it's finished.
+    yield new Promise(resolve => {
+      let listener = () => {
+        video.removeEventListener("canplaythrough", listener);
+        resolve();
+      };
+
+      // Assign attributes for the video element.
+      video.setAttribute("src", videoURL + URLSuffix);
+      video.setAttribute("type", "video/ogg");
+
+      video.addEventListener("canplaythrough", listener, false);
+      content.document.body.appendChild(video);
+    });
+  });
+
+  return 0;
+}
+
+// The check function, which checks the number of cache entries.
+function* doCheck(aShouldIsolate, aInputA, aInputB) {
+  let expectedEntryCount = 1;
+  let data = [];
+  data = data.concat(yield cacheDataForContext(LoadContextInfo.default));
+  data = data.concat(yield cacheDataForContext(LoadContextInfo.private));
+  data = data.concat(yield cacheDataForContext(LoadContextInfo.custom(true, {})));
+
+  if (aShouldIsolate) {
+    expectedEntryCount = 2;
+  }
+
+  for (let suffix of suffixes) {
+    let foundEntryCount = countMatchingCacheEntries(data, "example.net", suffix);
+    let result = (expectedEntryCount === foundEntryCount);
+    ok(result, "Cache entries expected for " + suffix + ": " + expectedEntryCount +
+               ", and found " + foundEntryCount);
+  }
+
+  stopObservingChannels();
+  stopObservingChannels = undefined;
+  return true;
+}
+
+let testArgs = {
+  url: TEST_PAGE,
+  firstFrameSetting: DEFAULT_FRAME_SETTING,
+  secondFrameSetting: [TEST_TYPE_FRAME],
+};
+
+IsolationTestTools.runTests(testArgs, doTest, doCheck, doInit);
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_cache.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+<head>
+  <link rel="stylesheet" type="text/css"
+        href="http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.link.css">
+  <link rel="preconnect" href="http://example.net">
+</head>
+<body>
+<div>file_cache.html</div>
+
+<iframe src="http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.iframe.html">
+</iframe>
+
+<script src="http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.script.js">
+</script>
+
+<img src="http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.img.png">
+
+<embed src="http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.embed.png">
+
+<object data="http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.object.png"
+        type="image/png"></object>
+</body>
+</html>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..edda4e9128435b0cc9ba500c9daca90e2be30acf
GIT binary patch
literal 2603
zc$~!+e^3+I`2|oBQW`O3!X30kFK0GCFpFoeFmoLYCz=f+ZX!x@j+%fRKSEEDo4NM5
zVI;W$<QxWfGlFO@n2ly3tK>`^*B&Yow28x5C&W9Vy|z~HvWm7dz1ng!?c3<}dNcj6
zf83jS?|tw4{q275d*9ajdILxSFNQ#LJ)7Sr*Ie@oek^$R7Y8g2tw}=ZPo8spvkwTi
z@{-`cB?WN*Wz*{qGt~cjG5S)UtH_6xoel52UAXl?eL-`Br8<c%&=nMEG_PxZT2z!&
zvE(`P54C00P?Z1(aj{gEYrw4OB#t9X@~u_oP5IVnak;csWa!f6Qoq`&Aa`OnR^U64
zjroQOgO0?V5VDF5o27;rTIXsN>p#>jmo;x;4(8||4p^ONdA@bpgq^U)P{@blI#;Wt
zWS^{7Tv8r-Xn9{#LJn)?<JW(Wf2nr#n0r3G^OAv6+a>yjtLb}N9|vacVvQk*wHKWV
z{mCFdbgOSW?<Xit6C{1k0AQj@xN%ztPbggqI)HfNe)0AFd7JuQiKHZ1N&)}1<wyP~
z?_aI!udQ*`)i^!xInP|A*Df-J9P>E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642eec4975cf51458b9afeefe46c
GIT binary patch
literal 95
zc%17D@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga%mF?juK#@*VoWXSL2@NQe!*uh
mnS}iXa=1KQ978JRBqsscYz)k1<~1vTECx?kKbLh*2~7ZT-W2Wt
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.fetch.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+<!-- The child page, used by browser_cache.js -->
+<body>
+<div>thirdPartyChild.fetch.html</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.iframe.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+<!-- The child page, used by browser_cache.js -->
+<body>
+<div>thirdPartyChild.html</div>
+<script>
+  var xhr = new XMLHttpRequest();
+  xhr.open("GET", "http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.xhr.html", true);
+  xhr.send();
+  var worker = new Worker("http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.worker.js");
+  var sharedWorker = new SharedWorker("http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.sharedworker.js");
+
+  fetch("file_thirdPartyChild.fetch.html", {cache: "force-cache"} );
+  fetch(new Request("file_thirdPartyChild.request.html"), {cache: "force-cache"} );
+</script>
+</body>
+</html>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c5916f289705642eec4975cf51458b9afeefe46c
GIT binary patch
literal 95
zc%17D@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga%mF?juK#@*VoWXSL2@NQe!*uh
mnS}iXa=1KQ978JRBqsscYz)k1<~1vTECx?kKbLh*2~7ZT-W2Wt
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.import.js
@@ -0,0 +1,1 @@
+// dummy script, to be called by self.importScripts(...)
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.link.css
@@ -0,0 +1,1 @@
+/* Dummy CSS file, used by browser_cache.js. */
\ No newline at end of file
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c5916f289705642eec4975cf51458b9afeefe46c
GIT binary patch
literal 95
zc%17D@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga%mF?juK#@*VoWXSL2@NQe!*uh
mnS}iXa=1KQ978JRBqsscYz)k1<~1vTECx?kKbLh*2~7ZT-W2Wt
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.request.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+<!-- The child page, used by browser_cache.js -->
+<body>
+<div>thirdPartyChild.request.html</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.script.js
@@ -0,0 +1,1 @@
+// Dummy child script, used by browser_cache.js
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.sharedworker.js
@@ -0,0 +1,1 @@
+// dummy file
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.track.vtt
@@ -0,0 +1,13 @@
+WEBVTT FILE
+
+1
+00:00:00.500 --> 00:00:02.000 D:vertical A:start
+blah blah blah
+
+2
+00:00:02.500 --> 00:00:04.300
+this is a test
+
+3
+00:00:05.000 --> 00:00:07.000
+one more line
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..68dee3cf2b1de3d820a7b606cdca809f8224e855
GIT binary patch
literal 16049
zc%1FKcUTn5wl`coiD5_s4lo39fB}Z2B#~ffh8!geC^#S}h$zXd>?R6`fC#8;z#%Cj
zDj+Jj6-OkA0T9H5N>a?=7IXTl2lhVuo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v-Q3mBa8!Qgm%zOl2?2qAin{f3CL|J3>mZSo(Qo
zc>UTJah6`M8nb)Gqv)fw2cP;%KFRbzz4WzZN#=k|ea&@%wQtU_0h_CsfsQzlT8`D=
zaROfk3|kkK|Db8=dK>@lMgjcLC$FC_|D~@21Q*O{gsK#vhveBnfL<3Lphf{WR?Aad
zM8v1|^_h^=rcDr{P!|aG#t(`{kYR6yrhy{|bWwe*fS*!}g}3-2yP=U}$;e^SiDg!V
zR3brg6%nq0ise#4WSvVu#m7q}-fP=e>{2?HW$)c`UaI=N2;i;u^<>-`jyHwoL_p}4
zLFO=$2(vi1fdu^HA`R2mB(Ff{zRiTlgr4NN`)0it0M|ts^mcnHnMotp;`lJE2;7QY
z7?TKry5~Sf2qc%7v-R<lZMf&<;si6<sz6NwM6+r%RavPP*|~3sD;6<{QreCVZli$?
NW^56gvQ&sQ|3Brd7xw@F
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.worker.fetch.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+<!-- The child page, used by browser_cache.js -->
+<body>
+<div>thirdPartyChild.worker.fetch.html</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.worker.js
@@ -0,0 +1,9 @@
+var xhr = new XMLHttpRequest();
+xhr.open("GET", "http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.worker.xhr.html", true);
+xhr.send();
+
+fetch("http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.worker.fetch.html", {cache: "force-cache"} );
+var myRequest = new Request("http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.worker.request.html");
+fetch(myRequest, {cache: "force-cache"} );
+
+self.importScripts("http://example.net/browser/browser/components/originattributes/test/browser/file_thirdPartyChild.import.js");
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.worker.request.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+<!-- The child page, used by browser_cache.js -->
+<body>
+<div>thirdPartyChild.worker.request.html</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.worker.xhr.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+<!-- The child page, used by browser_cache.js -->
+<body>
+<div>thirdPartyChild.worker.xhr.html</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/components/originattributes/test/browser/file_thirdPartyChild.xhr.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+<!-- The child page, used by browser_cache.js -->
+<body>
+<div>thirdPartyChild.html</div>
+</body>
+</html>
--- a/browser/components/originattributes/test/browser/head.js
+++ b/browser/components/originattributes/test/browser/head.js
@@ -304,17 +304,17 @@ this.IsolationTestTools = {
                       ];
 
     this._add_task(function* (aMode) {
       let tabSettingA = 0;
 
       for (let tabSettingB of [0, 1]) {
         // Give the test a chance to set up before each case is run.
         if (aBeforeFunc) {
-          yield aBeforeFunc();
+          yield aBeforeFunc(aMode);
         }
 
         // Create Tabs.
         let tabInfoA = yield IsolationTestTools._addTab(aMode,
                                                         pageURL,
                                                         tabSettings[tabSettingA],
                                                         firstFrameSetting);
         let tabInfoB = yield IsolationTestTools._addTab(aMode,