mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00
Bug 1093373 , e10s, fix and re-enable browser_bug647886 .js, r=gijs
This commit is contained in:
parent
27ce075b26
commit
8b08f6ce5e
@ -238,7 +238,7 @@ skip-if = e10s && debug
|
||||
[browser_bug624734.js]
|
||||
[browser_bug633691.js]
|
||||
[browser_bug647886.js]
|
||||
skip-if = buildapp == 'mulet' || e10s # Bug 1093373 - Relies on browser.sessionHistory
|
||||
skip-if = buildapp == 'mulet'
|
||||
[browser_bug655584.js]
|
||||
[browser_bug664672.js]
|
||||
[browser_bug676619.js]
|
||||
|
@ -1,36 +1,25 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.selectedBrowser.addEventListener("load", function () {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
add_task(function* () {
|
||||
yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com");
|
||||
|
||||
yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
|
||||
content.history.pushState({}, "2", "2.html");
|
||||
});
|
||||
|
||||
testBackButton();
|
||||
}, true);
|
||||
|
||||
loadURI("http://example.com");
|
||||
}
|
||||
|
||||
function testBackButton() {
|
||||
var backButton = document.getElementById("back-button");
|
||||
var rect = backButton.getBoundingClientRect();
|
||||
|
||||
info("waiting for the history menu to open");
|
||||
|
||||
backButton.addEventListener("popupshown", function (event) {
|
||||
backButton.removeEventListener("popupshown", arguments.callee, false);
|
||||
|
||||
ok(true, "history menu opened");
|
||||
event.target.hidePopup();
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
finish();
|
||||
}, false);
|
||||
|
||||
let popupShownPromise = BrowserTestUtils.waitForEvent(backButton, "popupshown");
|
||||
EventUtils.synthesizeMouseAtCenter(backButton, {type: "mousedown"});
|
||||
EventUtils.synthesizeMouse(backButton, rect.width / 2, rect.height, {type: "mouseup"});
|
||||
}
|
||||
let event = yield popupShownPromise;
|
||||
|
||||
ok(true, "history menu opened");
|
||||
|
||||
event.target.hidePopup();
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user