Bug 783644 - Part 3: Test that dialog=1 in window.open called from <iframe mozbrowser> is ignored. r=smaug

This commit is contained in:
Justin Lebar 2012-08-20 09:30:09 -07:00
Родитель ba3252b24e
Коммит 1ac46a2171
3 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -23,7 +23,7 @@ function runTest() {
ok(/file_browserElement_Open2\.html$/.test(e.detail.url),
"Popup's URL (got " + e.detail.url + ")");
is(e.detail.name, "name");
is(e.detail.features, "features");
is(e.detail.features, "dialog=1");
});
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
@ -45,7 +45,7 @@ function runTest() {
/**
* file_browserElementOpen1 does
*
* window.open('file_browserElement_Open2.html', 'name', 'features')
* window.open('file_browserElement_Open2.html', 'name', 'dialog=1')
*
* then adds an event listener to the opened window and waits for onload.
*

Просмотреть файл

@ -29,7 +29,7 @@ function runTest() {
ok(/file_browserElement_Open2\.html$/.test(e.detail.url),
"Popup's URL (got " + e.detail.url + ")");
is(e.detail.name, "name");
is(e.detail.features, "features");
is(e.detail.features, "dialog=1");
});
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
@ -52,7 +52,7 @@ function runTest() {
* file_browserElement_OpenWindowInFrame.html loads
* file_browserElement_Open1.html in an iframe. Open1.html does
*
* window.open('file_browserElement_Open2.html', 'name', 'features')
* window.open('file_browserElement_Open2.html', 'name', 'dialog=1')
*
* then adds an event listener to the opened window and waits for onload.
*

Просмотреть файл

@ -20,7 +20,8 @@ function ok(bool, reason) {
alert((bool ? "success: " : "failure: ") + reason);
}
var w = window.open("file_browserElement_Open2.html", "name", "features");
// Send "dialog=1" as a test for bug 783644. It shouldn't have any effect.
var w = window.open("file_browserElement_Open2.html", "name", "dialog=1");
w.addEventListener("load", function() {
ok(true, "got load");
is(w.opener, window, 'opener property');