mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 03:35:33 +00:00
Bug 1064280 - Add automated test for changing the URL in a pinned tab. r=dao
This commit is contained in:
parent
2163c86b40
commit
70f93767ad
@ -288,6 +288,7 @@ skip-if = buildapp == "mulet" || e10s # Bug ?????? - test directly manipulates c
|
||||
skip-if = e10s # Bug ?????? - test directly manipulates content (directly gets elements from the content)
|
||||
[browser_bug1015721.js]
|
||||
skip-if = os == 'win' || e10s # Bug 1056146 - FullZoomHelper uses promiseTabLoadEvent() which isn't e10s friendly
|
||||
[browser_bug1064280_changeUrlInPinnedTab.js]
|
||||
[browser_canonizeURL.js]
|
||||
skip-if = e10s # Bug ?????? - [JavaScript Error: "Error in AboutHome.sendAboutHomeData TypeError: target.messageManager is undefined" {file: "resource:///modules/AboutHome.jsm" line: 208}]
|
||||
[browser_contentAreaClick.js]
|
||||
|
@ -0,0 +1,34 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
add_task(function(){
|
||||
// Test that changing the URL in a pinned tab works correctly
|
||||
|
||||
let TEST_LINK_INITIAL = "about:";
|
||||
let TEST_LINK_CHANGED = "about:support";
|
||||
|
||||
let appTab = gBrowser.addTab(TEST_LINK_INITIAL);
|
||||
gBrowser.pinTab(appTab);
|
||||
is(appTab.pinned, true, "Tab was successfully pinned");
|
||||
|
||||
let initialTabsNo = gBrowser.tabs.length;
|
||||
|
||||
let goButton = document.getElementById("urlbar-go-button");
|
||||
gBrowser.selectedTab = appTab;
|
||||
gURLBar.focus();
|
||||
gURLBar.value = TEST_LINK_CHANGED;
|
||||
|
||||
let promisePageload = promiseTabLoadEvent(appTab);
|
||||
goButton.click();
|
||||
yield promisePageload;
|
||||
|
||||
is(appTab.linkedBrowser.currentURI.spec, TEST_LINK_CHANGED,
|
||||
"New page loaded in the app tab");
|
||||
is(gBrowser.tabs.length, initialTabsNo, "No additional tabs were opened");
|
||||
});
|
||||
|
||||
registerCleanupFunction(function () {
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
Loading…
Reference in New Issue
Block a user