Bug 1321570: Remove duplicate tests, r=kmag
authorEthan Glasser-Camp <eglassercamp@mozilla.com>
Tue, 24 Jan 2017 14:54:11 -0500
changeset 343160 0af3de0a7fe96fdc1bfd1e526a8b50cfaf114785
parent 343159 98f9763349183966441f448a83f9684412f4ff30
child 343161 569c46670744f5d2c0939e7b5cf79b44cb5f8a89
push id31371
push usercbook@mozilla.com
push dateThu, 16 Feb 2017 12:15:11 +0000
treeherdermozilla-central@8c8b54b13be7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1321570
milestone54.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 1321570: Remove duplicate tests, r=kmag These tests are essentially the same as the tests of the same name in test_ext_storage.js. These tests could maybe be valuable if they were content script tests instead of background script tests, but they aren't, so let's delete them. MozReview-Commit-ID: I7rIR7ecoEZ
toolkit/components/extensions/test/mochitest/test_ext_storage_content.html
--- a/toolkit/components/extensions/test/mochitest/test_ext_storage_content.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_storage_content.html
@@ -245,90 +245,12 @@ add_task(function* test_contentscript() 
   yield extension.awaitMessage("test-finished");
 
   yield SpecialPowers.popPrefEnv();
   yield extension.unload();
 
   win.close();
 });
 
-add_task(function* test_local_cache_invalidation() {
-  let win = window.open("file_sample.html");
-
-  function background(checkGet) {
-    browser.test.onMessage.addListener(async msg => {
-      if (msg === "set-initial") {
-        await browser.storage.local.set({"test-prop1": "value1", "test-prop2": "value2"});
-        browser.test.sendMessage("set-initial-done");
-      } else if (msg === "check") {
-        await checkGet("local", "test-prop1", "value1");
-        await checkGet("local", "test-prop2", "value2");
-        browser.test.sendMessage("check-done");
-      }
-    });
-
-    browser.test.sendMessage("ready");
-  }
-
-  let extension = ExtensionTestUtils.loadExtension({
-    manifest: {
-      permissions: ["storage"],
-    },
-    background: `(${background})(${checkGetImpl})`,
-  });
-
-  yield extension.startup();
-  yield extension.awaitMessage("ready");
-
-  extension.sendMessage("set-initial");
-  yield extension.awaitMessage("set-initial-done");
-
-  SpecialPowers.invalidateExtensionStorageCache();
-
-  extension.sendMessage("check");
-  yield extension.awaitMessage("check-done");
-
-  yield extension.unload();
-  win.close();
-});
-
-add_task(function* test_config_flag_needed() {
-  let win = window.open("file_sample.html");
-  yield waitForLoad(win);
-
-  yield SpecialPowers.pushPrefEnv({
-    set: [[STORAGE_SYNC_PREF, false]],
-  });
-
-  function background() {
-    let promises = [];
-    let apiTests = [
-      {method: "get", args: ["foo"]},
-      {method: "set", args: [{foo: "bar"}]},
-      {method: "remove", args: ["foo"]},
-      {method: "clear", args: []},
-    ];
-    apiTests.forEach(testDef => {
-      promises.push(browser.test.assertRejects(
-        browser.storage.sync[testDef.method](...testDef.args),
-        "Please set webextensions.storage.sync.enabled to true in about:config",
-        `storage.sync.${testDef.method} is behind a flag`));
-    });
-
-    Promise.all(promises).then(() => browser.test.notifyPass("flag needed"));
-  }
-
-  let extension = ExtensionTestUtils.loadExtension({
-    manifest: {
-      permissions: ["storage"],
-    },
-    background: `(${background})(${checkGetImpl})`,
-  });
-
-  yield extension.startup();
-  yield extension.awaitFinish("flag needed");
-  yield extension.unload();
-  win.close();
-});
 </script>
 
 </body>
 </html>