From 7a88d73382353d7d0ab8dc4fe35ceb33457f9e67 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Fri, 17 May 2013 10:43:20 -0700 Subject: [PATCH] Bug 860941 - Tests. r=jst We augment the existing showModalDialog tests with test coverage for dialogArguments and returnValue. --- dom/tests/mochitest/bugs/file_bug504862.html | 4 +- .../general/file_showModalDialog.html | 26 ++++++++++--- .../general/test_showModalDialog.html | 37 ++++++++++++++++--- 3 files changed, 55 insertions(+), 12 deletions(-) diff --git a/dom/tests/mochitest/bugs/file_bug504862.html b/dom/tests/mochitest/bugs/file_bug504862.html index c1ce576f78d..dc11ced6ff7 100644 --- a/dom/tests/mochitest/bugs/file_bug504862.html +++ b/dom/tests/mochitest/bugs/file_bug504862.html @@ -8,8 +8,8 @@ if (location.toString().match(/^http:\/\/mochi.test:8888/)) { opener.is(window.dialogArguments, "my args", "dialog did not get the right arguments."); - // Load a different url, and test that it doesn't see the arguments. - window.location="data:text/html,';"; + // Load a different url, and test that it sees the arguments (since it's same origin). + window.location="data:text/html,';"; } else { // Post a message containing our arguments to the opener to test // that this cross origing dialog does *not* see the passed in diff --git a/dom/tests/mochitest/general/file_showModalDialog.html b/dom/tests/mochitest/general/file_showModalDialog.html index 3c816e41b32..6370d945ddf 100644 --- a/dom/tests/mochitest/general/file_showModalDialog.html +++ b/dom/tests/mochitest/general/file_showModalDialog.html @@ -2,18 +2,34 @@ - + diff --git a/dom/tests/mochitest/general/test_showModalDialog.html b/dom/tests/mochitest/general/test_showModalDialog.html index 383a53317fd..f2ad920c880 100644 --- a/dom/tests/mochitest/general/test_showModalDialog.html +++ b/dom/tests/mochitest/general/test_showModalDialog.html @@ -10,13 +10,40 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=862918