From 769d38e039b3c2bc3005e2192512ea9ac0a8b5b7 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 c1ce576f78d4..dc11ced6ff7e 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 3c816e41b321..6370d945ddf2 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 383a53317fd7..f2ad920c8803 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