Bug 960945 - MozConnection should be NoInterfaceObject, r=bz

This commit is contained in:
Andrea Marchesini 2014-02-03 16:16:27 +00:00
parent 3c296f449e
commit 6f848697a2
3 changed files with 3 additions and 8 deletions

View File

@ -13,10 +13,9 @@
<script type="application/javascript">
/** Test for Network API **/
function checkInterface(aInterface) {
ok(!(aInterface in window), aInterface + " should be prefixed");
ok(("Moz" + aInterface) in window, aInterface + " should be prefixed");
ok(!(aInterface in window), aInterface + " should not exist");
ok(!(("Moz" + aInterface) in window), aInterface + " should not exist");
}
function test() {
@ -24,8 +23,6 @@ function test() {
ok(navigator.mozConnection, "navigator.mozConnection returns an object");
ok(navigator.mozConnection instanceof MozConnection,
"navigator.mozConnection is a MozConnection object");
ok(navigator.mozConnection instanceof EventTarget,
"navigator.mozConnection is a EventTarget object");

View File

@ -610,8 +610,6 @@ var interfaceNamesInGlobalScope =
{name: "MozCellBroadcast", b2g: true, pref: "dom.cellbroadcast.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MozCellBroadcastEvent", b2g: true, pref: "dom.cellbroadcast.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MozConnection", pref: "dom.network.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
"mozContact",
// IMPORTANT: Do not change this list without review from a DOM peer!

View File

@ -3,7 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.network.enabled"]
[Pref="dom.network.enabled", NoInterfaceObject]
interface MozConnection : EventTarget {
readonly attribute unrestricted double bandwidth;
readonly attribute boolean metered;