From 13dc221813d7c748ce1242a91df5b96361a74f45 Mon Sep 17 00:00:00 2001 From: Peter Van der Beken Date: Tue, 8 Apr 2014 20:48:37 +0200 Subject: [PATCH] Bug 789261 - Enable WebIDL bindings for Window. r=bz. --HG-- extra : rebase_source : ae0d50133962c86ecdb7bf60f5ec8d359f681ac0 --- dom/base/test/test_openDialogChromeOnly.html | 7 +- dom/bindings/Bindings.conf | 4 - .../browsers/the-window-object/mochitest.ini | 1 - .../test_window-properties.html.json | 106 +----------------- .../test_window-prototype-chain.html.json | 5 - .../tests/mochitest/test_bug870423.html | 2 +- modules/libpref/src/init/all.js | 2 +- 7 files changed, 5 insertions(+), 122 deletions(-) delete mode 100644 dom/imptests/failures/html/html/browsers/the-window-object/test_window-prototype-chain.html.json diff --git a/dom/base/test/test_openDialogChromeOnly.html b/dom/base/test/test_openDialogChromeOnly.html index 8044078a7246..6548668c0c60 100644 --- a/dom/base/test/test_openDialogChromeOnly.html +++ b/dom/base/test/test_openDialogChromeOnly.html @@ -16,11 +16,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=931768 openDialog("chrome://browser/content/browser.xul"); ok(false, "Calling openDialog from unprivileged script should throw."); } catch (e) { - // FIXME e should be a ReferenceError once we switch Window to new WebIDL bindings - ok(e.name == "SecurityError", - "openDialog shouldn't be callable to unprivileged script."); - todo(e instanceof ReferenceError, - "openDialog shouldn't be available to unprivileged script."); + ok(e instanceof ReferenceError, + "openDialog shouldn't be available to unprivileged script."); } diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf index 08f64d675c34..dfb70aa32aa0 100644 --- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -217,7 +217,6 @@ DOMInterfaces = { 'ChromeWindow': { 'concrete': False, - 'register': False, }, 'ChromeWorker': { @@ -1556,10 +1555,7 @@ DOMInterfaces = { 'Window': { 'nativeType': 'nsGlobalWindow', - # When turning on Window, remember to drop the "'register': False" - # from ChromeWindow. 'hasXPConnectImpls': True, - 'register': False, 'binaryNames': { 'postMessage': 'postMessageMoz', }, diff --git a/dom/imptests/failures/html/html/browsers/the-window-object/mochitest.ini b/dom/imptests/failures/html/html/browsers/the-window-object/mochitest.ini index 4a218f1cbd20..98fa8dc55a8c 100644 --- a/dom/imptests/failures/html/html/browsers/the-window-object/mochitest.ini +++ b/dom/imptests/failures/html/html/browsers/the-window-object/mochitest.ini @@ -7,4 +7,3 @@ support-files = [test_window-named-properties.html.json] skip-if = true # bug 859075 [test_window-properties.html.json] -[test_window-prototype-chain.html.json] diff --git a/dom/imptests/failures/html/html/browsers/the-window-object/test_window-properties.html.json b/dom/imptests/failures/html/html/browsers/the-window-object/test_window-properties.html.json index 5b7543c6ead9..3a3aa7ffe992 100644 --- a/dom/imptests/failures/html/html/browsers/the-window-object/test_window-properties.html.json +++ b/dom/imptests/failures/html/html/browsers/the-window-object/test_window-properties.html.json @@ -2,29 +2,6 @@ "EventTarget method: addEventListener": true, "EventTarget method: removeEventListener": true, "EventTarget method: dispatchEvent": true, - "Window method: close": true, - "Window method: stop": true, - "Window method: focus": true, - "Window method: blur": true, - "Window method: open": true, - "Window method: alert": true, - "Window method: confirm": true, - "Window method: prompt": true, - "Window method: print": true, - "Window method: showModalDialog": true, - "Window method: postMessage": true, - "Window method: btoa": true, - "Window method: atob": true, - "Window method: setTimeout": true, - "Window method: clearTimeout": true, - "Window method: setInterval": true, - "Window method: clearInterval": true, - "Window method: getSelection": true, - "Window method: getComputedStyle": true, - "Window method: matchMedia": true, - "Window method: scroll": true, - "Window method: scrollTo": true, - "Window method: scrollBy": true, "Window readonly attribute: history": true, "Window readonly attribute: parent": true, "Window readonly attribute: frameElement": true, @@ -44,93 +21,12 @@ "Window readonly attribute: screenY": true, "Window readonly attribute: outerWidth": true, "Window readonly attribute: outerHeight": true, - "Window attribute: name": true, - "Window attribute: status": true, - "Window attribute: opener": true, - "Window attribute: onabort": true, - "Window attribute: onafterprint": true, - "Window attribute: onbeforeprint": true, - "Window attribute: onbeforeunload": true, - "Window attribute: onblur": true, - "Window attribute: oncancel": true, - "Window attribute: oncanplay": true, - "Window attribute: oncanplaythrough": true, - "Window attribute: onchange": true, - "Window attribute: onclick": true, - "Window attribute: onclose": true, - "Window attribute: oncontextmenu": true, - "Window attribute: oncuechange": true, - "Window attribute: ondblclick": true, - "Window attribute: ondrag": true, - "Window attribute: ondragend": true, - "Window attribute: ondragenter": true, - "Window attribute: ondragleave": true, - "Window attribute: ondragover": true, - "Window attribute: ondragstart": true, - "Window attribute: ondrop": true, - "Window attribute: ondurationchange": true, - "Window attribute: onemptied": true, - "Window attribute: onended": true, - "Window attribute: onerror": true, - "Window attribute: onfocus": true, - "Window attribute: onhashchange": true, - "Window attribute: oninput": true, - "Window attribute: oninvalid": true, - "Window attribute: onkeydown": true, - "Window attribute: onkeypress": true, - "Window attribute: onkeyup": true, "Window attribute: oncancel": true, "Window attribute: onclose": true, "Window attribute: oncuechange": true, "Window attribute: onmousewheel": true, - "Window attribute: onload": true, - "Window attribute: onloadeddata": true, - "Window attribute: onloadedmetadata": true, - "Window attribute: onloadstart": true, - "Window attribute: onmessage": true, - "Window attribute: onmousedown": true, - "Window attribute: onmousemove": true, - "Window attribute: onmouseout": true, - "Window attribute: onmouseover": true, - "Window attribute: onmouseup": true, - "Window attribute: onmousewheel": true, - "Window attribute: onoffline": true, - "Window attribute: ononline": true, - "Window attribute: onpause": true, - "Window attribute: onplay": true, - "Window attribute: onplaying": true, - "Window attribute: onpagehide": true, - "Window attribute: onpageshow": true, - "Window attribute: onpopstate": true, - "Window attribute: onprogress": true, - "Window attribute: onratechange": true, - "Window attribute: onreset": true, - "Window attribute: onresize": true, - "Window attribute: onscroll": true, - "Window attribute: onseeked": true, - "Window attribute: onseeking": true, - "Window attribute: onselect": true, - "Window attribute: onshow": true, - "Window attribute: onstalled": true, "Window attribute: onstorage": true, - "Window attribute: onsubmit": true, - "Window attribute: onsuspend": true, - "Window attribute: ontimeupdate": true, - "Window attribute: onunload": true, - "Window attribute: onvolumechange": true, - "Window attribute: onwaiting": true, "Window unforgeable attribute: window": true, "Window unforgeable attribute: document": true, - "Window unforgeable attribute: location": true, - "Window unforgeable attribute: top": true, - "Window replaceable attribute: self": true, - "Window replaceable attribute: locationbar": true, - "Window replaceable attribute: menubar": true, - "Window replaceable attribute: personalbar": true, - "Window replaceable attribute: scrollbars": true, - "Window replaceable attribute: statusbar": true, - "Window replaceable attribute: toolbar": true, - "Window replaceable attribute: frames": true, - "Window replaceable attribute: length": true, - "constructor": true + "Window unforgeable attribute: top": true } diff --git a/dom/imptests/failures/html/html/browsers/the-window-object/test_window-prototype-chain.html.json b/dom/imptests/failures/html/html/browsers/the-window-object/test_window-prototype-chain.html.json deleted file mode 100644 index 3c327bae8890..000000000000 --- a/dom/imptests/failures/html/html/browsers/the-window-object/test_window-prototype-chain.html.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Window.prototype": true, - "EventTarget.prototype": true, - "Object.prototype": true -} diff --git a/js/xpconnect/tests/mochitest/test_bug870423.html b/js/xpconnect/tests/mochitest/test_bug870423.html index b951585b602c..97e75195066e 100644 --- a/js/xpconnect/tests/mochitest/test_bug870423.html +++ b/js/xpconnect/tests/mochitest/test_bug870423.html @@ -22,7 +22,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=870423 check(window, sowin, 'Window', function(win) { return win; }); check(window, sowin, 'Location', function(win) { return win.location; }); - todo(xowin instanceof Window, "Cross-origin instanceof should work"); + ok(xowin instanceof Window, "Cross-origin instanceof should work"); todo(xowin.location instanceof Location, "Cross-origin instanceof should work"); SimpleTest.finish(); diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index 4f571cd3c789..73436357afe7 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -766,7 +766,7 @@ pref("dom.webapps.useCurrentProfile", false); pref("dom.cycle_collector.incremental", true); -pref("dom.window_experimental_bindings", false); +pref("dom.window_experimental_bindings", true); // Parsing perf prefs. For now just mimic what the old code did. #ifndef XP_WIN