mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1000894 - fix browser-chrome tests in dom/tests/browser/ to not replace the original tab; r=ehsan
This commit is contained in:
parent
314c3598f7
commit
673c634324
@ -8,7 +8,8 @@ function test() {
|
||||
let fm = Components.classes["@mozilla.org/focus-manager;1"]
|
||||
.getService(Components.interfaces.nsIFocusManager);
|
||||
|
||||
let tabs = [ gBrowser.selectedTab, gBrowser.addTab() ];
|
||||
let tabs = [ gBrowser.addTab(), gBrowser.addTab() ];
|
||||
gBrowser.selectedTab = tabs[0];
|
||||
|
||||
let testingList = [
|
||||
{ uri: "data:text/html,<body onload=\"setTimeout(function () { document.getElementById('target').focus(); }, 10);\"><input id='target'></body>",
|
||||
@ -61,7 +62,6 @@ function test() {
|
||||
function runNextTest() {
|
||||
if (++testingIndex >= testingList.length) {
|
||||
// cleaning-up...
|
||||
gBrowser.addTab();
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
gBrowser.removeTab(tabs[i]);
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ function test() {
|
||||
"<button id=\"eventTarget\" onmousedown=\"onMouseDown(event);\">click here</button>" +
|
||||
"<input id=\"willBeFocused\"></body>";
|
||||
|
||||
let tab = gBrowser.selectedTab;
|
||||
let tab = gBrowser.addTab();
|
||||
gBrowser.selectedTab = tab;
|
||||
|
||||
// Set the focus to the contents.
|
||||
tab.linkedBrowser.focus();
|
||||
@ -52,7 +53,6 @@ function test() {
|
||||
button);
|
||||
}
|
||||
|
||||
gBrowser.addTab();
|
||||
gBrowser.removeTab(tab);
|
||||
finish();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user