summaryrefslogtreecommitdiffstats
path: root/services/cloudsync/tests/mochitest
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-17 20:22:59 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-17 20:22:59 +0200
commit3eb4310cd889e6c8d22c27f0326273acf0a3e8bf (patch)
tree508827a64a5ad5c2d465535afea68eee39775a11 /services/cloudsync/tests/mochitest
parent07381c3edad8ec24b5d820ec0592e0cafa7d73fa (diff)
parent1e868fadf94935bcb4a49ea5eec776d84fe2d1e7 (diff)
downloadUXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.tar
UXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.tar.gz
UXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.tar.lz
UXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.tar.xz
UXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.zip
Merge branch 'Sync-weave'
Diffstat (limited to 'services/cloudsync/tests/mochitest')
-rw-r--r--services/cloudsync/tests/mochitest/browser.ini5
-rw-r--r--services/cloudsync/tests/mochitest/browser_tabEvents.js79
-rw-r--r--services/cloudsync/tests/mochitest/other_window.html7
3 files changed, 0 insertions, 91 deletions
diff --git a/services/cloudsync/tests/mochitest/browser.ini b/services/cloudsync/tests/mochitest/browser.ini
deleted file mode 100644
index c9eddbf71..000000000
--- a/services/cloudsync/tests/mochitest/browser.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-support-files=
- other_window.html
-
-[browser_tabEvents.js] \ No newline at end of file
diff --git a/services/cloudsync/tests/mochitest/browser_tabEvents.js b/services/cloudsync/tests/mochitest/browser_tabEvents.js
deleted file mode 100644
index 9d80090a0..000000000
--- a/services/cloudsync/tests/mochitest/browser_tabEvents.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function test() {
-
- let local = {};
-
- Components.utils.import("resource://gre/modules/CloudSync.jsm", local);
- Components.utils.import("resource:///modules/sessionstore/TabStateFlusher.jsm", local);
-
- let cloudSync = local.CloudSync();
- let opentabs = [];
-
- waitForExplicitFinish();
-
- let testURL = "chrome://mochitests/content/browser/services/cloudsync/tests/mochitest/other_window.html";
- let expected = [
- testURL,
- testURL+"?x=1",
- testURL+"?x=%20a",
- // testURL+"?x=å",
- ];
-
- let nevents = 0;
- let nflushed = 0;
- function handleTabChangeEvent () {
- cloudSync.tabs.removeEventListener("change", handleTabChangeEvent);
- ++ nevents;
- info("tab change event " + nevents);
- next();
- }
-
- function getLocalTabs() {
- cloudSync.tabs.getLocalTabs().then(
- function (tabs) {
- for (let tab of tabs) {
- ok(expected.indexOf(tab.url) >= 0, "found an expected tab");
- }
-
- is(tabs.length, expected.length, "found the right number of tabs");
-
- opentabs.forEach(function (tab) {
- gBrowser.removeTab(tab);
- });
-
- is(nevents, 1, "expected number of change events");
-
- finish();
- }
- )
- }
-
- cloudSync.tabs.addEventListener("change", handleTabChangeEvent);
-
- expected.forEach(function(url) {
- let tab = gBrowser.addTab(url);
-
- function flush() {
- tab.linkedBrowser.removeEventListener("load", flush, true);
- local.TabStateFlusher.flush(tab.linkedBrowser).then(() => {
- ++ nflushed;
- info("flushed " + nflushed);
- next();
- });
- }
-
- tab.linkedBrowser.addEventListener("load", flush, true);
-
- opentabs.push(tab);
- });
-
- function next() {
- if (nevents == 1 && nflushed == expected.length) {
- getLocalTabs();
- }
- }
-
-}
diff --git a/services/cloudsync/tests/mochitest/other_window.html b/services/cloudsync/tests/mochitest/other_window.html
deleted file mode 100644
index a9ded2bd6..000000000
--- a/services/cloudsync/tests/mochitest/other_window.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<!DOCTYPE HTML>
-<html>
-</html>