[tbb-commits] [tor-browser/tor-browser-38.4.0esr-5.5-1] fixup! Regression tests for Bug 15564: Isolate SharedWorker by first party domain

gk at torproject.org gk at torproject.org
Sat Dec 12 20:54:36 UTC 2015


commit 69f1279b009afc2625bb6d5038fc1fd90cf56b14
Author: Georg Koppen <gk at torproject.org>
Date:   Sat Dec 12 20:33:08 2015 +0000

    fixup! Regression tests for Bug 15564: Isolate SharedWorker by first party domain
---
 dom/base/test/test_tor_bug15564.html |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/dom/base/test/test_tor_bug15564.html b/dom/base/test/test_tor_bug15564.html
index 3609616..b8f7544 100644
--- a/dom/base/test/test_tor_bug15564.html
+++ b/dom/base/test/test_tor_bug15564.html
@@ -38,7 +38,7 @@ let domain1 = "http://example.com",
 // parent page should then open a `child` iframe. Post an
 // `input` message to the child. Returns [tab, response].
 let tabIO = function* (domain, child, input) {
-  // Open a new tab with a parent page at the given (first party) domain.
+  // Open a new tab with a parent page at the given (first-party) domain.
   tab = window.open(domain + path + "bug15502_tab.html", "_blank");
   // Wait for the parent page to report that it has completed loading.
   yield receiveMessage(tab); // ready message
@@ -64,15 +64,15 @@ let tabIO = function* (domain, child, input) {
 
 // __sharedWorkerTest(isolationOn, domainA, domainB, childPage)__.
 // Run a test where we set the pref "privacy.thirdparty.isolate" to on or off,
-// and then create a shared worker under first party `domainA`, using the page `child_page`,
-// and then a matching SharedWorker under first party `domainB`, and see if they match.
+// and then create a SharedWorker under first-party `domainA`, using the page `child_page`,
+// and then a matching SharedWorker under first-party `domainB`, and see if they match.
 let sharedWorkerTest = function* (isolationOn, domainA, domainB, child_page) {
   // Set the pref to reflect whether we want isolation on or off.
   // 2 means always on; 0 means always off.
   yield setPref("privacy.thirdparty.isolate", isolationOn ? 2 : 0);
-  // Open two tabs with parent pages embedding child iframes. The parent (first party)
+  // Open two tabs with parent pages embedding child iframes. The parent (first-party)
   // domains are set to domainA and domainB (which may be the same or different).
-  // The child page always has origin example.org, but gets its first party domain
+  // The child page always has origin example.org, but gets its first-party domain
   // from the parent page. Report results: are child pages able to share information?
   let input = isolationOn + "|" + domainA + "|" + domainB,
       [tabA, firstResult] = yield tabIO(domainA, child_page, input),
@@ -83,11 +83,11 @@ let sharedWorkerTest = function* (isolationOn, domainA, domainB, child_page) {
   // If the child pages both report the same random number, then they have shared
   // that number via a SharedWorker. Otherwise sharing was denied.
   if (isolationOn && domainA !== domainB) {
-    // The isolation pref is enabled and first party domains of the two child pages
+    // The isolation pref is enabled and first-party domains of the two child pages
     // are different, so sharing should have been prevented.
     ok(firstResult !== secondResult, description + " Deny sharing SharedWorker");
   } else {
-    // The isolation pref is disable, or the first party domain is the same for
+    // The isolation pref is disabled, or the first-party domain is the same for
     // both child pages, so the secret data should have been shared.
     ok(firstResult === secondResult, description + " Allow sharing SharedWorker");
   }
@@ -103,8 +103,8 @@ spawnTask(function* () {
   let domainA = domain1;
   for (let isolate of [false, true]) {
     for (let domainB of [domain1, domain2]) {
-       // For the given isolation state, and a pair of first party domains
-       // (which may or not be different), test if secret data can be
+       // For the given isolation state, and a pair of first-party domains
+       // (which may or may not be different), test if secret data can be
        // shared via a SharedWorker, and if that matches the intended behavior.
        // Here domainA is always domain1, and domainB is either
        // domain1 or domain2.



More information about the tbb-commits mailing list