From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- docshell/test/navigation/.eslintrc.js | 11 + docshell/test/navigation/NavigationUtils.js | 203 ++++++++++++++++ docshell/test/navigation/blank.html | 1 + docshell/test/navigation/bluebox_bug430723.html | 6 + docshell/test/navigation/browser.ini | 15 ++ docshell/test/navigation/browser_bug343515.js | 267 +++++++++++++++++++++ .../navigation/browser_ghistorymaxsize_is_0.js | 81 +++++++ .../navigation/browser_test-content-chromeflags.js | 57 +++++ .../navigation/browser_test_bfcache_eviction.js | 96 ++++++++ docshell/test/navigation/bug343515_pg1.html | 5 + docshell/test/navigation/bug343515_pg2.html | 7 + docshell/test/navigation/bug343515_pg3.html | 7 + docshell/test/navigation/bug343515_pg3_1.html | 6 + docshell/test/navigation/bug343515_pg3_1_1.html | 1 + docshell/test/navigation/bug343515_pg3_2.html | 1 + docshell/test/navigation/file_bug1300461.html | 61 +++++ docshell/test/navigation/file_bug1300461_back.html | 37 +++ .../test/navigation/file_bug1300461_redirect.html | 10 + .../file_bug1300461_redirect.html^headers^ | 2 + docshell/test/navigation/file_bug1326251.html | 190 +++++++++++++++ .../navigation/file_bug1326251_evict_cache.html | 27 +++ docshell/test/navigation/file_bug1364364-1.html | 33 +++ docshell/test/navigation/file_bug1364364-2.html | 14 ++ .../test/navigation/file_bug1375833-frame1.html | 8 + .../test/navigation/file_bug1375833-frame2.html | 8 + docshell/test/navigation/file_bug1375833.html | 22 ++ docshell/test/navigation/file_bug1379762-1.html | 35 +++ docshell/test/navigation/file_bug1536471.html | 8 + docshell/test/navigation/file_bug1609475.html | 51 ++++ .../navigation/file_bug386782_contenteditable.html | 1 + .../test/navigation/file_bug386782_designmode.html | 1 + docshell/test/navigation/file_bug462076_1.html | 55 +++++ docshell/test/navigation/file_bug462076_2.html | 52 ++++ docshell/test/navigation/file_bug462076_3.html | 52 ++++ docshell/test/navigation/file_bug508537_1.html | 33 +++ docshell/test/navigation/file_bug534178.html | 30 +++ .../file_contentpolicy_block_window.html | 5 + .../test/navigation/file_docshell_gotoindex.html | 42 ++++ .../test/navigation/file_document_write_1.html | 18 ++ .../file_fragment_handling_during_load.html | 27 +++ .../file_fragment_handling_during_load_frame1.html | 6 + .../file_fragment_handling_during_load_frame2.sjs | 19 ++ ...file_load_history_entry_page_with_one_link.html | 7 + ...ile_load_history_entry_page_with_two_links.html | 9 + docshell/test/navigation/file_nested_frames.html | 27 +++ .../navigation/file_nested_frames_innerframe.html | 1 + .../test/navigation/file_scrollRestoration.html | 153 ++++++++++++ .../navigation/file_shiftReload_and_pushState.html | 28 +++ .../test/navigation/file_static_and_dynamic_1.html | 31 +++ docshell/test/navigation/file_tell_opener.html | 8 + .../file_triggeringprincipal_frame_1.html | 27 +++ .../file_triggeringprincipal_frame_2.html | 8 + ...rincipal_iframe_iframe_window_open_frame_a.html | 6 + ...ipal_iframe_iframe_window_open_frame_a_nav.html | 6 + ...rincipal_iframe_iframe_window_open_frame_b.html | 15 ++ ...ngprincipal_parent_iframe_window_open_base.html | 6 + ...ingprincipal_parent_iframe_window_open_nav.html | 6 + .../file_triggeringprincipal_subframe.html | 15 ++ .../file_triggeringprincipal_subframe_nav.html | 21 ++ ...iggeringprincipal_subframe_same_origin_nav.html | 20 ++ .../file_triggeringprincipal_window_open.html | 6 + docshell/test/navigation/frame0.html | 3 + docshell/test/navigation/frame1.html | 3 + docshell/test/navigation/frame2.html | 3 + docshell/test/navigation/frame3.html | 3 + docshell/test/navigation/goback.html | 5 + docshell/test/navigation/iframe.html | 8 + docshell/test/navigation/iframe_static.html | 8 + docshell/test/navigation/mochitest.ini | 122 ++++++++++ docshell/test/navigation/navigate.html | 37 +++ .../navigation/navigation_target_popup_url.html | 1 + .../test/navigation/navigation_target_url.html | 1 + docshell/test/navigation/open.html | 9 + docshell/test/navigation/parent.html | 14 ++ docshell/test/navigation/redbox_bug430723.html | 6 + .../navigation/test_aboutblank_change_process.html | 46 ++++ docshell/test/navigation/test_bug1300461.html | 75 ++++++ docshell/test/navigation/test_bug1326251.html | 74 ++++++ docshell/test/navigation/test_bug1364364.html | 56 +++++ docshell/test/navigation/test_bug1375833.html | 136 +++++++++++ docshell/test/navigation/test_bug1379762.html | 64 +++++ docshell/test/navigation/test_bug13871.html | 81 +++++++ docshell/test/navigation/test_bug145971.html | 29 +++ docshell/test/navigation/test_bug1536471.html | 75 ++++++ docshell/test/navigation/test_bug1609475.html | 35 +++ docshell/test/navigation/test_bug270414.html | 95 ++++++++ docshell/test/navigation/test_bug278916.html | 37 +++ docshell/test/navigation/test_bug279495.html | 44 ++++ docshell/test/navigation/test_bug344861.html | 35 +++ docshell/test/navigation/test_bug386782.html | 132 ++++++++++ docshell/test/navigation/test_bug430624.html | 57 +++++ docshell/test/navigation/test_bug430723.html | 124 ++++++++++ docshell/test/navigation/test_child.html | 47 ++++ .../test_contentpolicy_block_window.html | 102 ++++++++ .../test/navigation/test_docshell_gotoindex.html | 29 +++ .../test_dynamic_frame_forward_back.html | 35 +++ .../test_fragment_handling_during_load.html | 35 +++ docshell/test/navigation/test_grandchild.html | 47 ++++ .../test/navigation/test_load_history_entry.html | 196 +++++++++++++++ docshell/test/navigation/test_nested_frames.html | 35 +++ docshell/test/navigation/test_not-opener.html | 53 ++++ docshell/test/navigation/test_opener.html | 52 ++++ .../navigation/test_performance_navigation.html | 38 +++ .../navigation/test_popup-navigates-children.html | 69 ++++++ .../test_rate_limit_location_change.html | 96 ++++++++ docshell/test/navigation/test_reserved.html | 92 +++++++ .../test/navigation/test_scrollRestoration.html | 44 ++++ .../test_session_history_entry_cleanup.html | 35 +++ docshell/test/navigation/test_sessionhistory.html | 48 ++++ .../test_sessionhistory_document_write.html | 34 +++ .../navigation/test_shiftReload_and_pushState.html | 35 +++ .../navigation/test_sibling-matching-parent.html | 46 ++++ .../test/navigation/test_sibling-off-domain.html | 46 ++++ .../test/navigation/test_static_and_dynamic.html | 36 +++ .../test_triggeringprincipal_frame_nav.html | 69 ++++++ ..._triggeringprincipal_frame_same_origin_nav.html | 62 +++++ ...ggeringprincipal_iframe_iframe_window_open.html | 87 +++++++ ...ggeringprincipal_parent_iframe_window_open.html | 70 ++++++ .../test_triggeringprincipal_window_open.html | 79 ++++++ 119 files changed, 5046 insertions(+) create mode 100644 docshell/test/navigation/.eslintrc.js create mode 100644 docshell/test/navigation/NavigationUtils.js create mode 100644 docshell/test/navigation/blank.html create mode 100644 docshell/test/navigation/bluebox_bug430723.html create mode 100644 docshell/test/navigation/browser.ini create mode 100644 docshell/test/navigation/browser_bug343515.js create mode 100644 docshell/test/navigation/browser_ghistorymaxsize_is_0.js create mode 100644 docshell/test/navigation/browser_test-content-chromeflags.js create mode 100644 docshell/test/navigation/browser_test_bfcache_eviction.js create mode 100644 docshell/test/navigation/bug343515_pg1.html create mode 100644 docshell/test/navigation/bug343515_pg2.html create mode 100644 docshell/test/navigation/bug343515_pg3.html create mode 100644 docshell/test/navigation/bug343515_pg3_1.html create mode 100644 docshell/test/navigation/bug343515_pg3_1_1.html create mode 100644 docshell/test/navigation/bug343515_pg3_2.html create mode 100644 docshell/test/navigation/file_bug1300461.html create mode 100644 docshell/test/navigation/file_bug1300461_back.html create mode 100644 docshell/test/navigation/file_bug1300461_redirect.html create mode 100644 docshell/test/navigation/file_bug1300461_redirect.html^headers^ create mode 100644 docshell/test/navigation/file_bug1326251.html create mode 100644 docshell/test/navigation/file_bug1326251_evict_cache.html create mode 100644 docshell/test/navigation/file_bug1364364-1.html create mode 100644 docshell/test/navigation/file_bug1364364-2.html create mode 100644 docshell/test/navigation/file_bug1375833-frame1.html create mode 100644 docshell/test/navigation/file_bug1375833-frame2.html create mode 100644 docshell/test/navigation/file_bug1375833.html create mode 100644 docshell/test/navigation/file_bug1379762-1.html create mode 100644 docshell/test/navigation/file_bug1536471.html create mode 100644 docshell/test/navigation/file_bug1609475.html create mode 100644 docshell/test/navigation/file_bug386782_contenteditable.html create mode 100644 docshell/test/navigation/file_bug386782_designmode.html create mode 100644 docshell/test/navigation/file_bug462076_1.html create mode 100644 docshell/test/navigation/file_bug462076_2.html create mode 100644 docshell/test/navigation/file_bug462076_3.html create mode 100644 docshell/test/navigation/file_bug508537_1.html create mode 100644 docshell/test/navigation/file_bug534178.html create mode 100644 docshell/test/navigation/file_contentpolicy_block_window.html create mode 100644 docshell/test/navigation/file_docshell_gotoindex.html create mode 100644 docshell/test/navigation/file_document_write_1.html create mode 100644 docshell/test/navigation/file_fragment_handling_during_load.html create mode 100644 docshell/test/navigation/file_fragment_handling_during_load_frame1.html create mode 100644 docshell/test/navigation/file_fragment_handling_during_load_frame2.sjs create mode 100644 docshell/test/navigation/file_load_history_entry_page_with_one_link.html create mode 100644 docshell/test/navigation/file_load_history_entry_page_with_two_links.html create mode 100644 docshell/test/navigation/file_nested_frames.html create mode 100644 docshell/test/navigation/file_nested_frames_innerframe.html create mode 100644 docshell/test/navigation/file_scrollRestoration.html create mode 100644 docshell/test/navigation/file_shiftReload_and_pushState.html create mode 100644 docshell/test/navigation/file_static_and_dynamic_1.html create mode 100644 docshell/test/navigation/file_tell_opener.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_frame_1.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_frame_2.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_a.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_a_nav.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_b.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_parent_iframe_window_open_base.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_parent_iframe_window_open_nav.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_subframe.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_subframe_nav.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_subframe_same_origin_nav.html create mode 100644 docshell/test/navigation/file_triggeringprincipal_window_open.html create mode 100644 docshell/test/navigation/frame0.html create mode 100644 docshell/test/navigation/frame1.html create mode 100644 docshell/test/navigation/frame2.html create mode 100644 docshell/test/navigation/frame3.html create mode 100644 docshell/test/navigation/goback.html create mode 100644 docshell/test/navigation/iframe.html create mode 100644 docshell/test/navigation/iframe_static.html create mode 100644 docshell/test/navigation/mochitest.ini create mode 100644 docshell/test/navigation/navigate.html create mode 100644 docshell/test/navigation/navigation_target_popup_url.html create mode 100644 docshell/test/navigation/navigation_target_url.html create mode 100644 docshell/test/navigation/open.html create mode 100644 docshell/test/navigation/parent.html create mode 100644 docshell/test/navigation/redbox_bug430723.html create mode 100644 docshell/test/navigation/test_aboutblank_change_process.html create mode 100644 docshell/test/navigation/test_bug1300461.html create mode 100644 docshell/test/navigation/test_bug1326251.html create mode 100644 docshell/test/navigation/test_bug1364364.html create mode 100644 docshell/test/navigation/test_bug1375833.html create mode 100644 docshell/test/navigation/test_bug1379762.html create mode 100644 docshell/test/navigation/test_bug13871.html create mode 100644 docshell/test/navigation/test_bug145971.html create mode 100644 docshell/test/navigation/test_bug1536471.html create mode 100644 docshell/test/navigation/test_bug1609475.html create mode 100644 docshell/test/navigation/test_bug270414.html create mode 100644 docshell/test/navigation/test_bug278916.html create mode 100644 docshell/test/navigation/test_bug279495.html create mode 100644 docshell/test/navigation/test_bug344861.html create mode 100644 docshell/test/navigation/test_bug386782.html create mode 100644 docshell/test/navigation/test_bug430624.html create mode 100644 docshell/test/navigation/test_bug430723.html create mode 100644 docshell/test/navigation/test_child.html create mode 100644 docshell/test/navigation/test_contentpolicy_block_window.html create mode 100644 docshell/test/navigation/test_docshell_gotoindex.html create mode 100644 docshell/test/navigation/test_dynamic_frame_forward_back.html create mode 100644 docshell/test/navigation/test_fragment_handling_during_load.html create mode 100644 docshell/test/navigation/test_grandchild.html create mode 100644 docshell/test/navigation/test_load_history_entry.html create mode 100644 docshell/test/navigation/test_nested_frames.html create mode 100644 docshell/test/navigation/test_not-opener.html create mode 100644 docshell/test/navigation/test_opener.html create mode 100644 docshell/test/navigation/test_performance_navigation.html create mode 100644 docshell/test/navigation/test_popup-navigates-children.html create mode 100644 docshell/test/navigation/test_rate_limit_location_change.html create mode 100644 docshell/test/navigation/test_reserved.html create mode 100644 docshell/test/navigation/test_scrollRestoration.html create mode 100644 docshell/test/navigation/test_session_history_entry_cleanup.html create mode 100644 docshell/test/navigation/test_sessionhistory.html create mode 100644 docshell/test/navigation/test_sessionhistory_document_write.html create mode 100644 docshell/test/navigation/test_shiftReload_and_pushState.html create mode 100644 docshell/test/navigation/test_sibling-matching-parent.html create mode 100644 docshell/test/navigation/test_sibling-off-domain.html create mode 100644 docshell/test/navigation/test_static_and_dynamic.html create mode 100644 docshell/test/navigation/test_triggeringprincipal_frame_nav.html create mode 100644 docshell/test/navigation/test_triggeringprincipal_frame_same_origin_nav.html create mode 100644 docshell/test/navigation/test_triggeringprincipal_iframe_iframe_window_open.html create mode 100644 docshell/test/navigation/test_triggeringprincipal_parent_iframe_window_open.html create mode 100644 docshell/test/navigation/test_triggeringprincipal_window_open.html (limited to 'docshell/test/navigation') diff --git a/docshell/test/navigation/.eslintrc.js b/docshell/test/navigation/.eslintrc.js new file mode 100644 index 0000000000..af3d7f7c7f --- /dev/null +++ b/docshell/test/navigation/.eslintrc.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + extends: ["plugin:mozilla/browser-test", "plugin:mozilla/mochitest-test"], + + plugins: ["no-unsanitized"], + + rules: { + "no-unsanitized/method": "off", + }, +}; diff --git a/docshell/test/navigation/NavigationUtils.js b/docshell/test/navigation/NavigationUtils.js new file mode 100644 index 0000000000..4d9d40a3c6 --- /dev/null +++ b/docshell/test/navigation/NavigationUtils.js @@ -0,0 +1,203 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// ///////////////////////////////////////////////////////////////////////// +// +// Utilities for navigation tests +// +// ///////////////////////////////////////////////////////////////////////// + +var body = "This frame was navigated."; +var target_url = "navigation_target_url.html"; + +var popup_body = "This is a popup"; +var target_popup_url = "navigation_target_popup_url.html"; + +// ///////////////////////////////////////////////////////////////////////// +// Functions that navigate frames +// ///////////////////////////////////////////////////////////////////////// + +function navigateByLocation(wnd) { + try { + wnd.location = target_url; + } catch (ex) { + // We need to keep our finished frames count consistent. + // Oddly, this ends up simulating the behavior of IE7. + window.open(target_url, "_blank", "width=10,height=10"); + } +} + +function navigateByOpen(name) { + window.open(target_url, name, "width=10,height=10"); +} + +function navigateByForm(name) { + var form = document.createElement("form"); + form.action = target_url; + form.method = "POST"; + form.target = name; + document.body.appendChild(form); + form.submit(); +} + +var hyperlink_count = 0; + +async function navigateByHyperlink(name) { + var link = document.createElement("a"); + link.href = target_url; + link.target = name; + link.id = "navigation_hyperlink_" + hyperlink_count++; + document.body.appendChild(link); + await sendMouseEvent({ type: "click" }, link.id); +} + +// ///////////////////////////////////////////////////////////////////////// +// Functions that call into Mochitest framework +// ///////////////////////////////////////////////////////////////////////// + +async function isNavigated(wnd, message) { + var result = null; + try { + result = await SpecialPowers.spawn(wnd, [], () => + this.content.document.body.innerHTML.trim() + ); + } catch (ex) { + result = ex; + } + is(result, body, message); +} + +function isBlank(wnd, message) { + var result = null; + try { + result = wnd.document.body.innerHTML.trim(); + } catch (ex) { + result = ex; + } + is(result, "This is a blank document.", message); +} + +function isAccessible(wnd, message) { + try { + wnd.document.body.innerHTML; + ok(true, message); + } catch (ex) { + ok(false, message); + } +} + +function isInaccessible(wnd, message) { + try { + wnd.document.body.innerHTML; + ok(false, message); + } catch (ex) { + ok(true, message); + } +} + +function delay(msec) { + return new Promise(resolve => setTimeout(resolve, msec)); +} + +// ///////////////////////////////////////////////////////////////////////// +// Functions that uses SpecialPowers.spawn +// ///////////////////////////////////////////////////////////////////////// + +async function waitForFinishedFrames(numFrames) { + SimpleTest.requestFlakyTimeout("Polling"); + + var finishedWindows = new Set(); + + async function searchForFinishedFrames(win) { + try { + let { href, bodyText, readyState } = await SpecialPowers.spawn( + win, + [], + () => { + return { + href: this.content.location.href, + bodyText: + this.content.document.body && + this.content.document.body.textContent.trim(), + readyState: this.content.document.readyState, + }; + } + ); + + if ( + (href.endsWith(target_url) || href.endsWith(target_popup_url)) && + (bodyText == body || bodyText == popup_body) && + readyState == "complete" + ) { + finishedWindows.add(SpecialPowers.getBrowsingContextID(win)); + } + } catch (e) { + // This may throw if a frame is not fully initialized, in which + // case we'll handle it in a later iteration. + } + + for (let i = 0; i < win.frames.length; i++) { + await searchForFinishedFrames(win.frames[i]); + } + } + + while (finishedWindows.size < numFrames) { + await delay(500); + + for (let win of SpecialPowers.getGroupTopLevelWindows(window)) { + win = SpecialPowers.unwrap(win); + await searchForFinishedFrames(win); + } + } + + if (finishedWindows.size > numFrames) { + throw new Error("Too many frames loaded."); + } +} + +async function getFramesByName(name) { + let results = []; + for (let win of SpecialPowers.getGroupTopLevelWindows(window)) { + win = SpecialPowers.unwrap(win); + if ( + (await SpecialPowers.spawn(win, [], () => this.content.name)) === name + ) { + results.push(win); + } + } + + return results; +} + +async function cleanupWindows() { + for (let win of SpecialPowers.getGroupTopLevelWindows(window)) { + win = SpecialPowers.unwrap(win); + if (win.closed) { + continue; + } + + let href = ""; + try { + href = await SpecialPowers.spawn( + win, + [], + () => + this.content && this.content.location && this.content.location.href + ); + } catch (error) { + // SpecialPowers.spawn(win, ...) throws if win is closed. We did + // our best to not call it on a closed window, but races happen. + if (!win.closed) { + throw error; + } + } + + if ( + href && + (href.endsWith(target_url) || href.endsWith(target_popup_url)) + ) { + win.close(); + } + } +} diff --git a/docshell/test/navigation/blank.html b/docshell/test/navigation/blank.html new file mode 100644 index 0000000000..5360333f1d --- /dev/null +++ b/docshell/test/navigation/blank.html @@ -0,0 +1 @@ +This is a blank document. \ No newline at end of file diff --git a/docshell/test/navigation/bluebox_bug430723.html b/docshell/test/navigation/bluebox_bug430723.html new file mode 100644 index 0000000000..5dcc533562 --- /dev/null +++ b/docshell/test/navigation/bluebox_bug430723.html @@ -0,0 +1,6 @@ + + + +
+

This is a very tall blue box.

+
diff --git a/docshell/test/navigation/browser.ini b/docshell/test/navigation/browser.ini new file mode 100644 index 0000000000..f5b7f427df --- /dev/null +++ b/docshell/test/navigation/browser.ini @@ -0,0 +1,15 @@ +[DEFAULT] +support-files = + bug343515_pg1.html + bug343515_pg2.html + bug343515_pg3.html + bug343515_pg3_1.html + bug343515_pg3_1_1.html + bug343515_pg3_2.html + +[browser_test_bfcache_eviction.js] +skip-if = fission # bug 1665165 +[browser_bug343515.js] +[browser_test-content-chromeflags.js] +tags = openwindow +[browser_ghistorymaxsize_is_0.js] diff --git a/docshell/test/navigation/browser_bug343515.js b/docshell/test/navigation/browser_bug343515.js new file mode 100644 index 0000000000..35acf9a6b5 --- /dev/null +++ b/docshell/test/navigation/browser_bug343515.js @@ -0,0 +1,267 @@ +// Test for bug 343515 - Need API for tabbrowsers to tell docshells they're visible/hidden + +// Globals +var testPath = "http://mochi.test:8888/browser/docshell/test/navigation/"; +var ctx = {}; + +add_task(async function() { + // Step 1. + + // Get a handle on the initial tab + ctx.tab0 = gBrowser.selectedTab; + ctx.tab0Browser = gBrowser.getBrowserForTab(ctx.tab0); + + await BrowserTestUtils.waitForCondition( + () => ctx.tab0Browser.docShellIsActive, + "Timed out waiting for initial tab to be active." + ); + + // Open a New Tab + ctx.tab1 = BrowserTestUtils.addTab(gBrowser, testPath + "bug343515_pg1.html"); + ctx.tab1Browser = gBrowser.getBrowserForTab(ctx.tab1); + await BrowserTestUtils.browserLoaded(ctx.tab1Browser); + + // Step 2. + is( + testPath + "bug343515_pg1.html", + ctx.tab1Browser.currentURI.spec, + "Got expected tab 1 url in step 2" + ); + + // Our current tab should still be active + ok(ctx.tab0Browser.docShellIsActive, "Tab 0 should still be active"); + ok(!ctx.tab1Browser.docShellIsActive, "Tab 1 should not be active"); + + // Switch to tab 1 + await BrowserTestUtils.switchTab(gBrowser, ctx.tab1); + + // Tab 1 should now be active + ok(!ctx.tab0Browser.docShellIsActive, "Tab 0 should be inactive"); + ok(ctx.tab1Browser.docShellIsActive, "Tab 1 should be active"); + + // Open another tab + ctx.tab2 = BrowserTestUtils.addTab(gBrowser, testPath + "bug343515_pg2.html"); + ctx.tab2Browser = gBrowser.getBrowserForTab(ctx.tab2); + + await BrowserTestUtils.browserLoaded(ctx.tab2Browser); + + // Step 3. + is( + testPath + "bug343515_pg2.html", + ctx.tab2Browser.currentURI.spec, + "Got expected tab 2 url in step 3" + ); + + // Tab 0 should be inactive, Tab 1 should be active + ok(!ctx.tab0Browser.docShellIsActive, "Tab 0 should be inactive"); + ok(ctx.tab1Browser.docShellIsActive, "Tab 1 should be active"); + + // Tab 2's window _and_ its iframes should be inactive + ok(!ctx.tab2Browser.docShellIsActive, "Tab 2 should be inactive"); + + await SpecialPowers.spawn(ctx.tab2Browser, [], async function() { + Assert.equal(content.frames.length, 2, "Tab 2 should have 2 iframes"); + for (var i = 0; i < content.frames.length; i++) { + info("step 3, frame " + i + " info: " + content.frames[i].location); + let bc = content.frames[i].browsingContext; + Assert.ok(!bc.isActive, `Tab2 iframe ${i} should be inactive`); + } + }); + + // Navigate tab 2 to a different page + BrowserTestUtils.loadURI(ctx.tab2Browser, testPath + "bug343515_pg3.html"); + + await BrowserTestUtils.browserLoaded(ctx.tab2Browser); + + // Step 4. + + async function checkTab2Active(outerExpected) { + await SpecialPowers.spawn(ctx.tab2Browser, [outerExpected], async function( + expected + ) { + function isActive(aWindow) { + var docshell = aWindow.docShell; + info(`checking ${docshell.browsingContext.id}`); + return docshell.browsingContext.isActive; + } + + let active = expected ? "active" : "inactive"; + Assert.equal(content.frames.length, 2, "Tab 2 should have 2 iframes"); + for (var i = 0; i < content.frames.length; i++) { + info("step 4, frame " + i + " info: " + content.frames[i].location); + } + Assert.equal( + content.frames[0].frames.length, + 1, + "Tab 2 iframe 0 should have 1 iframes" + ); + Assert.equal( + isActive(content.frames[0]), + expected, + `Tab2 iframe 0 should be ${active}` + ); + Assert.equal( + isActive(content.frames[0].frames[0]), + expected, + `Tab2 iframe 0 subiframe 0 should be ${active}` + ); + Assert.equal( + isActive(content.frames[1]), + expected, + `Tab2 iframe 1 should be ${active}` + ); + }); + } + + is( + testPath + "bug343515_pg3.html", + ctx.tab2Browser.currentURI.spec, + "Got expected tab 2 url in step 4" + ); + + // Tab 0 should be inactive, Tab 1 should be active + ok(!ctx.tab0Browser.docShellIsActive, "Tab 0 should be inactive"); + ok(ctx.tab1Browser.docShellIsActive, "Tab 1 should be active"); + + // Tab2 and all descendants should be inactive + await checkTab2Active(false); + + // Switch to Tab 2 + await BrowserTestUtils.switchTab(gBrowser, ctx.tab2); + + // Check everything + ok(!ctx.tab0Browser.docShellIsActive, "Tab 0 should be inactive"); + ok(!ctx.tab1Browser.docShellIsActive, "Tab 1 should be inactive"); + ok(ctx.tab2Browser.docShellIsActive, "Tab 2 should be active"); + + await checkTab2Active(true); + + // Go back + let backDone = BrowserTestUtils.waitForContentEvent( + ctx.tab2Browser, + "pageshow" + ); + ctx.tab2Browser.goBack(); + await backDone; + + // Step 5. + + // Check everything + ok(!ctx.tab0Browser.docShellIsActive, "Tab 0 should be inactive"); + ok(!ctx.tab1Browser.docShellIsActive, "Tab 1 should be inactive"); + ok(ctx.tab2Browser.docShellIsActive, "Tab 2 should be active"); + is( + testPath + "bug343515_pg2.html", + ctx.tab2Browser.currentURI.spec, + "Got expected tab 2 url in step 5" + ); + + await SpecialPowers.spawn(ctx.tab2Browser, [], async function() { + for (var i = 0; i < content.frames.length; i++) { + let bc = content.frames[i].browsingContext; + Assert.ok(bc.isActive, `Tab2 iframe ${i} should be active`); + } + }); + + // Switch to tab 1 + await BrowserTestUtils.switchTab(gBrowser, ctx.tab1); + + // Navigate to page 3 + BrowserTestUtils.loadURI(ctx.tab1Browser, testPath + "bug343515_pg3.html"); + + await BrowserTestUtils.browserLoaded(ctx.tab1Browser); + + // Step 6. + + // Check everything + ok(!ctx.tab0Browser.docShellIsActive, "Tab 0 should be inactive"); + ok(ctx.tab1Browser.docShellIsActive, "Tab 1 should be active"); + is( + testPath + "bug343515_pg3.html", + ctx.tab1Browser.currentURI.spec, + "Got expected tab 1 url in step 6" + ); + + await SpecialPowers.spawn(ctx.tab1Browser, [], async function() { + function isActive(aWindow) { + var docshell = aWindow.docShell; + info(`checking ${docshell.browsingContext.id}`); + return docshell.browsingContext.isActive; + } + + Assert.ok(isActive(content.frames[0]), "Tab1 iframe 0 should be active"); + Assert.ok( + isActive(content.frames[0].frames[0]), + "Tab1 iframe 0 subiframe 0 should be active" + ); + Assert.ok(isActive(content.frames[1]), "Tab1 iframe 1 should be active"); + }); + + ok(!ctx.tab2Browser.docShellIsActive, "Tab 2 should be inactive"); + + await SpecialPowers.spawn(ctx.tab2Browser, [], async function() { + for (var i = 0; i < content.frames.length; i++) { + let bc = content.frames[i].browsingContext; + Assert.ok(!bc.isActive, `Tab2 iframe ${i} should be inactive`); + } + }); + + // Go forward on tab 2 + let forwardDone = BrowserTestUtils.waitForContentEvent( + ctx.tab2Browser, + "pageshow" + ); + ctx.tab2Browser.goForward(); + await forwardDone; + + // Step 7. + + async function checkBrowser(browser, outerTabNum, outerActive) { + let data = { tabNum: outerTabNum, active: outerActive }; + await SpecialPowers.spawn(browser, [data], async function({ + tabNum, + active, + }) { + function isActive(aWindow) { + var docshell = aWindow.docShell; + info(`checking ${docshell.browsingContext.id}`); + return docshell.browsingContext.isActive; + } + + let activestr = active ? "active" : "inactive"; + Assert.equal( + isActive(content.frames[0]), + active, + `Tab${tabNum} iframe 0 should be ${activestr}` + ); + Assert.equal( + isActive(content.frames[0].frames[0]), + active, + `Tab${tabNum} iframe 0 subiframe 0 should be ${activestr}` + ); + Assert.equal( + isActive(content.frames[1]), + active, + `Tab${tabNum} iframe 1 should be ${activestr}` + ); + }); + } + + // Check everything + ok(!ctx.tab0Browser.docShellIsActive, "Tab 0 should be inactive"); + ok(ctx.tab1Browser.docShellIsActive, "Tab 1 should be active"); + is( + testPath + "bug343515_pg3.html", + ctx.tab2Browser.currentURI.spec, + "Got expected tab 2 url in step 7" + ); + + await checkBrowser(ctx.tab1Browser, 1, true); + + ok(!ctx.tab2Browser.docShellIsActive, "Tab 2 should be inactive"); + await checkBrowser(ctx.tab2Browser, 2, false); + + // Close the tabs we made + BrowserTestUtils.removeTab(ctx.tab1); + BrowserTestUtils.removeTab(ctx.tab2); +}); diff --git a/docshell/test/navigation/browser_ghistorymaxsize_is_0.js b/docshell/test/navigation/browser_ghistorymaxsize_is_0.js new file mode 100644 index 0000000000..4034f63bd9 --- /dev/null +++ b/docshell/test/navigation/browser_ghistorymaxsize_is_0.js @@ -0,0 +1,81 @@ +add_task(async function() { + // The urls don't really matter as long as they are of the same origin + var URL = + "http://mochi.test:8888/browser/docshell/test/navigation/bug343515_pg1.html"; + var URL2 = + "http://mochi.test:8888/browser/docshell/test/navigation/bug343515_pg3_1.html"; + + // We want to test a specific code path that leads to this call + // https://searchfox.org/mozilla-central/rev/e7c61f4a68b974d5fecd216dc7407b631a24eb8f/docshell/base/nsDocShell.cpp#10795 + // when gHistoryMaxSize is 0 and mIndex and mRequestedIndex are -1 + + // 1. Navigate to URL + await BrowserTestUtils.withNewTab({ gBrowser, url: URL }, async function( + browser + ) { + // At this point, we haven't set gHistoryMaxSize to 0, and it is still 50 (default value). + if (SpecialPowers.Services.appinfo.sessionHistoryInParent) { + let sh = browser.browsingContext.sessionHistory; + is( + sh.count, + 1, + "We should have entry in session history because we haven't changed gHistoryMaxSize to be 0 yet" + ); + is( + sh.index, + 0, + "Shistory's current index should be 0 because we haven't purged history yet" + ); + } else { + await ContentTask.spawn(browser, null, () => { + var sh = content.window.docShell.QueryInterface(Ci.nsIWebNavigation) + .sessionHistory.legacySHistory; + is( + sh.count, + 1, + "We should have entry in session history because we haven't changed gHistoryMaxSize to be 0 yet" + ); + is( + sh.index, + 0, + "Shistory's current index should be 0 because we haven't purged history yet" + ); + }); + } + + var loadPromise = BrowserTestUtils.browserLoaded(browser, false, URL2); + // If we set the pref at the beginning of this page, then when we launch a child process + // to navigate to URL in Step 1, because of + // https://searchfox.org/mozilla-central/rev/e7c61f4a68b974d5fecd216dc7407b631a24eb8f/docshell/shistory/nsSHistory.cpp#308-312 + // this pref will be set to the default value (currently 50). Setting this pref after the child process launches + // is a robust way to make sure it stays 0 + await SpecialPowers.pushPrefEnv({ + set: [["browser.sessionhistory.max_entries", 0]], + }); + // 2. Navigate to URL2 + // We are navigating to a page with the same origin so that we will stay in the same process + BrowserTestUtils.loadURI(browser, URL2); + await loadPromise; + + // 3. Reload the browser with specific flags so that we end up here + // https://searchfox.org/mozilla-central/rev/e7c61f4a68b974d5fecd216dc7407b631a24eb8f/docshell/base/nsDocShell.cpp#10795 + var promise = BrowserTestUtils.browserLoaded(browser); + browser.reloadWithFlags(Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE); + await promise; + + if (SpecialPowers.Services.appinfo.sessionHistoryInParent) { + let sh = browser.browsingContext.sessionHistory; + is(sh.count, 0, "We should not save any entries in session history"); + is(sh.index, -1); + is(sh.requestedIndex, -1); + } else { + await ContentTask.spawn(browser, null, () => { + var sh = content.window.docShell.QueryInterface(Ci.nsIWebNavigation) + .sessionHistory.legacySHistory; + is(sh.count, 0, "We should not save any entries in session history"); + is(sh.index, -1); + is(sh.requestedIndex, -1); + }); + } + }); +}); diff --git a/docshell/test/navigation/browser_test-content-chromeflags.js b/docshell/test/navigation/browser_test-content-chromeflags.js new file mode 100644 index 0000000000..af527b2dbc --- /dev/null +++ b/docshell/test/navigation/browser_test-content-chromeflags.js @@ -0,0 +1,57 @@ +const TEST_PAGE = `data:text/html,Test`; +const { + CHROME_ALL, + CHROME_REMOTE_WINDOW, + CHROME_FISSION_WINDOW, +} = Ci.nsIWebBrowserChrome; + +/** + * Tests that when we open new browser windows from content they + * get the full browser chrome. + */ +add_task(async function() { + // Make sure that the window.open call will open a new + // window instead of a new tab. + await new Promise(resolve => { + SpecialPowers.pushPrefEnv( + { + set: [["browser.link.open_newwindow", 2]], + }, + resolve + ); + }); + + await BrowserTestUtils.withNewTab( + { + gBrowser, + url: TEST_PAGE, + }, + async function(browser) { + let openedPromise = BrowserTestUtils.waitForNewWindow(); + BrowserTestUtils.synthesizeMouse("a", 0, 0, {}, browser); + let win = await openedPromise; + + let chromeFlags = win.docShell.treeOwner + .QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIAppWindow).chromeFlags; + + let expected = CHROME_ALL; + + // In the multi-process tab case, the new window will have the + // CHROME_REMOTE_WINDOW flag set. + if (gMultiProcessBrowser) { + expected |= CHROME_REMOTE_WINDOW; + } + + // In the multi-process subframe case, the new window will have the + // CHROME_FISSION_WINDOW flag set. + if (gFissionBrowser) { + expected |= CHROME_FISSION_WINDOW; + } + + is(chromeFlags, expected, "Window should have opened with all chrome"); + + await BrowserTestUtils.closeWindow(win); + } + ); +}); diff --git a/docshell/test/navigation/browser_test_bfcache_eviction.js b/docshell/test/navigation/browser_test_bfcache_eviction.js new file mode 100644 index 0000000000..70cb258b7c --- /dev/null +++ b/docshell/test/navigation/browser_test_bfcache_eviction.js @@ -0,0 +1,96 @@ +add_task(async function() { + // We don't want the number of total viewers to be calculated by the available size + // for this test case. Instead, fix the number of viewers. + await SpecialPowers.pushPrefEnv({ + set: [ + ["browser.sessionhistory.max_total_viewers", 3], + ["docshell.shistory.testing.bfevict", true], + ], + }); + + // 1. Open a tab + var testPage = + "data:text/html,First tab ever opened"; + await BrowserTestUtils.withNewTab({ gBrowser, url: testPage }, async function( + browser + ) { + let testDone = {}; + if (!SpecialPowers.Services.appinfo.sessionHistoryInParent) { + // 2. Add a promise that will be resolved when the 'content viewer evicted' event goes off + testDone.promise = SpecialPowers.spawn(browser, [], async function() { + return new Promise(resolve => { + let webNavigation = content.docShell.QueryInterface( + Ci.nsIWebNavigation + ); + let { legacySHistory } = webNavigation.sessionHistory; + // 3. Register a session history listener to listen for a 'content viewer evicted' event. + let historyListener = { + OnContentViewerEvicted() { + ok( + true, + "History listener got called after a content viewer was evicted" + ); + legacySHistory.removeSHistoryListener(historyListener); + // 6. Resolve the promise when we got our 'content viewer evicted' event + resolve(); + }, + QueryInterface: ChromeUtils.generateQI([ + "nsISHistoryListener", + "nsISupportsWeakReference", + ]), + }; + legacySHistory.addSHistoryListener(historyListener); + // Keep the weak shistory listener alive + content._testListener = historyListener; + }); + }); + } else { + // 2. Add a promise that will be resolved when the 'content viewer evicted' event goes off + testDone.promise = new Promise(resolve => { + testDone.resolve = resolve; + }); + let shistory = browser.browsingContext.sessionHistory; + // 3. Register a session history listener to listen for a 'content viewer evicted' event. + let historyListener = { + OnContentViewerEvicted() { + ok( + true, + "History listener got called after a content viewer was evicted" + ); + shistory.removeSHistoryListener(historyListener); + delete window._testListener; + // 6. Resolve the promise when we got our 'content viewer evicted' event + testDone.resolve(); + }, + QueryInterface: ChromeUtils.generateQI([ + "nsISHistoryListener", + "nsISupportsWeakReference", + ]), + }; + shistory.addSHistoryListener(historyListener); + // Keep the weak shistory listener alive + window._testListener = historyListener; + } + + // 4. Open a second tab + testPage = `data:text/html,I am a second tab!`; + let tab2 = await BrowserTestUtils.openNewForegroundTab(gBrowser, testPage); + + // 5. Navigate the first tab to 4 different pages. + // We should get 1 content viewer evicted because it will be outside of the range. + // If we have the following pages in our session history: P1 P2 P3 P4 P5 + // and we are currently at P5, then P1 is outside of the range + // (it is more than 3 entries away from current entry) and thus will be evicted. + for (var i = 0; i < 4; i++) { + testPage = `data:text/html,${i}`; + let pagePromise = BrowserTestUtils.browserLoaded(browser); + BrowserTestUtils.loadURI(browser, testPage); + await pagePromise; + } + // 7. Wait for 'content viewer evicted' event to go off + await testDone.promise; + + // 8. Close the second tab + BrowserTestUtils.removeTab(tab2); + }); +}); diff --git a/docshell/test/navigation/bug343515_pg1.html b/docshell/test/navigation/bug343515_pg1.html new file mode 100644 index 0000000000..a8337c7f70 --- /dev/null +++ b/docshell/test/navigation/bug343515_pg1.html @@ -0,0 +1,5 @@ + + + Page 1 + + diff --git a/docshell/test/navigation/bug343515_pg2.html b/docshell/test/navigation/bug343515_pg2.html new file mode 100644 index 0000000000..c5f5665de5 --- /dev/null +++ b/docshell/test/navigation/bug343515_pg2.html @@ -0,0 +1,7 @@ + + + Page 2 + + + + diff --git a/docshell/test/navigation/bug343515_pg3.html b/docshell/test/navigation/bug343515_pg3.html new file mode 100644 index 0000000000..fdc79fbf7a --- /dev/null +++ b/docshell/test/navigation/bug343515_pg3.html @@ -0,0 +1,7 @@ + + + Page 3 + + + + diff --git a/docshell/test/navigation/bug343515_pg3_1.html b/docshell/test/navigation/bug343515_pg3_1.html new file mode 100644 index 0000000000..254164c9f0 --- /dev/null +++ b/docshell/test/navigation/bug343515_pg3_1.html @@ -0,0 +1,6 @@ + + + pg3 - iframe 0 + + + diff --git a/docshell/test/navigation/bug343515_pg3_1_1.html b/docshell/test/navigation/bug343515_pg3_1_1.html new file mode 100644 index 0000000000..be05b74888 --- /dev/null +++ b/docshell/test/navigation/bug343515_pg3_1_1.html @@ -0,0 +1 @@ +How far does the rabbit hole go? diff --git a/docshell/test/navigation/bug343515_pg3_2.html b/docshell/test/navigation/bug343515_pg3_2.html new file mode 100644 index 0000000000..7655eb526d --- /dev/null +++ b/docshell/test/navigation/bug343515_pg3_2.html @@ -0,0 +1 @@ +pg3 iframe 1 diff --git a/docshell/test/navigation/file_bug1300461.html b/docshell/test/navigation/file_bug1300461.html new file mode 100644 index 0000000000..d7abe8be90 --- /dev/null +++ b/docshell/test/navigation/file_bug1300461.html @@ -0,0 +1,61 @@ + + + + + Bug 1300461 + + + + + diff --git a/docshell/test/navigation/file_bug1300461_back.html b/docshell/test/navigation/file_bug1300461_back.html new file mode 100644 index 0000000000..ea014cce34 --- /dev/null +++ b/docshell/test/navigation/file_bug1300461_back.html @@ -0,0 +1,37 @@ + + + + + Bug 1300461 + + + + + + diff --git a/docshell/test/navigation/file_bug1300461_redirect.html b/docshell/test/navigation/file_bug1300461_redirect.html new file mode 100644 index 0000000000..979530c5cf --- /dev/null +++ b/docshell/test/navigation/file_bug1300461_redirect.html @@ -0,0 +1,10 @@ + + + + + Bug 1300461 + + + Redirect to file_bug1300461_back.html. + + diff --git a/docshell/test/navigation/file_bug1300461_redirect.html^headers^ b/docshell/test/navigation/file_bug1300461_redirect.html^headers^ new file mode 100644 index 0000000000..241b891826 --- /dev/null +++ b/docshell/test/navigation/file_bug1300461_redirect.html^headers^ @@ -0,0 +1,2 @@ +HTTP 301 Moved Permanently +Location: file_bug1300461_back.html diff --git a/docshell/test/navigation/file_bug1326251.html b/docshell/test/navigation/file_bug1326251.html new file mode 100644 index 0000000000..f252df98bf --- /dev/null +++ b/docshell/test/navigation/file_bug1326251.html @@ -0,0 +1,190 @@ + + + + + Bug 1326251 + + + +
+ +
+ + diff --git a/docshell/test/navigation/file_bug1326251_evict_cache.html b/docshell/test/navigation/file_bug1326251_evict_cache.html new file mode 100644 index 0000000000..0f46a26b87 --- /dev/null +++ b/docshell/test/navigation/file_bug1326251_evict_cache.html @@ -0,0 +1,27 @@ + + + + + Bug 1326251 + + + + + diff --git a/docshell/test/navigation/file_bug1364364-1.html b/docshell/test/navigation/file_bug1364364-1.html new file mode 100644 index 0000000000..d4ecc42ad4 --- /dev/null +++ b/docshell/test/navigation/file_bug1364364-1.html @@ -0,0 +1,33 @@ + + + + + title + + +

+
+
+ + + diff --git a/docshell/test/navigation/file_bug1364364-2.html b/docshell/test/navigation/file_bug1364364-2.html new file mode 100644 index 0000000000..6e52ecaaa9 --- /dev/null +++ b/docshell/test/navigation/file_bug1364364-2.html @@ -0,0 +1,14 @@ + + + + + title + + + + + diff --git a/docshell/test/navigation/file_bug1375833-frame1.html b/docshell/test/navigation/file_bug1375833-frame1.html new file mode 100644 index 0000000000..ea38326479 --- /dev/null +++ b/docshell/test/navigation/file_bug1375833-frame1.html @@ -0,0 +1,8 @@ + + + + + iframe test page 1 + + iframe test page 1 + diff --git a/docshell/test/navigation/file_bug1375833-frame2.html b/docshell/test/navigation/file_bug1375833-frame2.html new file mode 100644 index 0000000000..6e76ab7e47 --- /dev/null +++ b/docshell/test/navigation/file_bug1375833-frame2.html @@ -0,0 +1,8 @@ + + + + + iframe test page 2 + + iframe test page 2 + diff --git a/docshell/test/navigation/file_bug1375833.html b/docshell/test/navigation/file_bug1375833.html new file mode 100644 index 0000000000..373a7fe08e --- /dev/null +++ b/docshell/test/navigation/file_bug1375833.html @@ -0,0 +1,22 @@ + + + + + Test for bug 1375833 + + + + + + diff --git a/docshell/test/navigation/file_bug1379762-1.html b/docshell/test/navigation/file_bug1379762-1.html new file mode 100644 index 0000000000..c8cd666667 --- /dev/null +++ b/docshell/test/navigation/file_bug1379762-1.html @@ -0,0 +1,35 @@ + + + + + Bug 1379762 + + + + diff --git a/docshell/test/navigation/file_bug1536471.html b/docshell/test/navigation/file_bug1536471.html new file mode 100644 index 0000000000..53012257ee --- /dev/null +++ b/docshell/test/navigation/file_bug1536471.html @@ -0,0 +1,8 @@ + + + Nested Frame +
+ +
+ + diff --git a/docshell/test/navigation/file_bug1609475.html b/docshell/test/navigation/file_bug1609475.html new file mode 100644 index 0000000000..7699d46b08 --- /dev/null +++ b/docshell/test/navigation/file_bug1609475.html @@ -0,0 +1,51 @@ + + + + + + + + + \ No newline at end of file diff --git a/docshell/test/navigation/file_bug386782_contenteditable.html b/docshell/test/navigation/file_bug386782_contenteditable.html new file mode 100644 index 0000000000..4515d015d9 --- /dev/null +++ b/docshell/test/navigation/file_bug386782_contenteditable.html @@ -0,0 +1 @@ +

contentEditable

\ No newline at end of file diff --git a/docshell/test/navigation/file_bug386782_designmode.html b/docshell/test/navigation/file_bug386782_designmode.html new file mode 100644 index 0000000000..faa063cbae --- /dev/null +++ b/docshell/test/navigation/file_bug386782_designmode.html @@ -0,0 +1 @@ +

designModeDocument

\ No newline at end of file diff --git a/docshell/test/navigation/file_bug462076_1.html b/docshell/test/navigation/file_bug462076_1.html new file mode 100644 index 0000000000..5050e79fdc --- /dev/null +++ b/docshell/test/navigation/file_bug462076_1.html @@ -0,0 +1,55 @@ + + + Bug 462076 + + + +
+
+
+
+ + + diff --git a/docshell/test/navigation/file_bug462076_2.html b/docshell/test/navigation/file_bug462076_2.html new file mode 100644 index 0000000000..63cf3de3f9 --- /dev/null +++ b/docshell/test/navigation/file_bug462076_2.html @@ -0,0 +1,52 @@ + + + Bug 462076 + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/file_bug462076_3.html b/docshell/test/navigation/file_bug462076_3.html new file mode 100644 index 0000000000..5c779d2f49 --- /dev/null +++ b/docshell/test/navigation/file_bug462076_3.html @@ -0,0 +1,52 @@ + + + Bug 462076 + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/file_bug508537_1.html b/docshell/test/navigation/file_bug508537_1.html new file mode 100644 index 0000000000..182c085670 --- /dev/null +++ b/docshell/test/navigation/file_bug508537_1.html @@ -0,0 +1,33 @@ + + + + + +
Container:
+
+
Original frames:
+ + + + + diff --git a/docshell/test/navigation/file_bug534178.html b/docshell/test/navigation/file_bug534178.html new file mode 100644 index 0000000000..4d77dd824b --- /dev/null +++ b/docshell/test/navigation/file_bug534178.html @@ -0,0 +1,30 @@ + + + + + + + diff --git a/docshell/test/navigation/file_contentpolicy_block_window.html b/docshell/test/navigation/file_contentpolicy_block_window.html new file mode 100644 index 0000000000..c51e574e5e --- /dev/null +++ b/docshell/test/navigation/file_contentpolicy_block_window.html @@ -0,0 +1,5 @@ + + +This window should never be openend! + + diff --git a/docshell/test/navigation/file_docshell_gotoindex.html b/docshell/test/navigation/file_docshell_gotoindex.html new file mode 100644 index 0000000000..f3e8919822 --- /dev/null +++ b/docshell/test/navigation/file_docshell_gotoindex.html @@ -0,0 +1,42 @@ + + + + + + 1 + 2 + + \ No newline at end of file diff --git a/docshell/test/navigation/file_document_write_1.html b/docshell/test/navigation/file_document_write_1.html new file mode 100644 index 0000000000..be52b60231 --- /dev/null +++ b/docshell/test/navigation/file_document_write_1.html @@ -0,0 +1,18 @@ + + + + + +
static content
+ + diff --git a/docshell/test/navigation/file_fragment_handling_during_load.html b/docshell/test/navigation/file_fragment_handling_during_load.html new file mode 100644 index 0000000000..a7f468c32d --- /dev/null +++ b/docshell/test/navigation/file_fragment_handling_during_load.html @@ -0,0 +1,27 @@ + + + + + + + diff --git a/docshell/test/navigation/file_fragment_handling_during_load_frame1.html b/docshell/test/navigation/file_fragment_handling_during_load_frame1.html new file mode 100644 index 0000000000..c03ba2bda6 --- /dev/null +++ b/docshell/test/navigation/file_fragment_handling_during_load_frame1.html @@ -0,0 +1,6 @@ + + + +foo + + diff --git a/docshell/test/navigation/file_fragment_handling_during_load_frame2.sjs b/docshell/test/navigation/file_fragment_handling_during_load_frame2.sjs new file mode 100644 index 0000000000..e00d896947 --- /dev/null +++ b/docshell/test/navigation/file_fragment_handling_during_load_frame2.sjs @@ -0,0 +1,19 @@ +/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* vim: set sts=2 sw=2 et tw=80 ft=javascript: */ +"use strict"; + +function handleRequest(request, response) { + response.setHeader("Content-Type", "text/html", false); + response.setHeader("Cache-Control", "no-cache", false); + // Wait a bit. + var s = Date.now(); + while (Date.now() - s < 1000); + + response.write(` + + + bar + + + `); +} \ No newline at end of file diff --git a/docshell/test/navigation/file_load_history_entry_page_with_one_link.html b/docshell/test/navigation/file_load_history_entry_page_with_one_link.html new file mode 100644 index 0000000000..a4d1b62176 --- /dev/null +++ b/docshell/test/navigation/file_load_history_entry_page_with_one_link.html @@ -0,0 +1,7 @@ + + + +Link 1 +link 1 + + diff --git a/docshell/test/navigation/file_load_history_entry_page_with_two_links.html b/docshell/test/navigation/file_load_history_entry_page_with_two_links.html new file mode 100644 index 0000000000..4be2ea6f4e --- /dev/null +++ b/docshell/test/navigation/file_load_history_entry_page_with_two_links.html @@ -0,0 +1,9 @@ + + + +Link 1 +Link 2 +link 1 +link 2 + + diff --git a/docshell/test/navigation/file_nested_frames.html b/docshell/test/navigation/file_nested_frames.html new file mode 100644 index 0000000000..6ec286aa3e --- /dev/null +++ b/docshell/test/navigation/file_nested_frames.html @@ -0,0 +1,27 @@ + + + + + + + + + diff --git a/docshell/test/navigation/file_nested_frames_innerframe.html b/docshell/test/navigation/file_nested_frames_innerframe.html new file mode 100644 index 0000000000..e25b6a4f6a --- /dev/null +++ b/docshell/test/navigation/file_nested_frames_innerframe.html @@ -0,0 +1 @@ + diff --git a/docshell/test/navigation/file_scrollRestoration.html b/docshell/test/navigation/file_scrollRestoration.html new file mode 100644 index 0000000000..90044894e4 --- /dev/null +++ b/docshell/test/navigation/file_scrollRestoration.html @@ -0,0 +1,153 @@ + + + + + +
+  
+
Hello world
+ hash + + diff --git a/docshell/test/navigation/file_shiftReload_and_pushState.html b/docshell/test/navigation/file_shiftReload_and_pushState.html new file mode 100644 index 0000000000..7882143c83 --- /dev/null +++ b/docshell/test/navigation/file_shiftReload_and_pushState.html @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/docshell/test/navigation/file_static_and_dynamic_1.html b/docshell/test/navigation/file_static_and_dynamic_1.html new file mode 100644 index 0000000000..e66216c41e --- /dev/null +++ b/docshell/test/navigation/file_static_and_dynamic_1.html @@ -0,0 +1,31 @@ + + + + + +
Dynamic
+
+
Static
+
+ + diff --git a/docshell/test/navigation/file_tell_opener.html b/docshell/test/navigation/file_tell_opener.html new file mode 100644 index 0000000000..bd45c275e6 --- /dev/null +++ b/docshell/test/navigation/file_tell_opener.html @@ -0,0 +1,8 @@ + + Frame 1 + + diff --git a/docshell/test/navigation/file_triggeringprincipal_frame_1.html b/docshell/test/navigation/file_triggeringprincipal_frame_1.html new file mode 100644 index 0000000000..528437f892 --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_frame_1.html @@ -0,0 +1,27 @@ + + + + +Frame 1
+click me + + + + + diff --git a/docshell/test/navigation/file_triggeringprincipal_frame_2.html b/docshell/test/navigation/file_triggeringprincipal_frame_2.html new file mode 100644 index 0000000000..ef7cdfc178 --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_frame_2.html @@ -0,0 +1,8 @@ + + + + +Frame 2
+ + + diff --git a/docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_a.html b/docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_a.html new file mode 100644 index 0000000000..75b2933c1b --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_a.html @@ -0,0 +1,6 @@ + + + +Frame A + + diff --git a/docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_a_nav.html b/docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_a_nav.html new file mode 100644 index 0000000000..0479f5e1e5 --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_a_nav.html @@ -0,0 +1,6 @@ + + + +Frame A navigated by Frame B + + diff --git a/docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_b.html b/docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_b.html new file mode 100644 index 0000000000..e5d40b267a --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_iframe_iframe_window_open_frame_b.html @@ -0,0 +1,15 @@ + + + +Frame B navigating Frame A + + + + + + + diff --git a/docshell/test/navigation/file_triggeringprincipal_parent_iframe_window_open_base.html b/docshell/test/navigation/file_triggeringprincipal_parent_iframe_window_open_base.html new file mode 100644 index 0000000000..caa6b275b9 --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_parent_iframe_window_open_base.html @@ -0,0 +1,6 @@ + + + +base test frame + + diff --git a/docshell/test/navigation/file_triggeringprincipal_parent_iframe_window_open_nav.html b/docshell/test/navigation/file_triggeringprincipal_parent_iframe_window_open_nav.html new file mode 100644 index 0000000000..f4a4d0e631 --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_parent_iframe_window_open_nav.html @@ -0,0 +1,6 @@ + + + +navigated by window.open() + + diff --git a/docshell/test/navigation/file_triggeringprincipal_subframe.html b/docshell/test/navigation/file_triggeringprincipal_subframe.html new file mode 100644 index 0000000000..ba6b6dc09a --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_subframe.html @@ -0,0 +1,15 @@ + + + + +Sub Frame 2
+ + + diff --git a/docshell/test/navigation/file_triggeringprincipal_subframe_nav.html b/docshell/test/navigation/file_triggeringprincipal_subframe_nav.html new file mode 100644 index 0000000000..582181c00d --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_subframe_nav.html @@ -0,0 +1,21 @@ + + + + +Sub Frame 2 Navigated
+ + + + diff --git a/docshell/test/navigation/file_triggeringprincipal_subframe_same_origin_nav.html b/docshell/test/navigation/file_triggeringprincipal_subframe_same_origin_nav.html new file mode 100644 index 0000000000..c84e216ae8 --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_subframe_same_origin_nav.html @@ -0,0 +1,20 @@ + + + + +SubFrame Same-Origin Navigated
+ + + + diff --git a/docshell/test/navigation/file_triggeringprincipal_window_open.html b/docshell/test/navigation/file_triggeringprincipal_window_open.html new file mode 100644 index 0000000000..d0644a4d5c --- /dev/null +++ b/docshell/test/navigation/file_triggeringprincipal_window_open.html @@ -0,0 +1,6 @@ + + + +http + + diff --git a/docshell/test/navigation/frame0.html b/docshell/test/navigation/frame0.html new file mode 100644 index 0000000000..93d1c9c822 --- /dev/null +++ b/docshell/test/navigation/frame0.html @@ -0,0 +1,3 @@ + + Frame 0 + diff --git a/docshell/test/navigation/frame1.html b/docshell/test/navigation/frame1.html new file mode 100644 index 0000000000..4d06c09d1c --- /dev/null +++ b/docshell/test/navigation/frame1.html @@ -0,0 +1,3 @@ + + Frame 1 + diff --git a/docshell/test/navigation/frame2.html b/docshell/test/navigation/frame2.html new file mode 100644 index 0000000000..7a3b5e0b9b --- /dev/null +++ b/docshell/test/navigation/frame2.html @@ -0,0 +1,3 @@ + + Frame 2 + diff --git a/docshell/test/navigation/frame3.html b/docshell/test/navigation/frame3.html new file mode 100644 index 0000000000..fd24293873 --- /dev/null +++ b/docshell/test/navigation/frame3.html @@ -0,0 +1,3 @@ + + Frame 3 + diff --git a/docshell/test/navigation/goback.html b/docshell/test/navigation/goback.html new file mode 100644 index 0000000000..ce2968374e --- /dev/null +++ b/docshell/test/navigation/goback.html @@ -0,0 +1,5 @@ + + + window.history.go(-1); + + diff --git a/docshell/test/navigation/iframe.html b/docshell/test/navigation/iframe.html new file mode 100644 index 0000000000..4685fea7b7 --- /dev/null +++ b/docshell/test/navigation/iframe.html @@ -0,0 +1,8 @@ + + + + + diff --git a/docshell/test/navigation/iframe_static.html b/docshell/test/navigation/iframe_static.html new file mode 100644 index 0000000000..1bdd1437c1 --- /dev/null +++ b/docshell/test/navigation/iframe_static.html @@ -0,0 +1,8 @@ + + + Nested Frame +
+ +
+ + diff --git a/docshell/test/navigation/mochitest.ini b/docshell/test/navigation/mochitest.ini new file mode 100644 index 0000000000..9e5be6a625 --- /dev/null +++ b/docshell/test/navigation/mochitest.ini @@ -0,0 +1,122 @@ +[DEFAULT] +support-files = + NavigationUtils.js + navigation_target_url.html + navigation_target_popup_url.html + blank.html + file_bug386782_contenteditable.html + file_bug386782_designmode.html + redbox_bug430723.html + bluebox_bug430723.html + file_bug462076_1.html + file_bug462076_2.html + file_bug462076_3.html + file_bug508537_1.html + file_bug534178.html + file_document_write_1.html + file_fragment_handling_during_load.html + file_fragment_handling_during_load_frame1.html + file_fragment_handling_during_load_frame2.sjs + file_nested_frames.html + file_nested_frames_innerframe.html + file_scrollRestoration.html + file_shiftReload_and_pushState.html + file_static_and_dynamic_1.html + frame0.html + frame1.html + frame2.html + frame3.html + goback.html + iframe.html + iframe_static.html + navigate.html + open.html + parent.html + file_tell_opener.html + file_triggeringprincipal_frame_1.html + file_triggeringprincipal_frame_2.html + file_triggeringprincipal_subframe.html + file_triggeringprincipal_subframe_nav.html + file_triggeringprincipal_subframe_same_origin_nav.html + file_triggeringprincipal_window_open.html + file_triggeringprincipal_parent_iframe_window_open_base.html + file_triggeringprincipal_parent_iframe_window_open_nav.html + file_triggeringprincipal_iframe_iframe_window_open_frame_a.html + file_triggeringprincipal_iframe_iframe_window_open_frame_b.html + file_triggeringprincipal_iframe_iframe_window_open_frame_a_nav.html + file_load_history_entry_page_with_one_link.html + file_load_history_entry_page_with_two_links.html + file_bug1300461.html + file_bug1300461_redirect.html + file_bug1300461_redirect.html^headers^ + file_bug1300461_back.html + file_contentpolicy_block_window.html + file_bug1326251.html + file_bug1326251_evict_cache.html + file_bug1364364-1.html + file_bug1364364-2.html + file_bug1375833.html + file_bug1375833-frame1.html + file_bug1375833-frame2.html + test_bug145971.html + file_bug1609475.html + file_bug1379762-1.html + +[test_aboutblank_change_process.html] +[test_bug13871.html] +[test_bug270414.html] +[test_bug278916.html] +[test_bug279495.html] +[test_bug344861.html] +skip-if = toolkit == "android" || toolkit == "windows" # disabled on Windows because of bug 1234520 +[test_bug386782.html] +[test_bug430624.html] +[test_bug430723.html] +skip-if = (!debug && (os == 'mac' || os == 'win')) # Bug 874423 +[test_bug1364364.html] +skip-if = (os == "android") || fission # Bug 1560378, bug 1666449 +[test_bug1375833.html] +[test_bug1536471.html] +support-files = file_bug1536471.html +[test_child.html] +[test_docshell_gotoindex.html] +support-files = file_docshell_gotoindex.html +[test_grandchild.html] +[test_load_history_entry.html] +[test_not-opener.html] +[test_opener.html] +[test_popup-navigates-children.html] +[test_reserved.html] +skip-if = + (debug && e10s) # bug 1263213 + (os == 'mac' && os_version == '10.14') # Bug 1548821 +[test_performance_navigation.html] +skip-if = fission # bug 1666602 +[test_sessionhistory.html] +skip-if = verify && (os == 'mac') && debug && webrender # Hit MOZ_CRASH(Shutdown too long, probably frozen, causing a crash.) bug 1677545 +[test_dynamic_frame_forward_back.html] +[test_sessionhistory_document_write.html] +[test_session_history_entry_cleanup.html] +[test_fragment_handling_during_load.html] +[test_nested_frames.html] +[test_shiftReload_and_pushState.html] +[test_scrollRestoration.html] +skip-if = sessionHistoryInParent # It relies on the bfcache +[test_bug1609475.html] +[test_bug1300461.html] +fail-if = sessionHistoryInParent +[test_bug1326251.html] +skip-if = toolkit == 'android' || sessionHistoryInParent # It relies on the bfcache +[test_bug1379762.html] +skip-if = sessionHistoryInParent # It relies on the bfcache +[test_static_and_dynamic.html] +skip-if = true # This was disabled for a few years now anyway, bug 1677544 +[test_sibling-matching-parent.html] +[test_sibling-off-domain.html] +[test_triggeringprincipal_frame_nav.html] +[test_triggeringprincipal_frame_same_origin_nav.html] +[test_triggeringprincipal_window_open.html] +[test_triggeringprincipal_parent_iframe_window_open.html] +[test_triggeringprincipal_iframe_iframe_window_open.html] +[test_contentpolicy_block_window.html] +[test_rate_limit_location_change.html] diff --git a/docshell/test/navigation/navigate.html b/docshell/test/navigation/navigate.html new file mode 100644 index 0000000000..fe191f1d93 --- /dev/null +++ b/docshell/test/navigation/navigate.html @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/docshell/test/navigation/navigation_target_popup_url.html b/docshell/test/navigation/navigation_target_popup_url.html new file mode 100644 index 0000000000..cfe6de009d --- /dev/null +++ b/docshell/test/navigation/navigation_target_popup_url.html @@ -0,0 +1 @@ +This is a popup diff --git a/docshell/test/navigation/navigation_target_url.html b/docshell/test/navigation/navigation_target_url.html new file mode 100644 index 0000000000..a485e8133f --- /dev/null +++ b/docshell/test/navigation/navigation_target_url.html @@ -0,0 +1 @@ +This frame was navigated. diff --git a/docshell/test/navigation/open.html b/docshell/test/navigation/open.html new file mode 100644 index 0000000000..97eb9b76e1 --- /dev/null +++ b/docshell/test/navigation/open.html @@ -0,0 +1,9 @@ + + + + + diff --git a/docshell/test/navigation/parent.html b/docshell/test/navigation/parent.html new file mode 100644 index 0000000000..74722b8bdf --- /dev/null +++ b/docshell/test/navigation/parent.html @@ -0,0 +1,14 @@ + + + +This document contains a frame. +
+ + + + diff --git a/docshell/test/navigation/redbox_bug430723.html b/docshell/test/navigation/redbox_bug430723.html new file mode 100644 index 0000000000..c2d1f98092 --- /dev/null +++ b/docshell/test/navigation/redbox_bug430723.html @@ -0,0 +1,6 @@ + + + +
+

This is a very tall red box.

+
diff --git a/docshell/test/navigation/test_aboutblank_change_process.html b/docshell/test/navigation/test_aboutblank_change_process.html new file mode 100644 index 0000000000..bde79bd21c --- /dev/null +++ b/docshell/test/navigation/test_aboutblank_change_process.html @@ -0,0 +1,46 @@ + + + + + + + diff --git a/docshell/test/navigation/test_bug1300461.html b/docshell/test/navigation/test_bug1300461.html new file mode 100644 index 0000000000..b0b7d70c9e --- /dev/null +++ b/docshell/test/navigation/test_bug1300461.html @@ -0,0 +1,75 @@ + + + + + Test for Bug 1300461 + + + + +Mozilla Bug 1300461 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_bug1326251.html b/docshell/test/navigation/test_bug1326251.html new file mode 100644 index 0000000000..a04431a2c4 --- /dev/null +++ b/docshell/test/navigation/test_bug1326251.html @@ -0,0 +1,74 @@ + + + + + Test for Bug 1326251 + + + + +Mozilla Bug 1326251 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_bug1364364.html b/docshell/test/navigation/test_bug1364364.html new file mode 100644 index 0000000000..b237e5339f --- /dev/null +++ b/docshell/test/navigation/test_bug1364364.html @@ -0,0 +1,56 @@ + + + + + + Test for Bug 1364364 + + + + + +Mozilla Bug 1364364 +

+ +
+
+ + diff --git a/docshell/test/navigation/test_bug1375833.html b/docshell/test/navigation/test_bug1375833.html new file mode 100644 index 0000000000..49b6646ee3 --- /dev/null +++ b/docshell/test/navigation/test_bug1375833.html @@ -0,0 +1,136 @@ + + + + + + Test for Bug 1375833 + + + + + +Mozilla Bug 1375833 +

+ +
+
+ + diff --git a/docshell/test/navigation/test_bug1379762.html b/docshell/test/navigation/test_bug1379762.html new file mode 100644 index 0000000000..03afb20cad --- /dev/null +++ b/docshell/test/navigation/test_bug1379762.html @@ -0,0 +1,64 @@ + + + + + Test for Bug 1379762 + + + + +Mozilla Bug 1379762 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_bug13871.html b/docshell/test/navigation/test_bug13871.html new file mode 100644 index 0000000000..c3f54776aa --- /dev/null +++ b/docshell/test/navigation/test_bug13871.html @@ -0,0 +1,81 @@ + + + + + + + + + + + +Mozilla Bug 13871 +
+
+
+ + diff --git a/docshell/test/navigation/test_bug145971.html b/docshell/test/navigation/test_bug145971.html new file mode 100644 index 0000000000..ffad27a9c3 --- /dev/null +++ b/docshell/test/navigation/test_bug145971.html @@ -0,0 +1,29 @@ + + + + + + Testing bug 145971. + + diff --git a/docshell/test/navigation/test_bug1536471.html b/docshell/test/navigation/test_bug1536471.html new file mode 100644 index 0000000000..f37aedba21 --- /dev/null +++ b/docshell/test/navigation/test_bug1536471.html @@ -0,0 +1,75 @@ + + + + + + Test for Bug 1536471 + + + + + +Mozilla Bug +

+ +
+
+
+ + + + diff --git a/docshell/test/navigation/test_bug1609475.html b/docshell/test/navigation/test_bug1609475.html new file mode 100644 index 0000000000..4dbe7d17d6 --- /dev/null +++ b/docshell/test/navigation/test_bug1609475.html @@ -0,0 +1,35 @@ + + + + + Test for Bug 1609475 + + + + +Mozilla Bug 1609475 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_bug270414.html b/docshell/test/navigation/test_bug270414.html new file mode 100644 index 0000000000..317eabb54e --- /dev/null +++ b/docshell/test/navigation/test_bug270414.html @@ -0,0 +1,95 @@ + + + + + + + + + + + +Mozilla Bug 270414 +
+ + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/test_bug278916.html b/docshell/test/navigation/test_bug278916.html new file mode 100644 index 0000000000..9e2335721e --- /dev/null +++ b/docshell/test/navigation/test_bug278916.html @@ -0,0 +1,37 @@ + + + + + + + + + + +Mozilla Bug 278916 + +
+
+
+ + diff --git a/docshell/test/navigation/test_bug279495.html b/docshell/test/navigation/test_bug279495.html new file mode 100644 index 0000000000..fdbdbf6b9f --- /dev/null +++ b/docshell/test/navigation/test_bug279495.html @@ -0,0 +1,44 @@ + + + + + + + + + + +Mozilla Bug 279495 + +
+
+
+ + diff --git a/docshell/test/navigation/test_bug344861.html b/docshell/test/navigation/test_bug344861.html new file mode 100644 index 0000000000..76967b7b17 --- /dev/null +++ b/docshell/test/navigation/test_bug344861.html @@ -0,0 +1,35 @@ + + + + + Test for Bug 344861 + + + + +Mozilla Bug 344861 +

+ +
+
+
+ + + + diff --git a/docshell/test/navigation/test_bug386782.html b/docshell/test/navigation/test_bug386782.html new file mode 100644 index 0000000000..daa2ced74b --- /dev/null +++ b/docshell/test/navigation/test_bug386782.html @@ -0,0 +1,132 @@ + + + + + Test for Bug 386782 + + + + + + + + +Mozilla Bug 386782 +

+ +
+
+
+ + diff --git a/docshell/test/navigation/test_bug430624.html b/docshell/test/navigation/test_bug430624.html new file mode 100644 index 0000000000..fbdc5d2677 --- /dev/null +++ b/docshell/test/navigation/test_bug430624.html @@ -0,0 +1,57 @@ + + + + + Test for Bug 430624 + + + + + +Mozilla Bug 430624 +

+ + + + +
+
+
+ + + + + + diff --git a/docshell/test/navigation/test_bug430723.html b/docshell/test/navigation/test_bug430723.html new file mode 100644 index 0000000000..c2ba4b41c3 --- /dev/null +++ b/docshell/test/navigation/test_bug430723.html @@ -0,0 +1,124 @@ + + + + + Test for Bug 430723 + + + + + +Mozilla Bug 430723 +

+ +
+
+
+ + diff --git a/docshell/test/navigation/test_child.html b/docshell/test/navigation/test_child.html new file mode 100644 index 0000000000..7b621b4b78 --- /dev/null +++ b/docshell/test/navigation/test_child.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+ + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/test_contentpolicy_block_window.html b/docshell/test/navigation/test_contentpolicy_block_window.html new file mode 100644 index 0000000000..b7f463a57e --- /dev/null +++ b/docshell/test/navigation/test_contentpolicy_block_window.html @@ -0,0 +1,102 @@ + + + + + Test for Bug 1329288 + + + + +Mozilla Bug 1329288 + + + +This is a link + + + + diff --git a/docshell/test/navigation/test_docshell_gotoindex.html b/docshell/test/navigation/test_docshell_gotoindex.html new file mode 100644 index 0000000000..992c9c9dbe --- /dev/null +++ b/docshell/test/navigation/test_docshell_gotoindex.html @@ -0,0 +1,29 @@ + + + + + Bug 1684310 + + + + + +

+ + diff --git a/docshell/test/navigation/test_dynamic_frame_forward_back.html b/docshell/test/navigation/test_dynamic_frame_forward_back.html new file mode 100644 index 0000000000..f3a349e09a --- /dev/null +++ b/docshell/test/navigation/test_dynamic_frame_forward_back.html @@ -0,0 +1,35 @@ + + + + + Test for Bug 508537 + + + + +Mozilla Bug 508537 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_fragment_handling_during_load.html b/docshell/test/navigation/test_fragment_handling_during_load.html new file mode 100644 index 0000000000..9c082c2ecf --- /dev/null +++ b/docshell/test/navigation/test_fragment_handling_during_load.html @@ -0,0 +1,35 @@ + + + + + Test for fragment navigation during load + + + + +Mozilla Bug 978408 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_grandchild.html b/docshell/test/navigation/test_grandchild.html new file mode 100644 index 0000000000..1f78ca974c --- /dev/null +++ b/docshell/test/navigation/test_grandchild.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+ + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/test_load_history_entry.html b/docshell/test/navigation/test_load_history_entry.html new file mode 100644 index 0000000000..8ca3fcb913 --- /dev/null +++ b/docshell/test/navigation/test_load_history_entry.html @@ -0,0 +1,196 @@ + + + + + + + + + + +Bug 1539482 +

+ +
+
+
+ + + + diff --git a/docshell/test/navigation/test_nested_frames.html b/docshell/test/navigation/test_nested_frames.html new file mode 100644 index 0000000000..c3b49e0e23 --- /dev/null +++ b/docshell/test/navigation/test_nested_frames.html @@ -0,0 +1,35 @@ + + + + + Test for Bug 1090918 + + + + +Mozilla Bug 1090918 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_not-opener.html b/docshell/test/navigation/test_not-opener.html new file mode 100644 index 0000000000..aa215e4052 --- /dev/null +++ b/docshell/test/navigation/test_not-opener.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+
+
+ + diff --git a/docshell/test/navigation/test_opener.html b/docshell/test/navigation/test_opener.html new file mode 100644 index 0000000000..89f1c32187 --- /dev/null +++ b/docshell/test/navigation/test_opener.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+
+
+ + diff --git a/docshell/test/navigation/test_performance_navigation.html b/docshell/test/navigation/test_performance_navigation.html new file mode 100644 index 0000000000..55b4081a0d --- /dev/null +++ b/docshell/test/navigation/test_performance_navigation.html @@ -0,0 +1,38 @@ + + + + + Test for Bug 145971 + + + + +Mozilla Bug 145971 +

+ +
+
+
+ + diff --git a/docshell/test/navigation/test_popup-navigates-children.html b/docshell/test/navigation/test_popup-navigates-children.html new file mode 100644 index 0000000000..82d69e7982 --- /dev/null +++ b/docshell/test/navigation/test_popup-navigates-children.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +
+ + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/test_rate_limit_location_change.html b/docshell/test/navigation/test_rate_limit_location_change.html new file mode 100644 index 0000000000..3ca002a9c1 --- /dev/null +++ b/docshell/test/navigation/test_rate_limit_location_change.html @@ -0,0 +1,96 @@ + + + + + + Test for Bug 1314912 + + + + + +Mozilla Bug 1314912 +

+ +
+
+ + diff --git a/docshell/test/navigation/test_reserved.html b/docshell/test/navigation/test_reserved.html new file mode 100644 index 0000000000..0242f3941b --- /dev/null +++ b/docshell/test/navigation/test_reserved.html @@ -0,0 +1,92 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+
+
+
+
+ + diff --git a/docshell/test/navigation/test_scrollRestoration.html b/docshell/test/navigation/test_scrollRestoration.html new file mode 100644 index 0000000000..4b8d1b213c --- /dev/null +++ b/docshell/test/navigation/test_scrollRestoration.html @@ -0,0 +1,44 @@ + + + + + Test for Bug 1155730 + + + + +Mozilla Bug 1155730 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_session_history_entry_cleanup.html b/docshell/test/navigation/test_session_history_entry_cleanup.html new file mode 100644 index 0000000000..a55de0d6c3 --- /dev/null +++ b/docshell/test/navigation/test_session_history_entry_cleanup.html @@ -0,0 +1,35 @@ + + + + + Test for Bug 534178 + + + + +Mozilla Bug 534178 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_sessionhistory.html b/docshell/test/navigation/test_sessionhistory.html new file mode 100644 index 0000000000..2254ec876b --- /dev/null +++ b/docshell/test/navigation/test_sessionhistory.html @@ -0,0 +1,48 @@ + + + + + Test for Bug 462076 + + + + +Mozilla Bug 462076 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_sessionhistory_document_write.html b/docshell/test/navigation/test_sessionhistory_document_write.html new file mode 100644 index 0000000000..2a48a8154e --- /dev/null +++ b/docshell/test/navigation/test_sessionhistory_document_write.html @@ -0,0 +1,34 @@ + + + + + Test for Session history + document.write + + + + +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_shiftReload_and_pushState.html b/docshell/test/navigation/test_shiftReload_and_pushState.html new file mode 100644 index 0000000000..7525e2e21f --- /dev/null +++ b/docshell/test/navigation/test_shiftReload_and_pushState.html @@ -0,0 +1,35 @@ + + + + + Test for Bug 1003100 + + + + +Mozilla Bug 1003100 +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_sibling-matching-parent.html b/docshell/test/navigation/test_sibling-matching-parent.html new file mode 100644 index 0000000000..3c1bc768db --- /dev/null +++ b/docshell/test/navigation/test_sibling-matching-parent.html @@ -0,0 +1,46 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+ + + + +
+
+
+
+
+ + diff --git a/docshell/test/navigation/test_sibling-off-domain.html b/docshell/test/navigation/test_sibling-off-domain.html new file mode 100644 index 0000000000..cd70d1ae91 --- /dev/null +++ b/docshell/test/navigation/test_sibling-off-domain.html @@ -0,0 +1,46 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+ + + + +
+
+
+
+
+ + diff --git a/docshell/test/navigation/test_static_and_dynamic.html b/docshell/test/navigation/test_static_and_dynamic.html new file mode 100644 index 0000000000..ff72a8188c --- /dev/null +++ b/docshell/test/navigation/test_static_and_dynamic.html @@ -0,0 +1,36 @@ + + + + + Test for static and dynamic frames and forward-back + + + + +Mozilla Bug +

+ +
+  
+
+ + diff --git a/docshell/test/navigation/test_triggeringprincipal_frame_nav.html b/docshell/test/navigation/test_triggeringprincipal_frame_nav.html new file mode 100644 index 0000000000..a580995e11 --- /dev/null +++ b/docshell/test/navigation/test_triggeringprincipal_frame_nav.html @@ -0,0 +1,69 @@ + + + + + Bug 1181370 - Test triggeringPrincipal for iframe navigations + + + + + + + + + + + diff --git a/docshell/test/navigation/test_triggeringprincipal_frame_same_origin_nav.html b/docshell/test/navigation/test_triggeringprincipal_frame_same_origin_nav.html new file mode 100644 index 0000000000..b9790cd0fa --- /dev/null +++ b/docshell/test/navigation/test_triggeringprincipal_frame_same_origin_nav.html @@ -0,0 +1,62 @@ + + + + + Bug 1639195 - Test triggeringPrincipal for iframe same-origin navigations + + + + + + + + + + + diff --git a/docshell/test/navigation/test_triggeringprincipal_iframe_iframe_window_open.html b/docshell/test/navigation/test_triggeringprincipal_iframe_iframe_window_open.html new file mode 100644 index 0000000000..115c5f4462 --- /dev/null +++ b/docshell/test/navigation/test_triggeringprincipal_iframe_iframe_window_open.html @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + diff --git a/docshell/test/navigation/test_triggeringprincipal_parent_iframe_window_open.html b/docshell/test/navigation/test_triggeringprincipal_parent_iframe_window_open.html new file mode 100644 index 0000000000..1611ebf479 --- /dev/null +++ b/docshell/test/navigation/test_triggeringprincipal_parent_iframe_window_open.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + diff --git a/docshell/test/navigation/test_triggeringprincipal_window_open.html b/docshell/test/navigation/test_triggeringprincipal_window_open.html new file mode 100644 index 0000000000..439a125f97 --- /dev/null +++ b/docshell/test/navigation/test_triggeringprincipal_window_open.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + -- cgit v1.2.3