Bug 902530 - Fix contentDocument usage from test wrapper function. r=jaws

This commit is contained in:
Georg Fritzsche 2013-08-12 22:51:09 +02:00
parent 3835d30a88
commit 2811ec0153
2 changed files with 4 additions and 4 deletions

View File

@ -100,8 +100,8 @@ function prepareTest(nextTest, url) {
// and schedules the function execution so they're definitely executed
// afterwards.
function runAfterPluginBindingAttached(func) {
let doc = gTestBrowser.contentDocument;
return function() {
let doc = gTestBrowser.contentDocument;
let elems = doc.getElementsByTagName('embed');
if (elems.length < 1) {
elems = doc.getElementsByTagName('object');

View File

@ -99,8 +99,8 @@ function prepareTest(nextTest, url) {
// and schedules the function execution so they're definitely executed
// afterwards.
function runAfterPluginBindingAttached(func) {
let doc = gTestBrowser.contentDocument;
return function() {
let doc = gTestBrowser.contentDocument;
let elems = doc.getElementsByTagName('embed');
if (elems.length < 1) {
elems = doc.getElementsByTagName('object');
@ -240,7 +240,7 @@ function test11a() {
var popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
ok(popupNotification, "Test 11a, Should have a click-to-play notification");
prepareTest(runAfterPluginBindingAttached(test11b), "about:blank");
prepareTest(test11b, "about:blank");
}
// Tests that the going back will reshow the notification for click-to-play plugins (part 2/4)
@ -519,7 +519,7 @@ function test19e() {
}
function test19f() {
prepareTest(runAfterPluginBindingAttached(test20a), gTestRoot + "plugin_hidden_to_visible.html");
prepareTest(test20a, gTestRoot + "plugin_hidden_to_visible.html");
}
// Tests that a plugin in a div that goes from style="display: none" to