зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1560400: Part 3 - Update DocShell frame navigation tests to support remote frames. r=nika
The tests still fail under Fission, because the mechanisms they use to navigate the frames don't work, but at least the checks for whether the navigation succeeded now do. That means the tests should start passing when the necessary APIs become Fission-compatible. Differential Revision: https://phabricator.services.mozilla.com/D35473 --HG-- extra : rebase_source : 6abaf14899403beec1b00ee78e4796a4446a5f64 extra : source : bf0f0e95c61c2a57d176699f05e71e967a13d3e8
This commit is contained in:
Родитель
f180f12646
Коммит
5f94103053
|
@ -55,10 +55,11 @@ function navigateByHyperlink(name) {
|
|||
// Functions that call into Mochitest framework
|
||||
// /////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function isNavigated(wnd, message) {
|
||||
async function isNavigated(wnd, message) {
|
||||
var result = null;
|
||||
try {
|
||||
result = SpecialPowers.wrap(wnd).document.body.innerHTML.trim();
|
||||
result = await SpecialPowers.spawn(
|
||||
wnd, [], () => this.content.document.body.innerHTML.trim());
|
||||
} catch (ex) {
|
||||
result = ex;
|
||||
}
|
||||
|
|
|
@ -61,11 +61,11 @@ function testChild3() {
|
|||
}
|
||||
}
|
||||
|
||||
xpcWaitForFinishedFrames(function() {
|
||||
isNavigated(frames[0], "Should be able to navigate on-domain opener's children by setting location.");
|
||||
isNavigated(frames[1], "Should be able to navigate on-domain opener's children by calling window.open.");
|
||||
isNavigated(frames[2], "Should be able to navigate on-domain opener's children by submitting form.");
|
||||
isNavigated(frames[3], "Should be able to navigate on-domain opener's children by targeted hyperlink.");
|
||||
xpcWaitForFinishedFrames(async function() {
|
||||
await isNavigated(frames[0], "Should be able to navigate on-domain opener's children by setting location.");
|
||||
await isNavigated(frames[1], "Should be able to navigate on-domain opener's children by calling window.open.");
|
||||
await isNavigated(frames[2], "Should be able to navigate on-domain opener's children by submitting form.");
|
||||
await isNavigated(frames[3], "Should be able to navigate on-domain opener's children by targeted hyperlink.");
|
||||
|
||||
window0.close();
|
||||
window1.close();
|
||||
|
|
|
@ -19,11 +19,11 @@ window.onload = function() {
|
|||
navigateByForm("child2");
|
||||
navigateByHyperlink("child3");
|
||||
|
||||
xpcWaitForFinishedFrames(function() {
|
||||
isNavigated(frames[0], "Should be able to navigate off-domain child by setting location.");
|
||||
isNavigated(frames[1], "Should be able to navigate off-domain child by calling window.open.");
|
||||
isNavigated(frames[2], "Should be able to navigate off-domain child by submitting form.");
|
||||
isNavigated(frames[3], "Should be able to navigate off-domain child by targeted hyperlink.");
|
||||
xpcWaitForFinishedFrames(async function() {
|
||||
await isNavigated(frames[0], "Should be able to navigate off-domain child by setting location.");
|
||||
await isNavigated(frames[1], "Should be able to navigate off-domain child by calling window.open.");
|
||||
await isNavigated(frames[2], "Should be able to navigate off-domain child by submitting form.");
|
||||
await isNavigated(frames[3], "Should be able to navigate off-domain child by targeted hyperlink.");
|
||||
|
||||
xpcCleanupWindows();
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -19,11 +19,11 @@ window.onload = function() {
|
|||
navigateByForm("child2_child0");
|
||||
navigateByHyperlink("child3_child0");
|
||||
|
||||
xpcWaitForFinishedFrames(function() {
|
||||
isNavigated(frames[0].frames[0], "Should be able to navigate off-domain grandchild by setting location.");
|
||||
isNavigated(frames[1].frames[0], "Should be able to navigate off-domain grandchild by calling window.open.");
|
||||
isNavigated(frames[2].frames[0], "Should be able to navigate off-domain grandchild by submitting form.");
|
||||
isNavigated(frames[3].frames[0], "Should be able to navigate off-domain grandchild by targeted hyperlink.");
|
||||
xpcWaitForFinishedFrames(async function() {
|
||||
await isNavigated(frames[0].frames[0], "Should be able to navigate off-domain grandchild by setting location.");
|
||||
await isNavigated(frames[1].frames[0], "Should be able to navigate off-domain grandchild by calling window.open.");
|
||||
await isNavigated(frames[2].frames[0], "Should be able to navigate off-domain grandchild by submitting form.");
|
||||
await isNavigated(frames[3].frames[0], "Should be able to navigate off-domain grandchild by targeted hyperlink.");
|
||||
|
||||
xpcCleanupWindows();
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -19,11 +19,11 @@ window.onload = function() {
|
|||
navigateByForm("window2");
|
||||
navigateByHyperlink("window3");
|
||||
|
||||
xpcWaitForFinishedFrames(function() {
|
||||
isNavigated(window0, "Should be able to navigate popup by setting location.");
|
||||
isNavigated(window1, "Should be able to navigate popup by calling window.open.");
|
||||
isNavigated(window2, "Should be able to navigate popup by submitting form.");
|
||||
isNavigated(window3, "Should be able to navigate popup by targeted hyperlink.");
|
||||
xpcWaitForFinishedFrames(async function() {
|
||||
await isNavigated(window0, "Should be able to navigate popup by setting location.");
|
||||
await isNavigated(window1, "Should be able to navigate popup by calling window.open.");
|
||||
await isNavigated(window2, "Should be able to navigate popup by submitting form.");
|
||||
await isNavigated(window3, "Should be able to navigate popup by targeted hyperlink.");
|
||||
|
||||
window0.close();
|
||||
window1.close();
|
||||
|
|
|
@ -35,11 +35,11 @@ function testChild3() {
|
|||
window3 = window.open("navigate.html#child3,hyperlink", "window3", "width=10,height=10");
|
||||
}
|
||||
|
||||
xpcWaitForFinishedFrames(function() {
|
||||
isNavigated(frames[0], "Should be able to navigate on-domain opener's children by setting location.");
|
||||
isNavigated(frames[1], "Should be able to navigate on-domain opener's children by calling window.open.");
|
||||
isNavigated(frames[2], "Should be able to navigate on-domain opener's children by submitting form.");
|
||||
isNavigated(frames[3], "Should be able to navigate on-domain opener's children by targeted hyperlink.");
|
||||
xpcWaitForFinishedFrames(async function() {
|
||||
await isNavigated(frames[0], "Should be able to navigate on-domain opener's children by setting location.");
|
||||
await isNavigated(frames[1], "Should be able to navigate on-domain opener's children by calling window.open.");
|
||||
await isNavigated(frames[2], "Should be able to navigate on-domain opener's children by submitting form.");
|
||||
await isNavigated(frames[3], "Should be able to navigate on-domain opener's children by targeted hyperlink.");
|
||||
|
||||
window0.close();
|
||||
window1.close();
|
||||
|
|
|
@ -16,11 +16,11 @@ window.onload = function() {
|
|||
'<iframe src="navigate.html#child2,form"></iframe>' +
|
||||
'<iframe src="navigate.html#child3,hyperlink"></iframe>';
|
||||
|
||||
xpcWaitForFinishedFrames(function() {
|
||||
isNavigated(frames[0], "Should be able to navigate sibling with on-domain parent by setting location.");
|
||||
isNavigated(frames[1], "Should be able to navigate sibling with on-domain parent by calling window.open.");
|
||||
isNavigated(frames[2], "Should be able to navigate sibling with on-domain parent by submitting form.");
|
||||
isNavigated(frames[3], "Should be able to navigate sibling with on-domain parent by targeted hyperlink.");
|
||||
xpcWaitForFinishedFrames(async function() {
|
||||
await isNavigated(frames[0], "Should be able to navigate sibling with on-domain parent by setting location.");
|
||||
await isNavigated(frames[1], "Should be able to navigate sibling with on-domain parent by calling window.open.");
|
||||
await isNavigated(frames[2], "Should be able to navigate sibling with on-domain parent by submitting form.");
|
||||
await isNavigated(frames[3], "Should be able to navigate sibling with on-domain parent by targeted hyperlink.");
|
||||
|
||||
xpcCleanupWindows();
|
||||
SimpleTest.finish();
|
||||
|
|
Загрузка…
Ссылка в новой задаче