зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 05fceb07f800 (bug 1909698) for causing wpt crashes/assertions. CLOSED TREE
This commit is contained in:
Родитель
3a3760533b
Коммит
f88a40ddc9
|
@ -1329,20 +1329,7 @@ void nsDocShell::FirePageHideShowNonRecursive(bool aShow) {
|
|||
mEODForCurrentDocument = false;
|
||||
mIsRestoringDocument = true;
|
||||
mLoadGroup->AddRequest(channel, nullptr);
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
if (doc->FragmentDirective()) {
|
||||
// If we have fragment directives, then we've mutated the document
|
||||
// uri. Set the current URI from session history instead.
|
||||
if (mozilla::SessionHistoryInParent()) {
|
||||
uri = mActiveEntry->GetURI();
|
||||
} else if (mOSHE) {
|
||||
uri = mOSHE->GetURI();
|
||||
}
|
||||
}
|
||||
if (!uri) {
|
||||
uri = doc->GetDocumentURI();
|
||||
}
|
||||
SetCurrentURI(uri, channel,
|
||||
SetCurrentURI(doc->GetDocumentURI(), channel,
|
||||
/* aFireOnLocationChange */ true,
|
||||
/* aIsInitialAboutBlank */ false,
|
||||
/* aLocationFlags */ 0);
|
||||
|
|
|
@ -78,8 +78,6 @@ support-files = [
|
|||
"file_backforward_restore_scroll.html^headers^",
|
||||
]
|
||||
|
||||
["browser_backforward_text_fragment_restore_urlbar.js"]
|
||||
|
||||
["browser_backforward_userinteraction.js"]
|
||||
support-files = ["dummy_iframe_page.html"]
|
||||
skip-if = ["os == 'linux' && bits == 64 && !debug"] # Bug 1607713
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const ROOT = getRootDirectory(gTestPath).replace(
|
||||
"chrome://mochitests/content",
|
||||
"http://mochi.test:8888"
|
||||
);
|
||||
|
||||
const URL = `${ROOT}/dummy_page.html#:~:text=dummy`;
|
||||
|
||||
function waitForPageShow(browser) {
|
||||
return BrowserTestUtils.waitForContentEvent(browser, "pageshow", true);
|
||||
}
|
||||
|
||||
add_task(async function test_fragment_restore_urlbar() {
|
||||
await BrowserTestUtils.withNewTab("https://example.com", async browser => {
|
||||
let loaded = BrowserTestUtils.browserLoaded(browser, false);
|
||||
BrowserTestUtils.startLoadingURIString(browser, URL);
|
||||
await loaded;
|
||||
|
||||
// Go back in history.
|
||||
let change = waitForPageShow(browser);
|
||||
browser.goBack();
|
||||
await change;
|
||||
change = waitForPageShow(browser);
|
||||
// Go forward in history.
|
||||
browser.goForward();
|
||||
await change;
|
||||
is(gURLBar.inputField.value, URL, "URL should have text directive");
|
||||
});
|
||||
});
|
Загрузка…
Ссылка в новой задаче