[tbb-commits] [tor-browser/tor-browser-38.1.0esr-5.0-1] fixup! Bug #13749.2: Regression tests for first-party isolation of cache

mikeperry at torproject.org mikeperry at torproject.org
Tue Aug 4 20:38:57 UTC 2015


commit 7a73984f8e8f394417d850284578f2b97fed6120
Author: Arthur Edelstein <arthuredelstein at gmail.com>
Date:   Mon Jul 13 16:14:56 2015 -0700

    fixup! Bug #13749.2: Regression tests for first-party isolation of cache
---
 netwerk/test/browser/browser.ini                     |    2 ++
 netwerk/test/browser/browser_cacheFirstParty.js      |    2 +-
 netwerk/test/browser/thirdPartyChild.iframe.html     |    1 +
 netwerk/test/browser/thirdPartyChild.worker.js       |    3 +++
 netwerk/test/browser/thirdPartyChild.worker.xhr.html |    8 ++++++++
 5 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/netwerk/test/browser/browser.ini b/netwerk/test/browser/browser.ini
index aaf0def..ca711b7 100644
--- a/netwerk/test/browser/browser.ini
+++ b/netwerk/test/browser/browser.ini
@@ -10,6 +10,8 @@ support-files =
   thirdPartyChild.embed.png
   thirdPartyChild.img.png
   thirdPartyChild.object.png
+  thirdPartyChild.worker.js
+  thirdPartyChild.worker.xhr.html
   thirdPartyChild.xhr.html
   thirdPartyChild.track.vtt
 
diff --git a/netwerk/test/browser/browser_cacheFirstParty.js b/netwerk/test/browser/browser_cacheFirstParty.js
index 9795539..c23f669 100644
--- a/netwerk/test/browser/browser_cacheFirstParty.js
+++ b/netwerk/test/browser/browser_cacheFirstParty.js
@@ -106,7 +106,7 @@ let privacyPref = "privacy.thirdparty.isolate",
     // We will check cache for example.net content from
     // iframe, link, script, img, object, embed, xhr, audio, video, track
     suffixes = ["iframe.html", "link.css", "script.js", "img.png", "object.png",
-                "embed.png", "xhr.html", "audio.ogg", "video.ogv", "track.vtt" ];
+                "embed.png", "xhr.html", "worker.xhr.html", "audio.ogg", "video.ogv", "track.vtt" ];
 
 // __checkCachePopulation(pref, numberOfDomains)__.
 // Check if the number of entries found in the cache for each
diff --git a/netwerk/test/browser/thirdPartyChild.iframe.html b/netwerk/test/browser/thirdPartyChild.iframe.html
index f7b7531..bbd6043 100644
--- a/netwerk/test/browser/thirdPartyChild.iframe.html
+++ b/netwerk/test/browser/thirdPartyChild.iframe.html
@@ -8,6 +8,7 @@
   var xhr = new XMLHttpRequest();
   xhr.open("GET", "http://example.net/browser/netwerk/test/browser/thirdPartyChild.xhr.html", true);
   xhr.send();
+  var worker = new Worker("http://example.net/browser/netwerk/test/browser/thirdPartyChild.worker.js");
 </script>
 </body>
 </html>
diff --git a/netwerk/test/browser/thirdPartyChild.worker.js b/netwerk/test/browser/thirdPartyChild.worker.js
new file mode 100644
index 0000000..49154b7
--- /dev/null
+++ b/netwerk/test/browser/thirdPartyChild.worker.js
@@ -0,0 +1,3 @@
+var xhr = new XMLHttpRequest();
+xhr.open("GET", "http://example.net/browser/netwerk/test/browser/thirdPartyChild.worker.xhr.html", true);
+xhr.send();
diff --git a/netwerk/test/browser/thirdPartyChild.worker.xhr.html b/netwerk/test/browser/thirdPartyChild.worker.xhr.html
new file mode 100644
index 0000000..1f18646
--- /dev/null
+++ b/netwerk/test/browser/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_cacheFirstParty.js -->
+<body>
+<div>thirdPartyChild.worker.xhr.html</div>
+</body>
+</html>





More information about the tbb-commits mailing list