summaryrefslogtreecommitdiffstats
path: root/toolkit/content/tests/browser/browser_label_textlink.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
commit39dac57259cff8b61db0b22cb2ad0a8adb02692e (patch)
tree52a026cc8c22793eb17fd0f5e22adce1ae08a1dd /toolkit/content/tests/browser/browser_label_textlink.js
parenta1cce3b2b00bbd9f4983013ddd8934a7bccb9e99 (diff)
parentc2d9ab62f3d097c9e0e00184cab1f546554f5eaa (diff)
downloadUXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.gz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.lz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.xz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.zip
Merge branch 'redwood' into 28.9-platform
Diffstat (limited to 'toolkit/content/tests/browser/browser_label_textlink.js')
-rw-r--r--toolkit/content/tests/browser/browser_label_textlink.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/toolkit/content/tests/browser/browser_label_textlink.js b/toolkit/content/tests/browser/browser_label_textlink.js
deleted file mode 100644
index 861086707..000000000
--- a/toolkit/content/tests/browser/browser_label_textlink.js
+++ /dev/null
@@ -1,38 +0,0 @@
-add_task(function* () {
- yield BrowserTestUtils.withNewTab({gBrowser, url: "about:config"}, function*(browser) {
- let newTabURL = "http://www.example.com/";
- yield ContentTask.spawn(browser, newTabURL, function*(newTabURL) {
- let doc = content.document;
- let label = doc.createElement("label");
- label.href = newTabURL;
- label.id = "textlink-test";
- label.className = "text-link";
- label.textContent = "click me";
- doc.documentElement.append(label);
- });
-
- // Test that click will open tab in foreground.
- let awaitNewTab = BrowserTestUtils.waitForNewTab(gBrowser, newTabURL);
- yield BrowserTestUtils.synthesizeMouseAtCenter("#textlink-test", {}, browser);
- let newTab = yield awaitNewTab;
- is(newTab.linkedBrowser, gBrowser.selectedBrowser, "selected tab should be example page");
- yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
- // Test that ctrl+shift+click/meta+shift+click will open tab in background.
- awaitNewTab = BrowserTestUtils.waitForNewTab(gBrowser, newTabURL);
- yield BrowserTestUtils.synthesizeMouseAtCenter("#textlink-test",
- {ctrlKey: true, metaKey: true, shiftKey: true},
- browser);
- yield awaitNewTab;
- is(gBrowser.selectedBrowser, browser, "selected tab should be original tab");
- yield BrowserTestUtils.removeTab(gBrowser.tabs[gBrowser.tabs.length - 1]);
-
- // Middle-clicking should open tab in foreground.
- awaitNewTab = BrowserTestUtils.waitForNewTab(gBrowser, newTabURL);
- yield BrowserTestUtils.synthesizeMouseAtCenter("#textlink-test",
- {button: 1}, browser);
- newTab = yield awaitNewTab;
- is(newTab.linkedBrowser, gBrowser.selectedBrowser, "selected tab should be example page");
- yield BrowserTestUtils.removeTab(gBrowser.tabs[gBrowser.tabs.length - 1]);
- });
-});