summaryrefslogtreecommitdiffstats
path: root/toolkit/components/places/tests/browser/browser_bug461710.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-25 15:07:00 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:55:19 +0200
commiteb70e6e3d0bff11c25f14b1196025791bf2308fb (patch)
tree5ef4ce17db83c74d7b05ec12c8f59e095a6dd5bd /toolkit/components/places/tests/browser/browser_bug461710.js
parent32ead795290b3399d56b4708fc75b77d296f6a1a (diff)
downloadUXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.gz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.lz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.xz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.zip
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/places/tests/browser/browser_bug461710.js')
-rw-r--r--toolkit/components/places/tests/browser/browser_bug461710.js82
1 files changed, 0 insertions, 82 deletions
diff --git a/toolkit/components/places/tests/browser/browser_bug461710.js b/toolkit/components/places/tests/browser/browser_bug461710.js
deleted file mode 100644
index 12af87a06..000000000
--- a/toolkit/components/places/tests/browser/browser_bug461710.js
+++ /dev/null
@@ -1,82 +0,0 @@
-const kRed = "rgb(255, 0, 0)";
-const kBlue = "rgb(0, 0, 255)";
-
-const prefix = "http://example.com/tests/toolkit/components/places/tests/browser/461710_";
-
-add_task(function* () {
- let contentPage = prefix + "iframe.html";
- let normalWindow = yield BrowserTestUtils.openNewBrowserWindow();
-
- let browser = normalWindow.gBrowser.selectedBrowser;
- BrowserTestUtils.loadURI(browser, contentPage);
- yield BrowserTestUtils.browserLoaded(browser, contentPage);
-
- let privateWindow = yield BrowserTestUtils.openNewBrowserWindow({private: true});
-
- browser = privateWindow.gBrowser.selectedBrowser;
- BrowserTestUtils.loadURI(browser, contentPage);
- yield BrowserTestUtils.browserLoaded(browser, contentPage);
-
- let tests = [{
- win: normalWindow,
- topic: "uri-visit-saved",
- subtest: "visited_page.html"
- }, {
- win: normalWindow,
- topic: "visited-status-resolution",
- subtest: "link_page.html",
- color: kRed,
- message: "Visited link coloring should work outside of private mode"
- }, {
- win: privateWindow,
- topic: "visited-status-resolution",
- subtest: "link_page-2.html",
- color: kBlue,
- message: "Visited link coloring should not work inside of private mode"
- }, {
- win: normalWindow,
- topic: "visited-status-resolution",
- subtest: "link_page-3.html",
- color: kRed,
- message: "Visited link coloring should work outside of private mode"
- }];
-
- let visited_page_url = prefix + tests[0].subtest;
- for (let test of tests) {
- let promise = new Promise(resolve => {
- let uri = NetUtil.newURI(visited_page_url);
- Services.obs.addObserver(function observe(aSubject) {
- if (uri.equals(aSubject.QueryInterface(Ci.nsIURI))) {
- Services.obs.removeObserver(observe, test.topic);
- resolve();
- }
- }, test.topic, false);
- });
- ContentTask.spawn(test.win.gBrowser.selectedBrowser, prefix + test.subtest, function* (aSrc) {
- content.document.getElementById("iframe").src = aSrc;
- });
- yield promise;
-
- if (test.color) {
- // In e10s waiting for visited-status-resolution is not enough to ensure links
- // have been updated, because it only tells us that messages to update links
- // have been dispatched. We must still wait for the actual links to update.
- yield BrowserTestUtils.waitForCondition(function* () {
- let color = yield ContentTask.spawn(test.win.gBrowser.selectedBrowser, null, function* () {
- let iframe = content.document.getElementById("iframe");
- let elem = iframe.contentDocument.getElementById("link");
- return content.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils)
- .getVisitedDependentComputedStyle(elem, "", "color");
- });
- return (color == test.color);
- }, test.message);
- // The harness will consider the test as failed overall if there were no
- // passes or failures, so record it as a pass.
- ok(true, test.message);
- }
- }
-
- yield BrowserTestUtils.closeWindow(normalWindow);
- yield BrowserTestUtils.closeWindow(privateWindow);
-});