mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
31
docshell/test/browser/browser_bug1206879.js
Normal file
31
docshell/test/browser/browser_bug1206879.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
add_task(function*() {
|
||||
let url = getRootDirectory(gTestPath) + "file_bug1206879.html";
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, url, true);
|
||||
|
||||
let numLocationChanges = 0;
|
||||
|
||||
let listener = {
|
||||
onLocationChange: function(browser, wp, request, uri, flags) {
|
||||
if (browser != tab.linkedBrowser) {
|
||||
return;
|
||||
}
|
||||
info("onLocationChange: " + uri.spec);
|
||||
numLocationChanges++;
|
||||
this.resolve();
|
||||
}
|
||||
};
|
||||
let locationPromise = new Promise((resolve, reject) => {
|
||||
listener.resolve = resolve;
|
||||
gBrowser.addTabsProgressListener(listener);
|
||||
});
|
||||
yield ContentTask.spawn(tab.linkedBrowser, {}, function() {
|
||||
content.frames[0].history.pushState(null, null, "foo");
|
||||
});
|
||||
|
||||
yield locationPromise;
|
||||
|
||||
gBrowser.removeTab(tab);
|
||||
gBrowser.removeTabsProgressListener(listener);
|
||||
is(numLocationChanges, 1,
|
||||
"pushState with a different URI should cause a LocationChange event.");
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue