From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- docshell/test/navigation/NavigationUtils.js | 213 +++++++++++++++++ docshell/test/navigation/blank.html | 1 + docshell/test/navigation/browser.ini | 12 + docshell/test/navigation/browser_bug343515.js | 262 +++++++++++++++++++++ .../navigation/browser_test-content-chromeflags.js | 45 ++++ 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 | 63 +++++ docshell/test/navigation/file_bug1300461_back.html | 31 +++ .../test/navigation/file_bug1300461_redirect.html | 10 + .../file_bug1300461_redirect.html^headers^ | 2 + 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 | 34 +++ docshell/test/navigation/file_bug534178.html | 31 +++ .../test/navigation/file_document_write_1.html | 30 +++ .../file_fragment_handling_during_load.html | 24 ++ docshell/test/navigation/file_nested_frames.html | 28 +++ .../test/navigation/file_scrollRestoration.html | 137 +++++++++++ .../navigation/file_shiftReload_and_pushState.html | 29 +++ .../test/navigation/file_static_and_dynamic_1.html | 32 +++ .../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 ++ .../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/mochitest.ini | 64 +++++ docshell/test/navigation/navigate.html | 36 +++ docshell/test/navigation/open.html | 9 + docshell/test/navigation/parent.html | 14 ++ docshell/test/navigation/test_bug13871.html | 81 +++++++ docshell/test/navigation/test_bug270414.html | 93 ++++++++ docshell/test/navigation/test_bug278916.html | 37 +++ docshell/test/navigation/test_bug279495.html | 48 ++++ docshell/test/navigation/test_bug344861.html | 35 +++ docshell/test/navigation/test_bug386782.html | 137 +++++++++++ docshell/test/navigation/test_bug430624.html | 56 +++++ docshell/test/navigation/test_bug430723.html | 138 +++++++++++ docshell/test/navigation/test_child.html | 48 ++++ docshell/test/navigation/test_grandchild.html | 48 ++++ docshell/test/navigation/test_not-opener.html | 51 ++++ docshell/test/navigation/test_opener.html | 52 ++++ .../navigation/test_popup-navigates-children.html | 62 +++++ docshell/test/navigation/test_reserved.html | 100 ++++++++ docshell/test/navigation/test_sessionhistory.html | 68 ++++++ .../navigation/test_sibling-matching-parent.html | 46 ++++ .../test/navigation/test_sibling-off-domain.html | 46 ++++ .../test_triggeringprincipal_frame_nav.html | 69 ++++++ ...ggeringprincipal_iframe_iframe_window_open.html | 87 +++++++ ...ggeringprincipal_parent_iframe_window_open.html | 70 ++++++ .../test_triggeringprincipal_window_open.html | 101 ++++++++ 67 files changed, 2907 insertions(+) create mode 100644 docshell/test/navigation/NavigationUtils.js create mode 100644 docshell/test/navigation/blank.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_test-content-chromeflags.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_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_document_write_1.html create mode 100644 docshell/test/navigation/file_fragment_handling_during_load.html create mode 100644 docshell/test/navigation/file_nested_frames.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_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_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/mochitest.ini create mode 100644 docshell/test/navigation/navigate.html create mode 100644 docshell/test/navigation/open.html create mode 100644 docshell/test/navigation/parent.html create mode 100644 docshell/test/navigation/test_bug13871.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_grandchild.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_popup-navigates-children.html create mode 100644 docshell/test/navigation/test_reserved.html create mode 100644 docshell/test/navigation/test_sessionhistory.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_triggeringprincipal_frame_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/NavigationUtils.js b/docshell/test/navigation/NavigationUtils.js new file mode 100644 index 000000000..c90ea74d5 --- /dev/null +++ b/docshell/test/navigation/NavigationUtils.js @@ -0,0 +1,213 @@ +/* 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 = "data:text/html," + body + ""; + +var popup_body = "This is a popup"; +var target_popup_url = "data:text/html," + popup_body + ""; + +/////////////////////////////////////////////////////////////////////////// +// 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; + +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); + sendMouseEvent({type:"click"}, link.id); +} + +/////////////////////////////////////////////////////////////////////////// +// Functions that call into Mochitest framework +/////////////////////////////////////////////////////////////////////////// + +function isNavigated(wnd, message) { + var result = null; + try { + result = SpecialPowers.wrap(wnd).document.body.innerHTML; + } catch(ex) { + result = ex; + } + is(result, body, message); +} + +function isBlank(wnd, message) { + var result = null; + try { + result = wnd.document.body.innerHTML; + } 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); + } +} + +/////////////////////////////////////////////////////////////////////////// +// Functions that require UniversalXPConnect privilege +/////////////////////////////////////////////////////////////////////////// + +function xpcEnumerateContentWindows(callback) { + + var Ci = SpecialPowers.Ci; + var ww = SpecialPowers.Cc["@mozilla.org/embedcomp/window-watcher;1"] + .getService(Ci.nsIWindowWatcher); + var enumerator = ww.getWindowEnumerator(); + + var contentWindows = []; + + while (enumerator.hasMoreElements()) { + var win = enumerator.getNext(); + if (/ChromeWindow/.exec(win)) { + var docshellTreeNode = win.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShellTreeItem); + var childCount = docshellTreeNode.childCount; + for (var i = 0; i < childCount; ++i) { + var childTreeNode = docshellTreeNode.getChildAt(i); + + // we're only interested in content docshells + if (SpecialPowers.unwrap(childTreeNode.itemType) != Ci.nsIDocShellTreeItem.typeContent) + continue; + + var webNav = childTreeNode.QueryInterface(Ci.nsIWebNavigation); + contentWindows.push(webNav.document.defaultView); + } + } else { + contentWindows.push(win); + } + } + + while (contentWindows.length > 0) + callback(contentWindows.pop()); +} + +// Note: This only searches for top-level frames with this name. +function xpcGetFramesByName(name) { + var results = []; + + xpcEnumerateContentWindows(function(win) { + if (win.name == name) + results.push(win); + }); + + return results; +} + +function xpcCleanupWindows() { + xpcEnumerateContentWindows(function(win) { + if (win.location && win.location.protocol == "data:") + win.close(); + }); +} + +function xpcWaitForFinishedFrames(callback, numFrames) { + var finishedFrameCount = 0; + function frameFinished() { + finishedFrameCount++; + + if (finishedFrameCount == numFrames) { + clearInterval(frameWaitInterval); + setTimeout(callback, 0); + return; + } + + if (finishedFrameCount > numFrames) + throw "Too many frames loaded."; + } + + var finishedWindows = []; + + function contains(obj, arr) { + for (var i = 0; i < arr.length; i++) { + if (obj === arr[i]) + return true; + } + return false; + } + + function searchForFinishedFrames(win) { + if ((escape(unescape(win.location)) == escape(target_url) || + escape(unescape(win.location)) == escape(target_popup_url)) && + win.document && + win.document.body && + (win.document.body.textContent == body || + win.document.body.textContent == popup_body) && + win.document.readyState == "complete") { + + var util = win.QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor) + .getInterface(SpecialPowers.Ci.nsIDOMWindowUtils); + var windowId = util.outerWindowID; + if (!contains(windowId, finishedWindows)) { + finishedWindows.push(windowId); + frameFinished(); + } + } + for (var i = 0; i < win.frames.length; i++) + searchForFinishedFrames(win.frames[i]); + } + + function poll() { + try { + // This only gives us UniversalXPConnect for the current stack frame + // We're using setInterval, so the main page's privileges are still normal + xpcEnumerateContentWindows(searchForFinishedFrames); + } catch(ex) { + // We might be accessing windows before they are fully constructed, + // which can throw. We'll find those frames on our next poll(). + } + } + + var frameWaitInterval = setInterval(poll, 500); +} + diff --git a/docshell/test/navigation/blank.html b/docshell/test/navigation/blank.html new file mode 100644 index 000000000..5360333f1 --- /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/browser.ini b/docshell/test/navigation/browser.ini new file mode 100644 index 000000000..f25853f89 --- /dev/null +++ b/docshell/test/navigation/browser.ini @@ -0,0 +1,12 @@ +[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_bug343515.js] +[browser_test-content-chromeflags.js] +tags = openwindow \ No newline at end of file diff --git a/docshell/test/navigation/browser_bug343515.js b/docshell/test/navigation/browser_bug343515.js new file mode 100644 index 000000000..74152b493 --- /dev/null +++ b/docshell/test/navigation/browser_bug343515.js @@ -0,0 +1,262 @@ +// 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 = {}; + +// We need to wait until the page from each testcase is fully loaded, +// including all of its descendant iframes. To do that we manually count +// how many load events should happen on that page (one for the toplevel doc +// and one for each subframe) and wait until we receive the expected number +// of events. +function nShotsListener(aElem, aType, aCallback, aCount) { + let count = aCount; + aElem.addEventListener(aType, function listenerCallback() { + if (--count == 0) { + aElem.removeEventListener(aType, listenerCallback, true); + + // aCallback is executed asynchronously, which is handy because load + // events fire before mIsDocumentLoaded is actually set to true. :( + executeSoon(aCallback); + } + }, true); +} + +function oneShotListener(aElem, aType, aCallback) { + nShotsListener(aElem, aType, aCallback, 1); +} + +function waitForPageshow(aBrowser, callback) { + return ContentTask.spawn(aBrowser, null, function* () { + yield ContentTaskUtils.waitForEvent(this, "pageshow"); + }).then(callback); +} + +// Entry point from Mochikit +function test() { + + // Lots of callbacks going on here + waitForExplicitFinish(); + + // Begin the test + step1(); +} + +function step1() { + + // Get a handle on the initial tab + ctx.tab0 = gBrowser.selectedTab; + ctx.tab0Browser = gBrowser.getBrowserForTab(ctx.tab0); + + // Our current tab should be active + ok(ctx.tab0Browser.docShellIsActive, "Tab 0 should be active at test start"); + + // Open a New Tab + ctx.tab1 = gBrowser.addTab(testPath + "bug343515_pg1.html"); + ctx.tab1Browser = gBrowser.getBrowserForTab(ctx.tab1); + oneShotListener(ctx.tab1Browser, "load", step2); +} + +function step2() { + 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 + BrowserTestUtils.switchTab(gBrowser, ctx.tab1).then(() => { + // 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 = gBrowser.addTab(testPath + "bug343515_pg2.html"); + ctx.tab2Browser = gBrowser.getBrowserForTab(ctx.tab2); + + // bug343515_pg2.html consists of a page with two iframes, + // which will therefore generate 3 load events. + nShotsListener(ctx.tab2Browser, "load", step3, 3); + }); +} + +function step3() { + 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"); + ContentTask.spawn(ctx.tab2Browser, null, 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 docshell = content.frames[i].QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShell); + + Assert.ok(!docShell.isActive, `Tab2 iframe ${i} should be inactive`); + } + }).then(() => { + // Navigate tab 2 to a different page + ctx.tab2Browser.loadURI(testPath + "bug343515_pg3.html"); + + // bug343515_pg3.html consists of a page with two iframes, one of which + // contains another iframe, so there'll be a total of 4 load events + nShotsListener(ctx.tab2Browser, "load", step4, 4); + }); +} + +function step4() { + function checkTab2Active(expected) { + return ContentTask.spawn(ctx.tab2Browser, expected, function* (expected) { + function isActive(aWindow) { + var docshell = aWindow.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShell); + return docshell.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 + checkTab2Active(false).then(() => { + // Switch to Tab 2 + return BrowserTestUtils.switchTab(gBrowser, ctx.tab2); + }).then(() => { + // 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"); + + return checkTab2Active(true); + }).then(() => { + // Go back + waitForPageshow(ctx.tab2Browser, step5); + ctx.tab2Browser.goBack(); + }); +} + +function step5() { + // 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"); + ContentTask.spawn(ctx.tab2Browser, null, function* () { + for (var i = 0; i < content.frames.length; i++) { + let docshell = content.frames[i].QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShell); + + Assert.ok(docShell.isActive, `Tab2 iframe ${i} should be active`); + } + }).then(() => { + // Switch to tab 1 + return BrowserTestUtils.switchTab(gBrowser, ctx.tab1); + }).then(() => { + // Navigate to page 3 + ctx.tab1Browser.loadURI(testPath + "bug343515_pg3.html"); + + // bug343515_pg3.html consists of a page with two iframes, one of which + // contains another iframe, so there'll be a total of 4 load events + nShotsListener(ctx.tab1Browser, "load", step6, 4); + }); +} + +function step6() { + + // Check everything + ok(!ctx.tab0Browser.docShellIsActive, "Tab 0 should be inactive"); + ok(ctx.tab1Browser.docShellIsActive, "Tab 1 should be active"); + ContentTask.spawn(ctx.tab1Browser, null, function* () { + function isActive(aWindow) { + var docshell = aWindow.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShell); + return docshell.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"); + }).then(() => { + ok(!ctx.tab2Browser.docShellIsActive, "Tab 2 should be inactive"); + return ContentTask.spawn(ctx.tab2Browser, null, function* () { + for (var i = 0; i < content.frames.length; i++) { + let docshell = content.frames[i].QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShell); + + Assert.ok(!docShell.isActive, `Tab2 iframe ${i} should be inactive`); + } + }); + }).then(() => { + // Go forward on tab 2 + waitForPageshow(ctx.tab2Browser, step7); + ctx.tab2Browser.goForward(); + }); +} + +function step7() { + function checkBrowser(browser, tabNum, active) { + return ContentTask.spawn(browser, { tabNum, active }, + function* ({ tabNum, active }) { + function isActive(aWindow) { + var docshell = aWindow.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShell); + return docshell.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"); + checkBrowser(ctx.tab1Browser, 1, true).then(() => { + ok(!ctx.tab2Browser.docShellIsActive, "Tab 2 should be inactive"); + return checkBrowser(ctx.tab2Browser, 2, false); + }).then(() => { + // That's probably enough + allDone(); + }); +} + +function allDone() { + + // Close the tabs we made + gBrowser.removeTab(ctx.tab1); + gBrowser.removeTab(ctx.tab2); + + // Tell the framework we're done + finish(); +} 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 000000000..64559897c --- /dev/null +++ b/docshell/test/navigation/browser_test-content-chromeflags.js @@ -0,0 +1,45 @@ +const TEST_PAGE = `data:text/html,Test`; +const CHROME_ALL = Ci.nsIWebBrowserChrome.CHROME_ALL; +const CHROME_REMOTE_WINDOW = Ci.nsIWebBrowserChrome.CHROME_REMOTE_WINDOW; + +/** + * Tests that when we open new browser windows from content they + * get the full browser chrome. + */ +add_task(function* () { + // Make sure that the window.open call will open a new + // window instead of a new tab. + yield new Promise(resolve => { + SpecialPowers.pushPrefEnv({ + "set": [ + ["browser.link.open_newwindow", 2], + ] + }, resolve); + }); + + yield BrowserTestUtils.withNewTab({ + gBrowser, + url: TEST_PAGE + }, function*(browser) { + let openedPromise = BrowserTestUtils.waitForNewWindow(); + BrowserTestUtils.synthesizeMouse("a", 0, 0, {}, browser); + let win = yield openedPromise; + + let chromeFlags = win.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShellTreeItem) + .treeOwner + .QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIXULWindow) + .chromeFlags; + + // In the multi-process case, the new window will have the + // CHROME_REMOTE_WINDOW flag set. + const EXPECTED = gMultiProcessBrowser ? CHROME_ALL | CHROME_REMOTE_WINDOW + : CHROME_ALL; + + is(chromeFlags, EXPECTED, "Window should have opened with all chrome"); + + BrowserTestUtils.closeWindow(win); + }); +}); diff --git a/docshell/test/navigation/bug343515_pg1.html b/docshell/test/navigation/bug343515_pg1.html new file mode 100644 index 000000000..a8337c7f7 --- /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 000000000..c5f5665de --- /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 000000000..fdc79fbf7 --- /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 000000000..254164c9f --- /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 000000000..be05b7488 --- /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 000000000..7655eb526 --- /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 000000000..1ba935046 --- /dev/null +++ b/docshell/test/navigation/file_bug1300461.html @@ -0,0 +1,63 @@ + + + + + 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 000000000..7b187742f --- /dev/null +++ b/docshell/test/navigation/file_bug1300461_back.html @@ -0,0 +1,31 @@ + + + + + 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 000000000..979530c5c --- /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 000000000..241b89182 --- /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_bug462076_1.html b/docshell/test/navigation/file_bug462076_1.html new file mode 100644 index 000000000..5b7bf2b11 --- /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 000000000..813a6d840 --- /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 000000000..0079b9cdf --- /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 000000000..194165f43 --- /dev/null +++ b/docshell/test/navigation/file_bug508537_1.html @@ -0,0 +1,34 @@ + + + + + +
Container:
+
+
Original frames:
+ + + + + diff --git a/docshell/test/navigation/file_bug534178.html b/docshell/test/navigation/file_bug534178.html new file mode 100644 index 000000000..8bcedb6fb --- /dev/null +++ b/docshell/test/navigation/file_bug534178.html @@ -0,0 +1,31 @@ + + + + + + + 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 000000000..e0281f7cd --- /dev/null +++ b/docshell/test/navigation/file_document_write_1.html @@ -0,0 +1,30 @@ + + + + + +
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 000000000..fbfa0cb38 --- /dev/null +++ b/docshell/test/navigation/file_fragment_handling_during_load.html @@ -0,0 +1,24 @@ + + + + + + + diff --git a/docshell/test/navigation/file_nested_frames.html b/docshell/test/navigation/file_nested_frames.html new file mode 100644 index 000000000..f65d8e01b --- /dev/null +++ b/docshell/test/navigation/file_nested_frames.html @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/docshell/test/navigation/file_scrollRestoration.html b/docshell/test/navigation/file_scrollRestoration.html new file mode 100644 index 000000000..5450c2724 --- /dev/null +++ b/docshell/test/navigation/file_scrollRestoration.html @@ -0,0 +1,137 @@ + + + + + +
+  
+
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 000000000..5a777894b --- /dev/null +++ b/docshell/test/navigation/file_shiftReload_and_pushState.html @@ -0,0 +1,29 @@ + + + + + + + + + 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 000000000..692a5a9ab --- /dev/null +++ b/docshell/test/navigation/file_static_and_dynamic_1.html @@ -0,0 +1,32 @@ + + + + + +
Dynamic
+
+
Static
+
+ + 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 000000000..1e21e6421 --- /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 000000000..ef7cdfc17 --- /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 000000000..75b2933c1 --- /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 000000000..0479f5e1e --- /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 000000000..e5d40b267 --- /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 000000000..caa6b275b --- /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 000000000..f4a4d0e63 --- /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 000000000..0db1349f2 --- /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 000000000..3bf7097a6 --- /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_window_open.html b/docshell/test/navigation/file_triggeringprincipal_window_open.html new file mode 100644 index 000000000..d0644a4d5 --- /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 000000000..93d1c9c82 --- /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 000000000..4d06c09d1 --- /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 000000000..7a3b5e0b9 --- /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 000000000..fd2429387 --- /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 000000000..ce2968374 --- /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 000000000..4685fea7b --- /dev/null +++ b/docshell/test/navigation/iframe.html @@ -0,0 +1,8 @@ + + + + + diff --git a/docshell/test/navigation/mochitest.ini b/docshell/test/navigation/mochitest.ini new file mode 100644 index 000000000..0c35cf352 --- /dev/null +++ b/docshell/test/navigation/mochitest.ini @@ -0,0 +1,64 @@ +[DEFAULT] +support-files = + NavigationUtils.js + blank.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_nested_frames.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 + navigate.html + open.html + parent.html + file_triggeringprincipal_frame_1.html + file_triggeringprincipal_frame_2.html + file_triggeringprincipal_subframe.html + file_triggeringprincipal_subframe_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_bug1300461.html + file_bug1300461_redirect.html + file_bug1300461_redirect.html^headers^ + file_bug1300461_back.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 = (toolkit == 'android') || (!debug && (os == 'mac' || os == 'win')) # Bug 874423 +[test_child.html] +[test_grandchild.html] +[test_not-opener.html] +[test_opener.html] +[test_popup-navigates-children.html] +[test_reserved.html] +skip-if = (toolkit == 'android') || (debug && e10s) #too slow on Android 4.3 aws only; bug 1030403; bug 1263213 for debug e10s +[test_sessionhistory.html] +skip-if = toolkit == 'android' #RANDOM +[test_sibling-matching-parent.html] +[test_sibling-off-domain.html] +[test_triggeringprincipal_frame_nav.html] +[test_triggeringprincipal_window_open.html] +[test_triggeringprincipal_parent_iframe_window_open.html] +[test_triggeringprincipal_iframe_iframe_window_open.html] diff --git a/docshell/test/navigation/navigate.html b/docshell/test/navigation/navigate.html new file mode 100644 index 000000000..e686da423 --- /dev/null +++ b/docshell/test/navigation/navigate.html @@ -0,0 +1,36 @@ + + + + + + + + + + diff --git a/docshell/test/navigation/open.html b/docshell/test/navigation/open.html new file mode 100644 index 000000000..1bb70f865 --- /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 000000000..74722b8bd --- /dev/null +++ b/docshell/test/navigation/parent.html @@ -0,0 +1,14 @@ + + + +This document contains a frame. +
+ + + + diff --git a/docshell/test/navigation/test_bug13871.html b/docshell/test/navigation/test_bug13871.html new file mode 100644 index 000000000..e0b563a4a --- /dev/null +++ b/docshell/test/navigation/test_bug13871.html @@ -0,0 +1,81 @@ + + + + + + + + + + + +Mozilla Bug 13871 +
+
+
+ + diff --git a/docshell/test/navigation/test_bug270414.html b/docshell/test/navigation/test_bug270414.html new file mode 100644 index 000000000..98dcf42f8 --- /dev/null +++ b/docshell/test/navigation/test_bug270414.html @@ -0,0 +1,93 @@ + + + + + + + + + + + +Mozilla Bug 270414 +
+ + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/test_bug278916.html b/docshell/test/navigation/test_bug278916.html new file mode 100644 index 000000000..3ad6a9666 --- /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 000000000..79a169567 --- /dev/null +++ b/docshell/test/navigation/test_bug279495.html @@ -0,0 +1,48 @@ + + + + + + + + + + +Mozilla Bug 279495 + +
+
+
+ + diff --git a/docshell/test/navigation/test_bug344861.html b/docshell/test/navigation/test_bug344861.html new file mode 100644 index 000000000..f9759751c --- /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 000000000..2434963f1 --- /dev/null +++ b/docshell/test/navigation/test_bug386782.html @@ -0,0 +1,137 @@ + + + + + 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 000000000..9fc92e4cd --- /dev/null +++ b/docshell/test/navigation/test_bug430624.html @@ -0,0 +1,56 @@ + + + + + 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 000000000..eb53e0d22 --- /dev/null +++ b/docshell/test/navigation/test_bug430723.html @@ -0,0 +1,138 @@ + + + + + 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 000000000..c43e1a6cf --- /dev/null +++ b/docshell/test/navigation/test_child.html @@ -0,0 +1,48 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+ + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/test_grandchild.html b/docshell/test/navigation/test_grandchild.html new file mode 100644 index 000000000..439145b3e --- /dev/null +++ b/docshell/test/navigation/test_grandchild.html @@ -0,0 +1,48 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+ + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/test_not-opener.html b/docshell/test/navigation/test_not-opener.html new file mode 100644 index 000000000..d778f71d9 --- /dev/null +++ b/docshell/test/navigation/test_not-opener.html @@ -0,0 +1,51 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+
+
+ + diff --git a/docshell/test/navigation/test_opener.html b/docshell/test/navigation/test_opener.html new file mode 100644 index 000000000..bfb1dde9f --- /dev/null +++ b/docshell/test/navigation/test_opener.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+
+
+ + 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 000000000..692f35713 --- /dev/null +++ b/docshell/test/navigation/test_popup-navigates-children.html @@ -0,0 +1,62 @@ + + + + + + + + + + + +
+ + + + +
+
+
+
+ + diff --git a/docshell/test/navigation/test_reserved.html b/docshell/test/navigation/test_reserved.html new file mode 100644 index 000000000..b2389078c --- /dev/null +++ b/docshell/test/navigation/test_reserved.html @@ -0,0 +1,100 @@ + + + + + + + + + + + +Mozilla Bug 408052 +
+
+
+
+
+ + diff --git a/docshell/test/navigation/test_sessionhistory.html b/docshell/test/navigation/test_sessionhistory.html new file mode 100644 index 000000000..452271a41 --- /dev/null +++ b/docshell/test/navigation/test_sessionhistory.html @@ -0,0 +1,68 @@ + + + + + Test for Bug + + + + +Mozilla Bug +

+ +
+
+
+ + 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 000000000..dc8ec2f90 --- /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 000000000..ba7942798 --- /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_triggeringprincipal_frame_nav.html b/docshell/test/navigation/test_triggeringprincipal_frame_nav.html new file mode 100644 index 000000000..f8f97c678 --- /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_iframe_iframe_window_open.html b/docshell/test/navigation/test_triggeringprincipal_iframe_iframe_window_open.html new file mode 100644 index 000000000..cd6a9c056 --- /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 000000000..7cc6ee97d --- /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 000000000..d5d7f210b --- /dev/null +++ b/docshell/test/navigation/test_triggeringprincipal_window_open.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + -- cgit v1.2.3