Bug 1270142 - Update test_localStorageBase.html to run on e10s, r=bz
authorMichael Layzell <michael@thelayzells.com>
Wed, 04 May 2016 10:52:45 -0400
changeset 296431 ef13bb5a11d52ed112be78bf79b15faff1d4ed7c
parent 296430 200733834a6e6812aa6f64630d7ab2fb645c6b39
child 296432 733eacd2ed13b581e03868160b8a68f42dabf63b
push id76326
push usermichael@thelayzells.com
push dateFri, 06 May 2016 17:53:51 +0000
treeherdermozilla-inbound@ef13bb5a11d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1270142
milestone49.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 1270142 - Update test_localStorageBase.html to run on e10s, r=bz
dom/tests/mochitest/localstorage/test_localStorageBase.html
--- a/dom/tests/mochitest/localstorage/test_localStorageBase.html
+++ b/dom/tests/mochitest/localstorage/test_localStorageBase.html
@@ -58,17 +58,17 @@ function startTest()
     if (e.storageArea == localStorageCopy) {
       ok(expectedEvents.length > 0, "Not more then expected events encountered");
       var receivedEvent = e.key + "," + e.oldValue + "," + e.newValue;
       is(receivedEvent, expectedEvents.shift(), "Expected event data: " + receivedEvent);
     }
   }
 
   // Listen for MozLocalStorageChanged
-  SpecialPowers.addChromeEventListener("MozLocalStorageChanged", onStorageChanged, false);
+  SpecialPowers.addChromeEventListener("MozLocalStorageChanged", onStorageChanged, true);
 
   // add an empty-value key
   localStorage.setItem("empty", "");
   is(localStorage.getItem("empty"), "", "Empty value (getItem())");
   is(localStorage["empty"], "", "Empty value (array access)");
   is(localStorage.empty, "", "Empty value (property access)");
   is(typeof localStorage.getItem("empty"), "string", "getItem('empty') is string");
   is(typeof localStorage["empty"], "string", "['empty'] is string");
@@ -148,48 +148,48 @@ function startTest()
 
   // remove the second key
   localStorage.removeItem("key2");
   is(localStorage.length, 1, "The storage has one key-value pair");
   is(localStorage.key(0), "key1");
   is(localStorage.key(-1), null, "key() should return null for out-of-bounds access");
   is(localStorage.key(1), null, "key() should return null for out-of-bounds access");
   is(localStorage.getItem("key1"), "value1-2");
-  
+
   // JS property test
   localStorage.testA = "valueA";
   is(localStorage.testA, "valueA");
   is(localStorage["testA"], "valueA");
   is(localStorage.getItem("testA"), "valueA");
-  
+
   localStorage.testA = "valueA2";
   is(localStorage.testA, "valueA2");
   is(localStorage["testA"], "valueA2");
   is(localStorage.getItem("testA"), "valueA2");
-  
+
   localStorage["testB"] = "valueB";
   is(localStorage.testB, "valueB");
   is(localStorage["testB"], "valueB");
   is(localStorage.getItem("testB"), "valueB");
-  
+
   localStorage["testB"] = "valueB2";
   is(localStorage.testB, "valueB2");
   is(localStorage["testB"], "valueB2");
   is(localStorage.getItem("testB"), "valueB2");
-  
+
   localStorage.setItem("testC", "valueC");
   is(localStorage.testC, "valueC");
   is(localStorage["testC"], "valueC");
   is(localStorage.getItem("testC"), "valueC");
-  
+
   localStorage.setItem("testC", "valueC2");
   is(localStorage.testC, "valueC2");
   is(localStorage["testC"], "valueC2");
   is(localStorage.getItem("testC"), "valueC2");
-  
+
   localStorage.setItem("testC", null);
   is("testC" in localStorage, true);
   is(localStorage.getItem("testC"), "null");
   is(localStorage["testC"], "null");
   is(localStorage.testC, "null");
 
   localStorage.removeItem("testC");
   localStorage["testC"] = null;
@@ -222,17 +222,17 @@ function startTest()
   is(localStorage.getItem("nonexisting"), null, "Nonexisting item is null");
   is(localStorage.getItem("key1"), null, "key1 removed");
   is(localStorage.getItem("key2"), null, "key2 removed");
   localStorage.removeItem("nonexisting"); // Just check there is no exception
   localStorage.removeItem("key1"); // Just check there is no exception
   localStorage.removeItem("key2"); // Just check there is no exception
 
   SimpleTest.executeSoon(function () {
-    SpecialPowers.removeChromeEventListener("MozLocalStorageChanged", onStorageChanged, false);
+    SpecialPowers.removeChromeEventListener("MozLocalStorageChanged", onStorageChanged, true);
     is(expectedEvents.length, 0, "received the correct number of events");
 
     localStorage.clear();
     SimpleTest.finish();
   });
 }
 
 SimpleTest.waitForExplicitFinish();