зеркало из https://github.com/mozilla/gecko-dev.git
Bug 844169 - Part 3: Make sure that all callers of HTMLIFrameElement.mozbrowser have chrome privileges; r=bzbarsky
This commit is contained in:
Родитель
6224f2c3ba
Коммит
d54e129c53
|
@ -34,7 +34,7 @@ function loadBrowser(isApp, callback) {
|
|||
if (isApp) {
|
||||
iframe.setAttribute("mozapp", APP_MANIFEST);
|
||||
}
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.src = APP_URL;
|
||||
document.getElementById("content").appendChild(iframe);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
ok("Browser prefs set.");
|
||||
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.id = "iframe";
|
||||
iframe.src = childFrameURL;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ function setUp() {
|
|||
function loadApp(callback) {
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.setAttribute("mozapp", APP_MANIFEST);
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.src = APP_URL;
|
||||
document.getElementById("content").appendChild(iframe);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
is(e.detail.message, 'Hello');
|
||||
|
|
|
@ -26,7 +26,7 @@ makeAllAppsLaunchable();
|
|||
|
||||
function testAppElement(expectAnApp, callback) {
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.setAttribute('mozapp', 'http://example.org/manifest.webapp');
|
||||
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
is(e.detail.message == 'app', expectAnApp, e.detail.message);
|
||||
|
|
|
@ -13,7 +13,7 @@ function runTest() {
|
|||
SpecialPowers.addPermission("embed-apps", true, document);
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe1).mozbrowser = true;
|
||||
iframe1.setAttribute('mozapp', 'http://example.org/manifest.webapp');
|
||||
|
||||
// Two mozapp frames for different apps with the same code both do the same
|
||||
|
@ -26,7 +26,7 @@ function runTest() {
|
|||
|
||||
SimpleTest.executeSoon(function() {
|
||||
var iframe2 = document.createElement('iframe');
|
||||
iframe2.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe2).mozbrowser = true;
|
||||
iframe2.setAttribute('mozapp', 'http://example.com/manifest.webapp');
|
||||
|
||||
iframe2.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
|
|
|
@ -17,7 +17,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
// Wait for the initial load to finish, then navigate the page, then start test
|
||||
|
|
|
@ -22,7 +22,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
addOneShotIframeEventListener('mozbrowserloadend', function() {
|
||||
SimpleTest.executeSoon(test2);
|
||||
|
|
|
@ -47,7 +47,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
iframe.src = 'data:text/html,<html>' +
|
||||
'<body style="background:green">hello</body></html>';
|
||||
|
|
|
@ -14,7 +14,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe1).mozbrowser = true;
|
||||
|
||||
// Two mozbrowser frames with the same code both do the same
|
||||
// window.open("foo", "bar") call. We should only get one
|
||||
|
@ -36,7 +36,7 @@ function runTest() {
|
|||
|
||||
SimpleTest.executeSoon(function() {
|
||||
var iframe2 = document.createElement('iframe');
|
||||
iframe2.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe2).mozbrowser = true;
|
||||
|
||||
iframe2.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
ok(false, "Got second mozbrowseropenwindow event.");
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
iframe.addEventListener("mozbrowserclose", function(e) {
|
||||
|
|
|
@ -22,11 +22,11 @@ function runTest() {
|
|||
// frame.
|
||||
|
||||
var appFrame = document.createElement('iframe');
|
||||
appFrame.mozbrowser = true;
|
||||
SpecialPowers.wrap(appFrame).mozbrowser = true;
|
||||
appFrame.setAttribute('mozapp', 'http://example.org/manifest.webapp');
|
||||
|
||||
var browserFrame = document.createElement('iframe');
|
||||
browserFrame.mozbrowser = true;
|
||||
SpecialPowers.wrap(browserFrame).mozbrowser = true;
|
||||
|
||||
var gotAppFrameClose = false;
|
||||
appFrame.addEventListener('mozbrowserclose', function() {
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
ok(true, "got openwindow event.");
|
||||
|
|
|
@ -34,7 +34,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe1).mozbrowser = true;
|
||||
document.body.appendChild(iframe1);
|
||||
iframe1.src = 'data:text/html,<html>' +
|
||||
'<body>' +
|
||||
|
|
|
@ -14,7 +14,7 @@ function runTest() {
|
|||
const innerPage = 'http://example.com/tests/dom/browser-element/mochitest/file_browserElement_CookiesNotThirdParty.html';
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
if (e.detail.message == 'next') {
|
||||
|
|
|
@ -12,7 +12,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe1).mozbrowser = true;
|
||||
iframe1.src = 'data:text/html,<html>' +
|
||||
'<body style="background:green">hello</body></html>';
|
||||
document.body.appendChild(iframe1);
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe1).mozbrowser = true;
|
||||
iframe1.id = 'iframe1';
|
||||
iframe1.addEventListener('mozbrowserloadend', function if1_loadend() {
|
||||
iframe1.removeEventListener('mozbrowserloadend', if1_loadend);
|
||||
|
|
|
@ -62,7 +62,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
runTestQueue([testFirstLoad, testReload, testChangeLocation]);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener("mozbrowsererror", function(e) {
|
||||
ok(true, "Got mozbrowsererror event.");
|
||||
|
|
|
@ -49,7 +49,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
testWyciwyg();
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
var gotFirstPaint = false;
|
||||
var gotFirstLocationChange = false;
|
||||
|
|
|
@ -13,7 +13,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.setAttribute('name', 'foo');
|
||||
|
||||
iframe.addEventListener("mozbrowseropenwindow", function(e) {
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframeJS = document.createElement('iframe');
|
||||
iframeJS.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframeJS).mozbrowser = true;
|
||||
|
||||
iframeJS.addEventListener('mozbrowserloadstart', function(e) {
|
||||
ok(false, "This should not happen!");
|
||||
|
@ -25,7 +25,7 @@ function runTest() {
|
|||
document.body.appendChild(iframeJS);
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
var gotPopup = false;
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
|
|
|
@ -12,7 +12,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe1).mozbrowser = true;
|
||||
document.body.appendChild(iframe1);
|
||||
iframe1.src = 'data:text/html,<html>' +
|
||||
'<body style="background:green">hello</body></html>';
|
||||
|
|
|
@ -19,14 +19,14 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe1).mozbrowser = true;
|
||||
document.body.appendChild(iframe1);
|
||||
|
||||
// iframe2 is a red herring; we modify its favicon but don't listen for
|
||||
// iconchanges; we want to make sure that its iconchange events aren't
|
||||
// picked up by the listener on iframe1.
|
||||
var iframe2 = document.createElement('iframe');
|
||||
iframe2.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe2).mozbrowser = true;
|
||||
document.body.appendChild(iframe2);
|
||||
|
||||
// iframe3 is another red herring. It's not a mozbrowser, so we shouldn't
|
||||
|
|
|
@ -23,7 +23,7 @@ browserElementTestHelpers.addPermission();
|
|||
browserElementTestHelpers.setOOPDisabledPref(true); // this is breaking the autofocus.
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.src = browserElementTestHelpers.focusPage;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function runTest() {
|
|||
var seenLocationChange = false;
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.id = 'iframe';
|
||||
iframe.src = browserElementTestHelpers.emptyPage1;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
// Add a first listener that we'll remove shortly after.
|
||||
|
|
|
@ -29,7 +29,7 @@ function runTest() {
|
|||
var remote = !browserElementTestHelpers.getOOPByDefaultPref();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.setAttribute('remote', remote);
|
||||
|
||||
// The page we load does window.open, then checks some things and reports
|
||||
|
|
|
@ -14,7 +14,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
var gotPopup = false;
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
var gotPopup = false;
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
ok(true, 'Got first window.open call');
|
||||
|
|
|
@ -17,7 +17,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
var gotPopup = false;
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
|
|
|
@ -12,7 +12,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
ok(e.detail.url.indexOf('does_not_exist.html') != -1,
|
||||
|
|
|
@ -16,7 +16,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
ok(e.detail.url.indexOf('does_not_exist.html') != -1,
|
||||
|
|
|
@ -26,7 +26,7 @@ catch(e) {}
|
|||
SpecialPowers.setIntPref(dialogTimeLimitPrefName, 10);
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
var numPrompts = 0;
|
||||
|
|
|
@ -15,7 +15,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
var prompts = [
|
||||
|
|
|
@ -22,7 +22,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
addOneShotIframeEventListener('mozbrowserloadend', function() {
|
||||
SimpleTest.executeSoon(test2);
|
||||
|
|
|
@ -22,7 +22,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowserloadend', mozbrowserLoaded);
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
isPostRequestSubmitted = false;
|
||||
iframe.src = 'file_post_request.html';
|
||||
|
|
|
@ -13,7 +13,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
iframe.addEventListener("mozbrowsershowmodalprompt", function(e) {
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
iframe.addEventListener("mozbrowserscroll", function(e) {
|
||||
|
|
|
@ -12,7 +12,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
var lastSecurityState;
|
||||
iframe.addEventListener('mozbrowsersecuritychange', function(e) {
|
||||
|
|
|
@ -11,7 +11,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
iframe.addEventListener("mozbrowserloadend", function onloadend(e) {
|
||||
|
|
|
@ -22,7 +22,7 @@ function runTest() {
|
|||
var mm;
|
||||
var numEvents = 0;
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe1).mozbrowser = true;
|
||||
iframe1.src = 'data:text/html,1';
|
||||
|
||||
document.body.appendChild(iframe1);
|
||||
|
|
|
@ -24,7 +24,7 @@ function runTest() {
|
|||
isInBrowserElement: true });
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
// Our test involves three <iframe mozbrowser>'s, parent, child1, and child2.
|
||||
// child1 and child2 are contained inside parent. child1 is visibile, and
|
||||
|
|
|
@ -18,7 +18,7 @@ function runTest() {
|
|||
isInBrowserElement: true });
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
// We need remote = false here until bug 761935 is fixed; see
|
||||
// SetVisibleFrames.js for an explanation.
|
||||
|
|
|
@ -20,7 +20,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowserloadend', loadend);
|
||||
iframe.src = 'data:text/html,<html>' +
|
||||
|
|
|
@ -12,7 +12,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
is(e.detail.url, 'http://example.com/');
|
||||
|
|
|
@ -12,7 +12,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
ok(false, 'Not expecting an openwindow event.');
|
||||
|
|
|
@ -11,14 +11,14 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe1).mozbrowser = true;
|
||||
document.body.appendChild(iframe1);
|
||||
|
||||
// iframe2 is a red herring; we modify its title but don't listen for
|
||||
// titlechanges; we want to make sure that its titlechange events aren't
|
||||
// picked up by the listener on iframe1.
|
||||
var iframe2 = document.createElement('iframe');
|
||||
iframe2.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe2).mozbrowser = true;
|
||||
document.body.appendChild(iframe2);
|
||||
|
||||
// iframe3 is another red herring. It's not a mozbrowser, so we shouldn't
|
||||
|
|
|
@ -17,7 +17,7 @@ function runTest() {
|
|||
dump("Got error: " + e + '\n');
|
||||
}
|
||||
});
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.src = 'data:text/html,Outer iframe <iframe id="inner-iframe"></iframe>';
|
||||
// For kicks, this test uses a display:none iframe. This shouldn't make a
|
||||
// difference in anything.
|
||||
|
|
|
@ -12,7 +12,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
// The page we load will fire an alert when it successfully loads.
|
||||
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
|
|
|
@ -30,7 +30,7 @@ function runTest() {
|
|||
var count = 0;
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.height = '1000px';
|
||||
|
||||
// The innermost page we load will fire an alert when it successfully loads.
|
||||
|
|
|
@ -30,7 +30,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
// Our child will create two iframes, so make sure this iframe is big enough
|
||||
// to show both of them without scrolling, so taking a screenshot gets both
|
||||
|
|
|
@ -14,7 +14,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
// The innermost page we load will fire an alert when it successfully loads.
|
||||
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
|
|
|
@ -41,7 +41,7 @@ js_template = textwrap.dedent("""\
|
|||
browserElementTestHelpers.addPermission();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
|
||||
// FILL IN TEST
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<script>
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
iframe.setAttribute("mozbrowser", "true");
|
||||
|
||||
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
if (e.detail.message == 'child:ready') {
|
||||
|
|
|
@ -27,11 +27,11 @@ function handlePrompt(e) {
|
|||
}
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
iframe1.setAttribute("mozbrowser", "true");
|
||||
iframe1.addEventListener('mozbrowsershowmodalprompt', handlePrompt);
|
||||
|
||||
var iframe2 = document.createElement('iframe');
|
||||
iframe2.mozbrowser = true;
|
||||
iframe2.setAttribute("mozbrowser", "true");
|
||||
iframe2.addEventListener('mozbrowsershowmodalprompt', handlePrompt);
|
||||
|
||||
iframe1.src = 'file_browserElement_SetVisibleFrames_Inner.html?child1';
|
||||
|
|
|
@ -26,7 +26,7 @@ function runTest() {
|
|||
browserElementTestHelpers.setEnabledPref(false);
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
iframe.addEventListener('mozbrowserloadstart', function() {
|
||||
|
|
|
@ -27,7 +27,7 @@ function runTest() {
|
|||
browserElementTestHelpers.addPermissionForUrl('http://foobar.com');
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
iframe.addEventListener('mozbrowserloadstart', function() {
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
function runTests() {
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.id = "iframe";
|
||||
iframe.style.width = "100%";
|
||||
iframe.style.height = "1000px";
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
|
||||
function runTests() {
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.id = "iframe";
|
||||
iframe.style.width = "100%";
|
||||
iframe.style.height = "1000px";
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
}
|
||||
function addRemoteFrame() {
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = true;
|
||||
SpecialPowers.wrap(iframe).mozbrowser = true;
|
||||
iframe.src = "data:text/html,<html style='background:blue;'>";
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
|
|
Загрузка…
Ссылка в новой задаче