[tbb-commits] [tor-browser/tor-browser-45.1.0esr-6.0-1] squash! Bug #13749.2: Regression tests for first-party isolation of cache

gk at torproject.org gk at torproject.org
Tue Apr 26 06:11:03 UTC 2016


commit 7caee5e04bfac481c4f39ac75b366c530aba5374
Author: Arthur Edelstein <arthuredelstein at gmail.com>
Date:   Mon Apr 25 17:15:21 2016 -0700

    squash! Bug #13749.2: Regression tests for first-party isolation of cache
    
    Also tests for isolation of WorkerGlobalScope.importScripts()
    https://bugs.torproject.org/18890
---
 netwerk/test/browser/browser.ini                | 1 +
 netwerk/test/browser/browser_cacheFirstParty.js | 3 ++-
 netwerk/test/browser/thirdPartyChild.import.js  | 1 +
 netwerk/test/browser/thirdPartyChild.worker.js  | 2 ++
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/netwerk/test/browser/browser.ini b/netwerk/test/browser/browser.ini
index 9bc3361..a78557b 100644
--- a/netwerk/test/browser/browser.ini
+++ b/netwerk/test/browser/browser.ini
@@ -8,6 +8,7 @@ support-files =
   thirdPartyChild.fetch.html
   thirdPartyChild.iframe.html
   thirdPartyChild.img.png
+  thirdPartyChild.import.js
   thirdPartyChild.link.css
   thirdPartyChild.object.png
   thirdPartyChild.request.html
diff --git a/netwerk/test/browser/browser_cacheFirstParty.js b/netwerk/test/browser/browser_cacheFirstParty.js
index 08b3231..967c597 100644
--- a/netwerk/test/browser/browser_cacheFirstParty.js
+++ b/netwerk/test/browser/browser_cacheFirstParty.js
@@ -113,7 +113,8 @@ let privacyPref = "privacy.thirdparty.isolate",
                 "embed.png", "xhr.html", "worker.xhr.html", "audio.ogg",
                 "video.ogv", "track.vtt", "favicon.ico",
                 "fetch.html", "worker.fetch.html",
-                "request.html", "worker.request.html"];
+                "request.html", "worker.request.html",
+                "import.js"];
 
 // __checkCachePopulation(pref, numberOfDomains)__.
 // Check if the number of entries found in the cache for each
diff --git a/netwerk/test/browser/thirdPartyChild.import.js b/netwerk/test/browser/thirdPartyChild.import.js
new file mode 100644
index 0000000..dbf8f83
--- /dev/null
+++ b/netwerk/test/browser/thirdPartyChild.import.js
@@ -0,0 +1 @@
+// dummy script, to be called by self.importScripts(...)
diff --git a/netwerk/test/browser/thirdPartyChild.worker.js b/netwerk/test/browser/thirdPartyChild.worker.js
index 34627b2..c8c187b 100644
--- a/netwerk/test/browser/thirdPartyChild.worker.js
+++ b/netwerk/test/browser/thirdPartyChild.worker.js
@@ -5,3 +5,5 @@ xhr.send();
 fetch("http://example.net/browser/netwerk/test/browser/thirdPartyChild.worker.fetch.html", {cache: "force-cache"} );
 var myRequest = new Request("http://example.net/browser/netwerk/test/browser/thirdPartyChild.worker.request.html");
 fetch(myRequest, {cache: "force-cache"} );
+
+self.importScripts("http://example.net/browser/netwerk/test/browser/thirdPartyChild.import.js");



More information about the tbb-commits mailing list