--- a/dom/alarm/moz.build
+++ b/dom/alarm/moz.build
@@ -29,9 +29,11 @@ EXTRA_JS_MODULES += [
]
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
+MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
+
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
new file mode 100644
--- /dev/null
+++ b/dom/alarm/test/chrome.ini
@@ -0,0 +1,7 @@
+[DEFAULT]
+run-if = buildapp == 'b2g' || buildapp == 'mulet'
+support-files =
+ file_empty.html
+ system_message_chrome_script.js
+
+[test_alarm_permitted_app.html]
--- a/dom/alarm/test/mochitest.ini
+++ b/dom/alarm/test/mochitest.ini
@@ -1,21 +1,14 @@
[DEFAULT]
+run-if = buildapp == 'b2g' || buildapp == 'mulet'
support-files =
file_empty.html
system_message_chrome_script.js
[test_alarm_add_data.html]
-skip-if = ((buildapp == 'b2g') && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_alarm_add_date.html]
-skip-if = ((buildapp == 'b2g') && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_alarm_add_respectTimezone.html]
-skip-if = ((buildapp == 'b2g') && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_alarm_non_permitted_app.html]
-[test_alarm_permitted_app.html]
[test_alarm_remove.html]
-skip-if = ((buildapp == 'b2g') && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_bug1015540.html]
-skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_bug1037079.html]
-skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_bug1090896.html]
-skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
--- a/dom/alarm/test/test_alarm_permitted_app.html
+++ b/dom/alarm/test/test_alarm_permitted_app.html
@@ -1,28 +1,26 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test Permitted Application for Alarm API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript">
"use strict";
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [["dom.mozAlarms.enabled", true]]}, function() {
- SpecialPowers.addPermission("alarms", true, document);
-
// mozAlarms is installed on all platforms except Android for the moment.
if (navigator.appVersion.indexOf("Android") != -1) {
try {
todo('mozAlarms' in navigator,
"mozAlarms is not allowed on Android for now. TODO Bug 863557.");
} catch (e) {
todo(!e, "('mozAlarms' in navigator) should not throw exceptions once " +
"mozAlarms is installed on Android. TODO Bug 863557. " +
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -113,18 +113,16 @@
#include "WorkerPrivate.h"
#include "WorkerRunnable.h"
#if defined(XP_LINUX)
#include "mozilla/Hal.h"
#endif
#include "mozilla/dom/ContentChild.h"
-#include "mozilla/dom/FeatureList.h"
-
#ifdef MOZ_EME
#include "mozilla/EMEUtils.h"
#include "mozilla/DetailedPromise.h"
#endif
#ifdef MOZ_WIDGET_GONK
#include <cutils/properties.h>
#endif
@@ -1787,21 +1785,17 @@ Navigator::HasFeature(const nsAString& a
}
#endif
if (featureName.EqualsLiteral("XMLHttpRequest.mozSystem")) {
p->MaybeResolve(true);
return p.forget();
}
- if (IsFeatureDetectible(featureName)) {
- p->MaybeResolve(true);
- } else {
- p->MaybeResolve(JS::UndefinedHandleValue);
- }
+ p->MaybeResolve(JS::UndefinedHandleValue);
return p.forget();
}
// resolve with <undefined> because the feature name is not supported
p->MaybeResolve(JS::UndefinedHandleValue);
return p.forget();
}
--- a/dom/base/test/chrome.ini
+++ b/dom/base/test/chrome.ini
@@ -1,25 +1,31 @@
[DEFAULT]
skip-if = buildapp == 'b2g' || os == 'android'
support-files =
file_empty.html
file_bug945152.jar
file_bug945152_worker.js
file_bug1008126_worker.js
+ mozbrowser_api_utils.js
[test_anonymousContent_xul_window.xul]
[test_bug715041.xul]
[test_bug715041_removal.xul]
[test_domrequesthelper.xul]
[test_navigator_resolve_identity_xrays.xul]
support-files = file_navigator_resolve_identity_xrays.xul
+[test_navigator_resolve_identity.html]
+support-files = file_navigator_resolve_identity.html
[test_sendQueryContentAndSelectionSetEvent.html]
[test_bug1016960.html]
[test_copypaste.xul]
subsuite = clipboard
[test_messagemanager_principal.html]
[test_messagemanager_send_principal.html]
skip-if = buildapp == 'mulet'
[test_bug945152.html]
[test_bug1008126.html]
[test_sandboxed_blob_uri.html]
[test_websocket_frame.html]
+[test_getFeature_with_perm.html]
+[test_hasFeature.html]
+[test_mozbrowser_apis_allowed.html]
new file mode 100644
--- /dev/null
+++ b/dom/base/test/file_navigator_resolve_identity.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=985827
+-->
+<head>
+ <meta charset="utf-8">
+ <title>Test for Bug 985827</title>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+ <script type="application/javascript">
+
+ function test() {
+ var is = parent.is;
+
+ // Test WebIDL NavigatorProperty objects
+ var x = navigator.mozContacts;
+ is(typeof x, "object", "Should have a mozContacts object");
+ delete navigator.mozContacts;
+ var y = navigator.mozContacts;
+ is(x, y, "Should have gotten the same mozContacts object again");
+ }
+
+ test();
+ </script>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=985827">Mozilla Bug 985827</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+</pre>
+</body>
+</html>
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -672,24 +672,21 @@ skip-if = buildapp == 'mulet' || buildap
[test_file_negative_date.html]
[test_fileapi.html]
[test_fileapi_slice.html]
skip-if = (toolkit == 'android') || e10s # Android: Bug 775227, e10s: Bug 1226477
[test_frameLoader_switchProcess.html]
skip-if = e10s || os != 'linux' || buildapp != 'browser' # Already tests multiprocess
[test_getAttribute_after_createAttribute.html]
[test_getElementById.html]
-[test_getFeature_with_perm.html]
-[test_getFeature_without_perm.html]
[test_getTranslationNodes.html]
[test_getTranslationNodes_limit.html]
[test_gsp-qualified.html]
[test_gsp-quirks.html]
[test_gsp-standards.html]
-[test_hasFeature.html]
[test_history_document_open.html]
[test_history_state_null.html]
[test_html_colors_quirks.html]
[test_html_colors_standards.html]
[test_htmlcopyencoder.html]
[test_htmlcopyencoder.xhtml]
[test_iframe_referrer.html]
[test_iframe_referrer_changing.html]
@@ -714,27 +711,25 @@ skip-if = (os != 'b2g' && os != 'android
[test_meta_viewport4.html]
skip-if = (os != 'b2g' && os != 'android') # meta-viewport tag support is mobile-only
[test_meta_viewport5.html]
skip-if = (os != 'b2g' && os != 'android') # meta-viewport tag support is mobile-only
[test_meta_viewport6.html]
skip-if = (os != 'b2g' && os != 'android') # meta-viewport tag support is mobile-only
[test_meta_viewport7.html]
skip-if = (os != 'b2g' && os != 'android') # meta-viewport tag support is mobile-only
-[test_mozbrowser_apis_allowed.html]
[test_mozbrowser_apis_blocked.html]
[test_mozfiledataurl.html]
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT
[test_mozMatchesSelector.html]
[test_mutationobserver_anonymous.html]
[test_mutationobservers.html]
skip-if = buildapp == 'b2g' # b2g(bug 901385, showmodaldialog) b2g-debug(bug 901385, showmodaldialog) b2g-desktop(bug 901385, showmodaldialog)
[test_named_frames.html]
[test_navigator_hardwareConcurrency.html]
-[test_navigator_resolve_identity.html]
[test_navigator_language.html]
[test_navigatorPrefOverride.html]
[test_noAudioNotification.html]
tags = audiochannel
[test_noAudioNotificationOnMutedElement.html]
tags = audiochannel
[test_noAudioNotificationOnMutedOrVolume0Element.html]
tags = audiochannel
--- a/dom/base/test/mozbrowser_api_utils.js
+++ b/dom/base/test/mozbrowser_api_utils.js
@@ -15,57 +15,59 @@ const METHODS = {
stop: {},
download: {},
purgeHistory: {},
getScreenshot: {},
zoom: {},
getCanGoBack: {},
getCanGoForward: {},
getContentDimensions: {},
- setInputMethodActive: { alwaysFails: true }, // needs input-manage
- setNFCFocus: { alwaysFails: true }, // needs nfc-manager
+ setInputMethodActive: {},
+ setNFCFocus: {},
findAll: {},
findNext: {},
clearMatch: {},
- executeScript: { alwaysFails: true }, // needs browser:universalxss
+ executeScript: {},
getWebManifest: {},
mute: {},
unmute: {},
getMuted: {},
setVolume: {},
getVolume: {},
};
const ATTRIBUTES = [
"allowedAudioChannels",
];
function once(target, eventName, useCapture = false) {
- info("Waiting for event: '" + eventName + "' on " + target + ".");
+ info("Waiting for event: '" + JSON.stringify(eventName) + "' on " + target + ".");
return new Promise(resolve => {
for (let [add, remove] of [
["addEventListener", "removeEventListener"],
["addMessageListener", "removeMessageListener"],
]) {
if ((add in target) && (remove in target)) {
- target[add](eventName, function onEvent(...aArgs) {
- info("Got event: '" + eventName + "' on " + target + ".");
- target[remove](eventName, onEvent, useCapture);
- resolve(aArgs);
- }, useCapture);
+ eventName.forEach(evName => {
+ target[add](evName, function onEvent(...aArgs) {
+ info("Got event: '" + evName + "' on " + target + ".");
+ target[remove](evName, onEvent, useCapture);
+ resolve(aArgs);
+ }, useCapture);
+ });
break;
}
}
});
}
function* loadFrame(attributes = {}) {
let iframe = document.createElement("iframe");
iframe.setAttribute("src", FRAME_URL);
for (let key in attributes) {
iframe.setAttribute(key, attributes[key]);
}
- let loaded = once(iframe, "load");
+ let loaded = once(iframe, [ "load", "mozbrowserloadend" ]);
document.body.appendChild(iframe);
yield loaded;
return iframe;
}
--- a/dom/base/test/test_getFeature_with_perm.html
+++ b/dom/base/test/test_getFeature_with_perm.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=979109
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 979109</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=983502">Mozilla Bug 983502</a>
<script type="application/javascript">
function testSupported() {
var mem;
navigator.getFeature("hardware.memory").then(function(mem) {
@@ -109,31 +109,27 @@ function runNextTest() {
tests[currentTest]();
} else {
SimpleTest.finish();
}
}
info("About to run " + tests.length + " tests");
-SpecialPowers.pushPermissions([
- {type: "feature-detection", allow: 1, context: document}
-], function() {
- ok('getFeature' in navigator, "navigator.getFeature should exist");
- ok('hasFeature' in navigator, "navigator.hasFeature should exist");
- // B2G specific manifest features.
- // Touching navigator before pushPermissions makes it fail.
- if (!navigator.userAgent.includes("Android") &&
- /Mobile|Tablet/.test(navigator.userAgent)) {
- info("Adding B2G specific tests");
- tests.push(createManifestTest("manifest.chrome.navigation"));
- tests.push(createManifestTest("manifest.precompile"));
- tests.push(createManifestTest("manifest.role.homescreen"));
- }
- runNextTest();
- ok(true, "Test DONE");
-});
+ok('getFeature' in navigator, "navigator.getFeature should exist");
+ok('hasFeature' in navigator, "navigator.hasFeature should exist");
+// B2G specific manifest features.
+// Touching navigator before pushPermissions makes it fail.
+if (!navigator.userAgent.includes("Android") &&
+ /Mobile|Tablet/.test(navigator.userAgent)) {
+ info("Adding B2G specific tests");
+ tests.push(createManifestTest("manifest.chrome.navigation"));
+ tests.push(createManifestTest("manifest.precompile"));
+ tests.push(createManifestTest("manifest.role.homescreen"));
+}
+runNextTest();
+ok(true, "Test DONE");
SimpleTest.waitForExplicitFinish();
</script>
</body>
</html>
deleted file mode 100644
--- a/dom/base/test/test_getFeature_without_perm.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=979109
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Bug 979109</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=983502">Mozilla Bug 983502</a>
-<script type="application/javascript">
-
-
-is("getFeature" in navigator, false, "getFeature should not exist without permission");
-
-</script>
-</body>
-</html>
--- a/dom/base/test/test_hasFeature.html
+++ b/dom/base/test/test_hasFeature.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1009645
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1009645</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1009645">Mozilla Bug 1009645</a>
<script type="application/javascript">
var b2gOnly;
function pref(name) {
@@ -22,19 +22,19 @@ function pref(name) {
return false;
}
}
function testAPIs() {
var APIEndPoints = [
{ name: "MozMobileNetworkInfo", enabled: pref("dom.mobileconnection.enabled") },
// { name: "Navigator.mozBluetooth", enabled: b2gOnly }, // conditional on MOZ_B2G_BT, tricky to test
- { name: "Navigator.mozContacts", enabled: pref("dom.mozContacts.enabled") },
+ // Bug 1266035 { name: "Navigator.mozContacts", enabled: pref("dom.mozContacts.enabled") },
{ name: "Navigator.getDeviceStorage", enabled: pref("device.storage.enabled") },
- { name: "Navigator.addIdleObserver", enabled: true },
+ // Bug 1266035 { name: "Navigator.addIdleObserver", enabled: true },
{ name: "Navigator.mozNetworkStats", enabled: pref("dom.mozNetworkStats.enabled") },
{ name: "Navigator.push", enabled: pref("services.push.enabled") },
// { name: "Navigator.mozTime", enabled: b2gOnly }, // conditional on MOZ_TIME_MANAGER, tricky to test
// { name: "Navigator.mozFMRadio", enabled: b2gOnly }, // conditional on MOZ_B2G_FM, tricky to test
{ name: "Navigator.mozCameras", enabled: true },
{ name: "Navigator.mozAlarms", enabled: pref("dom.mozAlarms.enabled") },
{ name: "Navigator.mozTCPSocket", enabled: pref("dom.mozTCPSocket.enabled") },
{ name: "Navigator.mozInputMethod", enabled: pref("dom.mozInputMethod.enabled") },
--- a/dom/base/test/test_mozbrowser_apis_allowed.html
+++ b/dom/base/test/test_mozbrowser_apis_allowed.html
@@ -1,40 +1,34 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Verify mozbrowser APIs are allowed with browser permission</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SpawnTask.js"></script>
<script type="text/javascript" src="mozbrowser_api_utils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<script type="application/javascript;version=1.8">
add_task(function*() {
yield new Promise(resolve => {
SpecialPowers.pushPrefEnv(
{ "set": [["dom.mozBrowserFramesEnabled", true]] },
resolve);
});
});
add_task(function*() {
- yield new Promise(resolve => {
- SpecialPowers.pushPermissions([
- { "type": "browser", "allow": 1, "context": document }
- ], resolve);
- });
- });
-
- add_task(function*() {
// Create <iframe mozbrowser>
let frame = yield loadFrame({
- mozbrowser: "true"
+ mozbrowser: "true",
+ // FIXME: Bug 1270790
+ remote: true
});
// Verify that mozbrowser APIs are accessible
for (let method in METHODS) {
let { alwaysFails } = METHODS[method];
if (alwaysFails) {
ok(!(method in frame), `frame does not have method ${method}, ` +
`needs more permissions`);
--- a/dom/base/test/test_navigator_resolve_identity.html
+++ b/dom/base/test/test_navigator_resolve_identity.html
@@ -1,42 +1,28 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=985827
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 985827</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 985827 **/
- function test() {
- var is = parent.is;
-
- // Test WebIDL NavigatorProperty objects
- var x = navigator.mozContacts;
- is(typeof x, "object", "Should have a mozContacts object");
- delete navigator.mozContacts;
- var y = navigator.mozContacts;
- is(x, y, "Should have gotten the same mozContacts object again");
- }
-
SimpleTest.waitForExplicitFinish();
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], function() {
+ addEventListener('load', function() {
var iframe = document.createElement("iframe");
- iframe.src = "data:text/html,<script>(" + escape(test.toString()) + ")();</scr" + "ipt>";
+ var dir = "chrome://mochitests/content/chrome/dom/base/test/";
+ iframe.src = dir + "file_navigator_resolve_identity.html";
document.body.appendChild(iframe);
iframe.onload = function() { SimpleTest.finish(); };
});
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=985827">Mozilla Bug 985827</a>
--- a/dom/base/test/test_navigator_resolve_identity_xrays.xul
+++ b/dom/base/test/test_navigator_resolve_identity_xrays.xul
@@ -23,36 +23,20 @@ https://bugzilla.mozilla.org/show_bug.cg
SimpleTest.waitForExplicitFinish();
Components.utils.import("resource://gre/modules/Services.jsm");
addLoadEvent(function() {
var iframe = document.getElementById("t");
- Services.perms.addFromPrincipal(iframe.contentDocument.nodePrincipal,
- "contacts-read",
- Services.perms.ALLOW_ACTION);
- Services.perms.addFromPrincipal(iframe.contentDocument.nodePrincipal,
- "contacts-write",
- Services.perms.ALLOW_ACTION);
- Services.perms.addFromPrincipal(iframe.contentDocument.nodePrincipal,
- "contacts-create",
- Services.perms.ALLOW_ACTION);
-
var dir = "chrome://mochitests/content/chrome/dom/base/test/";
iframe.src = dir + "file_navigator_resolve_identity_xrays.xul";
iframe.onload = function() { finish(); };
function finish() {
- Services.perms.removeFromPrincipal(document.nodePrincipal,
- "contacts-read");
- Services.perms.removeFromPrincipal(document.nodePrincipal,
- "contacts-write");
- Services.perms.removeFromPrincipal(document.nodePrincipal,
- "contacts-create");
SimpleTest.finish();
}
});
]]>
</script>
</window>
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -2497,42 +2497,16 @@ ConvertJSValueToByteString(JSContext* cx
return false;
}
JS_EncodeStringToBuffer(cx, s, result.BeginWriting(), length);
return true;
}
-bool
-IsInPrivilegedApp(JSContext* aCx, JSObject* aObj)
-{
- if (!NS_IsMainThread()) {
- return GetWorkerPrivateFromContext(aCx)->IsInPrivilegedApp();
- }
-
- nsIPrincipal* principal = nsContentUtils::ObjectPrincipal(aObj);
- uint16_t appStatus = principal->GetAppStatus();
- return (appStatus == nsIPrincipal::APP_STATUS_CERTIFIED ||
- appStatus == nsIPrincipal::APP_STATUS_PRIVILEGED) ||
- Preferences::GetBool("dom.ignore_webidl_scope_checks", false);
-}
-
-bool
-IsInCertifiedApp(JSContext* aCx, JSObject* aObj)
-{
- if (!NS_IsMainThread()) {
- return GetWorkerPrivateFromContext(aCx)->IsInCertifiedApp();
- }
-
- nsIPrincipal* principal = nsContentUtils::ObjectPrincipal(aObj);
- return principal->GetAppStatus() == nsIPrincipal::APP_STATUS_CERTIFIED ||
- Preferences::GetBool("dom.ignore_webidl_scope_checks", false);
-}
-
void
FinalizeGlobal(JSFreeOp* aFreeOp, JSObject* aObj)
{
MOZ_ASSERT(js::GetObjectClass(aObj)->flags & JSCLASS_DOM_GLOBAL);
mozilla::dom::DestroyProtoAndIfaceCache(aObj);
}
bool
@@ -2558,60 +2532,16 @@ EnumerateGlobal(JSContext* aCx, JS::Hand
MOZ_ASSERT(JS_IsGlobalObject(aObj),
"Should have a global here, since we plan to enumerate standard "
"classes!");
return JS_EnumerateStandardClasses(aCx, aObj);
}
bool
-CheckAnyPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[])
-{
- JS::Rooted<JSObject*> rootedObj(aCx, aObj);
- nsPIDOMWindowInner* window = xpc::WindowGlobalOrNull(rootedObj)->AsInner();
- if (!window) {
- return false;
- }
-
- nsCOMPtr<nsIPermissionManager> permMgr = services::GetPermissionManager();
- NS_ENSURE_TRUE(permMgr, false);
-
- do {
- uint32_t permission = nsIPermissionManager::DENY_ACTION;
- permMgr->TestPermissionFromWindow(window, *aPermissions, &permission);
- if (permission == nsIPermissionManager::ALLOW_ACTION) {
- return true;
- }
- } while (*(++aPermissions));
- return false;
-}
-
-bool
-CheckAllPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[])
-{
- JS::Rooted<JSObject*> rootedObj(aCx, aObj);
- nsPIDOMWindowInner* window = xpc::WindowGlobalOrNull(rootedObj)->AsInner();
- if (!window) {
- return false;
- }
-
- nsCOMPtr<nsIPermissionManager> permMgr = services::GetPermissionManager();
- NS_ENSURE_TRUE(permMgr, false);
-
- do {
- uint32_t permission = nsIPermissionManager::DENY_ACTION;
- permMgr->TestPermissionFromWindow(window, *aPermissions, &permission);
- if (permission != nsIPermissionManager::ALLOW_ACTION) {
- return false;
- }
- } while (*(++aPermissions));
- return true;
-}
-
-bool
IsNonExposedGlobal(JSContext* aCx, JSObject* aGlobal,
uint32_t aNonExposedGlobals)
{
MOZ_ASSERT(aNonExposedGlobals, "Why did we get called?");
MOZ_ASSERT((aNonExposedGlobals &
~(GlobalNames::Window |
GlobalNames::BackstagePass |
GlobalNames::DedicatedWorkerGlobalScope |
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -2987,30 +2987,16 @@ class GetCCParticipant<T, true>
public:
static constexpr nsCycleCollectionParticipant*
Get()
{
return nullptr;
}
};
-/*
- * Helper function for testing whether the given object comes from a
- * privileged app.
- */
-bool
-IsInPrivilegedApp(JSContext* aCx, JSObject* aObj);
-
-/*
- * Helper function for testing whether the given object comes from a
- * certified app.
- */
-bool
-IsInCertifiedApp(JSContext* aCx, JSObject* aObj);
-
void
FinalizeGlobal(JSFreeOp* aFop, JSObject* aObj);
bool
ResolveGlobal(JSContext* aCx, JS::Handle<JSObject*> aObj,
JS::Handle<jsid> aId, bool* aResolvedp);
bool
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -1864,97 +1864,63 @@ class CGClassHasInstanceHook(CGAbstractS
hasInstanceCode += "return true;\n"
return header + hasInstanceCode
def isChromeOnly(m):
return m.getExtendedAttribute("ChromeOnly")
-def getAvailableInTestFunc(obj):
- availableIn = obj.getExtendedAttribute("AvailableIn")
- if availableIn is None:
- return None
- assert isinstance(availableIn, list) and len(availableIn) == 1
- if availableIn[0] == "PrivilegedApps":
- return "IsInPrivilegedApp"
- if availableIn[0] == "CertifiedApps":
- return "IsInCertifiedApp"
- raise TypeError("Unknown AvailableIn value '%s'" % availableIn[0])
-
-
class MemberCondition:
"""
An object representing the condition for a member to actually be
exposed. Any of the arguments can be None. If not
None, they should have the following types:
pref: The name of the preference.
func: The name of the function.
secureContext: A bool indicating whether a secure context is required.
- available: A string indicating where we should be available.
- checkAnyPermissions: An integer index for the anypermissions_* to use.
- checkAllPermissions: An integer index for the allpermissions_* to use.
nonExposedGlobals: A set of names of globals. Can be empty, in which case
it's treated the same way as None.
"""
- def __init__(self, pref=None, func=None, secureContext=False, available=None,
- checkAnyPermissions=None, checkAllPermissions=None,
+ def __init__(self, pref=None, func=None, secureContext=False,
nonExposedGlobals=None):
assert pref is None or isinstance(pref, str)
assert func is None or isinstance(func, str)
assert isinstance(secureContext, bool)
- assert available is None or isinstance(available, str)
- assert checkAnyPermissions is None or isinstance(checkAnyPermissions, int)
- assert checkAllPermissions is None or isinstance(checkAllPermissions, int)
assert nonExposedGlobals is None or isinstance(nonExposedGlobals, set)
self.pref = pref
self.secureContext = secureContext
def toFuncPtr(val):
if val is None:
return "nullptr"
return "&" + val
self.func = toFuncPtr(func)
- self.available = toFuncPtr(available)
- if checkAnyPermissions is None:
- self.checkAnyPermissions = "nullptr"
- else:
- self.checkAnyPermissions = "anypermissions_%i" % checkAnyPermissions
- if checkAllPermissions is None:
- self.checkAllPermissions = "nullptr"
- else:
- self.checkAllPermissions = "allpermissions_%i" % checkAllPermissions
if nonExposedGlobals:
# Nonempty set
self.nonExposedGlobals = " | ".join(
map(lambda g: "GlobalNames::%s" % g,
sorted(nonExposedGlobals)))
else:
self.nonExposedGlobals = "0"
def __eq__(self, other):
return (self.pref == other.pref and self.func == other.func and
self.secureContext == other.secureContext and
- self.available == other.available and
- self.checkAnyPermissions == other.checkAnyPermissions and
- self.checkAllPermissions == other.checkAllPermissions and
self.nonExposedGlobals == other.nonExposedGlobals)
def __ne__(self, other):
return not self.__eq__(other)
def hasDisablers(self):
return (self.pref is not None or
self.secureContext or
self.func != "nullptr" or
- self.available != "nullptr" or
- self.checkAnyPermissions != "nullptr" or
- self.checkAllPermissions != "nullptr" or
self.nonExposedGlobals != "0")
class PropertyDefiner:
"""
A common superclass for defining things on prototype objects.
Subclasses should implement generateArray to generate the actual arrays of
@@ -2014,19 +1980,16 @@ class PropertyDefiner:
nonExposureSet = interface.exposureSet - interfaceMember.exposureSet
return MemberCondition(
PropertyDefiner.getStringAttr(interfaceMember,
"Pref"),
PropertyDefiner.getStringAttr(interfaceMember,
"Func"),
interfaceMember.getExtendedAttribute("SecureContext") is not None,
- getAvailableInTestFunc(interfaceMember),
- descriptor.checkAnyPermissionsIndicesForMembers.get(interfaceMember.identifier.name),
- descriptor.checkAllPermissionsIndicesForMembers.get(interfaceMember.identifier.name),
nonExposureSet)
def generatePrefableArray(self, array, name, specFormatter, specTerminator,
specType, getCondition, getDataTuple, doIdArrays):
"""
This method generates our various arrays.
array is an array of interface members as passed to generateArray
@@ -2060,17 +2023,17 @@ class PropertyDefiner:
specs = []
disablers = []
prefableSpecs = []
disablersTemplate = dedent(
"""
static PrefableDisablers %s_disablers%d = {
- true, %s, %s, %s, %s, %s, %s
+ true, %s, %s, %s
};
""")
prefableWithDisablersTemplate = ' { &%s_disablers%d, &%s_specs[%d] }'
prefableWithoutDisablersTemplate = ' { nullptr, &%s_specs[%d] }'
prefCacheTemplate = '&%s[%d].disablers->enabled'
def switchToCondition(props, condition):
# Remember the info about where our pref-controlled
@@ -2082,20 +2045,17 @@ class PropertyDefiner:
# Set up pointers to the new sets of specs inside prefableSpecs
if condition.hasDisablers():
prefableSpecs.append(prefableWithDisablersTemplate %
(name, len(specs), name, len(specs)))
disablers.append(disablersTemplate %
(name, len(specs),
toStringBool(condition.secureContext),
condition.nonExposedGlobals,
- condition.func,
- condition.available,
- condition.checkAnyPermissions,
- condition.checkAllPermissions))
+ condition.func))
else:
prefableSpecs.append(prefableWithoutDisablersTemplate %
(name, len(specs)))
switchToCondition(self, lastCondition)
for member in array:
curCondition = getCondition(member, self.descriptor)
@@ -3329,25 +3289,16 @@ class CGConstructorEnabled(CGAbstractMet
""", workerCondition=workerCondition.define())
exposedInWorkerCheck = CGGeneric(exposedInWorkerCheck)
if iface.isExposedOnMainThread():
exposedInWorkerCheck = CGIfWrapper(exposedInWorkerCheck,
"!NS_IsMainThread()")
body.append(exposedInWorkerCheck)
conditions = getConditionList(iface, "aCx", "aObj")
- availableIn = getAvailableInTestFunc(iface)
- if availableIn:
- conditions.append(CGGeneric("%s(aCx, aObj)" % availableIn))
- checkAnyPermissions = self.descriptor.checkAnyPermissionsIndex
- if checkAnyPermissions is not None:
- conditions.append(CGGeneric("CheckAnyPermissions(aCx, aObj, anypermissions_%i)" % checkAnyPermissions))
- checkAllPermissions = self.descriptor.checkAllPermissionsIndex
- if checkAllPermissions is not None:
- conditions.append(CGGeneric("CheckAllPermissions(aCx, aObj, allpermissions_%i)" % checkAllPermissions))
# We should really have some conditions
assert len(body) or len(conditions)
conditionsWrapper = ""
if len(conditions):
conditionsWrapper = CGWrapper(conditions,
pre="return ",
@@ -12008,27 +11959,16 @@ class CGDescriptor(CGThing):
# Always have a finalize hook, regardless of whether the class
# wants a custom hook.
cgThings.append(CGClassFinalizeHook(descriptor))
if descriptor.concrete and descriptor.wrapperCache:
cgThings.append(CGClassObjectMovedHook(descriptor))
- for name in ["anypermissions", "allpermissions"]:
- permissions = getattr(descriptor, name)
- if len(permissions):
- for (k, v) in sorted(permissions.items()):
- perms = CGList((CGGeneric('"%s",' % p) for p in k), joiner="\n")
- perms.append(CGGeneric("nullptr"))
- cgThings.append(CGWrapper(CGIndenter(perms),
- pre="static const char* const %s_%i[] = {\n" % (name, v),
- post="\n};\n",
- defineOnly=True))
-
# Generate the _ClearCachedFooValue methods before the property arrays that use them.
if descriptor.interface.isJSImplemented():
for m in clearableCachedAttrs(descriptor):
cgThings.append(CGJSImplClearCachedValueMethod(descriptor, m))
properties = PropertyArrays(descriptor)
cgThings.append(CGGeneric(define=str(properties)))
cgThings.append(CGNativeProperties(descriptor, properties))
@@ -16404,50 +16344,16 @@ class GlobalGenRoots():
curr = CGHeaders([], [], [], [], headers, [], 'UnionConversions', curr)
# Add include guards.
curr = CGIncludeGuard('UnionConversions', curr)
# Done.
return curr
- @staticmethod
- def FeatureList(config):
- things = set()
- for d in config.getDescriptors():
- if not d.interface.isExternal() and d.featureDetectibleThings is not None:
- things.update(d.featureDetectibleThings)
- things = CGList((CGGeneric(declare='"%s",' % t) for t in sorted(things)), joiner="\n")
- things.append(CGGeneric(declare="nullptr"))
- things = CGWrapper(CGIndenter(things),
- pre="static const char* const FeatureList[] = {\n",
- post="\n};\n")
-
- helper_pre = "bool IsFeatureDetectible(const nsAString& aFeature) {\n"
- helper = CGWrapper(CGIndenter(things),
- pre=helper_pre,
- post=dedent("""
- const char* const* feature = FeatureList;
- while (*feature) {
- if (aFeature.EqualsASCII(*feature)) {
- return true;
- }
- ++feature;
- }
-
- return false;
- }
- """))
-
- curr = CGNamespace.build(['mozilla', 'dom'], helper)
- curr = CGHeaders([], [], [], [], ["nsString.h"], [], 'FeatureList', curr)
- curr = CGIncludeGuard('FeatureList', curr)
-
- return curr
-
# Code generator for simple events
class CGEventGetter(CGNativeMember):
def __init__(self, descriptor, attr):
ea = descriptor.getExtendedAttributes(attr, getter=True)
CGNativeMember.__init__(self, descriptor, attr,
CGSpecializedGetter.makeNativeName(descriptor,
attr),
--- a/dom/bindings/Configuration.py
+++ b/dom/bindings/Configuration.py
@@ -503,74 +503,21 @@ class Descriptor(DescriptorProvider):
# the value, and ConstructNavigatorObject needs a JSContext.
self.extendedAttributes['all'].setdefault(m.identifier.name, []).append('implicitJSContext')
self._binaryNames = desc.get('binaryNames', {})
self._binaryNames.setdefault('__legacycaller', 'LegacyCall')
self._binaryNames.setdefault('__stringifier', 'Stringify')
if not self.interface.isExternal():
- self.anypermissions = dict()
- self.allpermissions = dict()
-
- # Adds a permission list to this descriptor and returns the index to use.
- def addPermissions(ifaceOrMember, attribute):
- if attribute == "CheckAllPermissions":
- permissions = self.allpermissions
- else:
- permissions = self.anypermissions
-
- checkPermissions = ifaceOrMember.getExtendedAttribute(attribute)
- if checkPermissions is None:
- return None
-
- # It's a list of whitespace-separated strings
- assert(len(checkPermissions) is 1)
- assert(checkPermissions[0] is not None)
- checkPermissions = checkPermissions[0]
- permissionsList = checkPermissions.split()
- if len(permissionsList) == 0:
- raise TypeError("Need at least one permission name for %s" % attribute)
-
- permissionsList = tuple(sorted(set(permissionsList)))
- return permissions.setdefault(permissionsList, len(permissions))
-
- self.checkAnyPermissionsIndex = addPermissions(self.interface, "CheckAnyPermissions")
- self.checkAnyPermissionsIndicesForMembers = dict()
- self.checkAllPermissionsIndex = addPermissions(self.interface, "CheckAllPermissions")
- self.checkAllPermissionsIndicesForMembers = dict()
- for m in self.interface.members:
- permissionsIndex = addPermissions(m, "CheckAnyPermissions")
- if permissionsIndex is not None:
- self.checkAnyPermissionsIndicesForMembers[m.identifier.name] = permissionsIndex
- allpermissionsIndex = addPermissions(m, "CheckAllPermissions")
- if allpermissionsIndex is not None:
- self.checkAllPermissionsIndicesForMembers[m.identifier.name] = allpermissionsIndex
-
def isTestInterface(iface):
return (iface.identifier.name in ["TestInterface",
"TestJSImplInterface",
"TestRenamedInterface"])
- self.featureDetectibleThings = set()
- if not isTestInterface(self.interface):
- if (self.interface.getExtendedAttribute("CheckAnyPermissions") or
- self.interface.getExtendedAttribute("CheckAllPermissions") or
- self.interface.getExtendedAttribute("AvailableIn") == "PrivilegedApps"):
- iface = self.interface.identifier.name
- self.featureDetectibleThings.add(iface)
- for m in self.interface.members:
- self.featureDetectibleThings.add("%s.%s" % (iface, m.identifier.name))
-
- for m in self.interface.members:
- if (m.getExtendedAttribute("CheckAnyPermissions") or
- m.getExtendedAttribute("CheckAllPermissions") or
- m.getExtendedAttribute("AvailableIn") == "PrivilegedApps"):
- self.featureDetectibleThings.add("%s.%s" % (self.interface.identifier.name, m.identifier.name))
-
for member in self.interface.members:
if not member.isAttr() and not member.isMethod():
continue
binaryName = member.getExtendedAttribute("BinaryName")
if binaryName:
assert isinstance(binaryName, list)
assert len(binaryName) == 1
self._binaryNames.setdefault(member.identifier.name,
--- a/dom/bindings/DOMJSClass.h
+++ b/dom/bindings/DOMJSClass.h
@@ -69,28 +69,16 @@ typedef bool
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
JS::MutableHandle<JS::PropertyDescriptor> desc);
typedef bool
(* EnumerateOwnProperties)(JSContext* cx, JS::Handle<JSObject*> wrapper,
JS::Handle<JSObject*> obj,
JS::AutoIdVector& props);
-// Returns true if aObj's global has any of the permissions named in
-// aPermissions set to nsIPermissionManager::ALLOW_ACTION. aPermissions must be
-// null-terminated.
-bool
-CheckAnyPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[]);
-
-// Returns true if aObj's global has all of the permissions named in
-// aPermissions set to nsIPermissionManager::ALLOW_ACTION. aPermissions must be
-// null-terminated.
-bool
-CheckAllPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[]);
-
// Returns true if the given global is of a type whose bit is set in
// aNonExposedGlobals.
bool
IsNonExposedGlobal(JSContext* aCx, JSObject* aGlobal,
uint32_t aNonExposedGlobals);
struct ConstantSpec
{
@@ -133,55 +121,33 @@ struct PrefableDisablers {
}
if (secureContext && !IsSecureContextOrObjectIsFromSecureContext(cx, obj)) {
return false;
}
if (enabledFunc &&
!enabledFunc(cx, js::GetGlobalForObjectCrossCompartment(obj))) {
return false;
}
- if (availableFunc &&
- !availableFunc(cx, js::GetGlobalForObjectCrossCompartment(obj))) {
- return false;
- }
- if (checkAnyPermissions &&
- !CheckAnyPermissions(cx, js::GetGlobalForObjectCrossCompartment(obj),
- checkAnyPermissions)) {
- return false;
- }
- if (checkAllPermissions &&
- !CheckAllPermissions(cx, js::GetGlobalForObjectCrossCompartment(obj),
- checkAllPermissions)) {
- return false;
- }
return true;
}
// A boolean indicating whether this set of specs is enabled. Not const
// because it will change at runtime if the corresponding pref is changed.
bool enabled;
// A boolean indicating whether a Secure Context is required.
const bool secureContext;
// Bitmask of global names that we should not be exposed in.
const uint16_t nonExposedGlobals;
// A function pointer to a function that can say the property is disabled
// even if "enabled" is set to true. If the pointer is null the value of
- // "enabled" is used as-is unless availableFunc overrides.
+ // "enabled" is used as-is.
const PropertyEnabled enabledFunc;
-
- // A function pointer to a function that can be used to disable a
- // property even if "enabled" is true and enabledFunc allowed. This
- // is basically a hack to avoid having to codegen PropertyEnabled
- // implementations in case when we need to do two separate checks.
- const PropertyEnabled availableFunc;
- const char* const* const checkAnyPermissions;
- const char* const* const checkAllPermissions;
};
template<typename T>
struct Prefable {
inline bool isEnabled(JSContext* cx, JS::Handle<JSObject*> obj) const {
if (MOZ_LIKELY(!disablers)) {
return true;
}
--- a/dom/bindings/mozwebidlcodegen/__init__.py
+++ b/dom/bindings/mozwebidlcodegen/__init__.py
@@ -122,17 +122,16 @@ class WebIDLCodegenManager(LoggingMixin)
"""Manages all code generation around WebIDL.
To facilitate testing, this object is meant to be generic and reusable.
Paths, etc should be parameters and not hardcoded.
"""
# Global parser derived declaration files.
GLOBAL_DECLARE_FILES = {
- 'FeatureList.h',
'GeneratedAtomList.h',
'GeneratedEventList.h',
'PrototypeList.h',
'RegisterBindings.h',
'RegisterWorkerBindings.h',
'RegisterWorkerDebuggerBindings.h',
'ResolveSystemBinding.h',
'UnionConversions.h',
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -1256,20 +1256,17 @@ class IDLInterfaceOrNamespace(IDLObjectW
if self.isOnGlobalProtoChain():
raise WebIDLError("[Alias] must not be used on a "
"[Global] interface operation",
[member.location])
if (member.getExtendedAttribute("Exposed") or
member.getExtendedAttribute("ChromeOnly") or
member.getExtendedAttribute("Pref") or
member.getExtendedAttribute("Func") or
- member.getExtendedAttribute("SecureContext") or
- member.getExtendedAttribute("AvailableIn") or
- member.getExtendedAttribute("CheckAnyPermissions") or
- member.getExtendedAttribute("CheckAllPermissions")):
+ member.getExtendedAttribute("SecureContext")):
raise WebIDLError("[Alias] must not be used on a "
"conditionally exposed operation",
[member.location])
if member.isStatic():
raise WebIDLError("[Alias] must not be used on a "
"static operation",
[member.location])
if member.isIdentifierLess():
@@ -1291,24 +1288,16 @@ class IDLInterfaceOrNamespace(IDLObjectW
[member.location, m.location])
if (self.getExtendedAttribute("Pref") and
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
raise WebIDLError("[Pref] used on an interface that is not %s-only" %
self.parentScope.primaryGlobalName,
[self.location])
- for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
- if (self.getExtendedAttribute(attribute) and
- self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
- raise WebIDLError("[%s] used on an interface that is "
- "not %s-only" %
- (attribute, self.parentScope.primaryGlobalName),
- [self.location])
-
# Conditional exposure makes no sense for interfaces with no
# interface object, unless they're navigator properties.
if (self.isExposedConditionally() and
not self.hasInterfaceObject() and
not self.isNavigatorProperty()):
raise WebIDLError("Interface with no interface object is "
"exposed conditionally",
[self.location])
@@ -1715,20 +1704,17 @@ class IDLInterface(IDLInterfaceOrNamespa
[attr.location])
elif identifier == "Exposed":
convertExposedAttrToGlobalNameSet(attr,
self._exposureGlobalNames)
elif (identifier == "Pref" or
identifier == "JSImplementation" or
identifier == "HeaderFile" or
identifier == "NavigatorProperty" or
- identifier == "AvailableIn" or
identifier == "Func" or
- identifier == "CheckAnyPermissions" or
- identifier == "CheckAllPermissions" or
identifier == "Deprecated"):
# Known extended attributes that take a string value
if not attr.hasValue():
raise WebIDLError("[%s] must have a value" % identifier,
[attr.location])
else:
raise WebIDLError("Unknown extended attribute %s on interface" % identifier,
[attr.location])
@@ -3545,24 +3531,16 @@ class IDLInterfaceMember(IDLObjectWithId
def validate(self):
if (self.getExtendedAttribute("Pref") and
self.exposureSet != set([self._globalScope.primaryGlobalName])):
raise WebIDLError("[Pref] used on an interface member that is not "
"%s-only" % self._globalScope.primaryGlobalName,
[self.location])
- for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
- if (self.getExtendedAttribute(attribute) and
- self.exposureSet != set([self._globalScope.primaryGlobalName])):
- raise WebIDLError("[%s] used on an interface member that is "
- "not %s-only" %
- (attribute, self.parentScope.primaryGlobalName),
- [self.location])
-
if self.isAttr() or self.isMethod():
if self.affects == "Everything" and self.dependsOn != "Everything":
raise WebIDLError("Interface member is flagged as affecting "
"everything but not depending on everything. "
"That seems rather unlikely.",
[self.location])
if self.getExtendedAttribute("NewObject"):
@@ -3969,20 +3947,17 @@ class IDLConst(IDLInterfaceMember):
def handleExtendedAttribute(self, attr):
identifier = attr.identifier()
if identifier == "Exposed":
convertExposedAttrToGlobalNameSet(attr, self._exposureGlobalNames)
elif (identifier == "Pref" or
identifier == "ChromeOnly" or
identifier == "Func" or
- identifier == "SecureContext" or
- identifier == "AvailableIn" or
- identifier == "CheckAnyPermissions" or
- identifier == "CheckAllPermissions"):
+ identifier == "SecureContext"):
# Known attributes that we don't need to do anything with here
pass
else:
raise WebIDLError("Unknown extended attribute %s on constant" % identifier,
[attr.location])
IDLInterfaceMember.handleExtendedAttribute(self, attr)
def _getDependentObjects(self):
@@ -4312,21 +4287,18 @@ class IDLAttribute(IDLInterfaceMember):
identifier == "Deprecated" or
identifier == "SetterThrows" or
identifier == "Throws" or
identifier == "GetterThrows" or
identifier == "ChromeOnly" or
identifier == "Func" or
identifier == "SecureContext" or
identifier == "Frozen" or
- identifier == "AvailableIn" or
identifier == "NewObject" or
identifier == "UnsafeInPrerendering" or
- identifier == "CheckAnyPermissions" or
- identifier == "CheckAllPermissions" or
identifier == "BinaryName"):
# Known attributes that we don't need to do anything with here
pass
else:
raise WebIDLError("Unknown extended attribute %s on attribute" % identifier,
[attr.location])
IDLInterfaceMember.handleExtendedAttribute(self, attr)
@@ -5038,19 +5010,16 @@ class IDLMethod(IDLInterfaceMember, IDLS
elif (identifier == "Throws" or
identifier == "NewObject" or
identifier == "ChromeOnly" or
identifier == "UnsafeInPrerendering" or
identifier == "Pref" or
identifier == "Deprecated" or
identifier == "Func" or
identifier == "SecureContext" or
- identifier == "AvailableIn" or
- identifier == "CheckAnyPermissions" or
- identifier == "CheckAllPermissions" or
identifier == "BinaryName" or
identifier == "StaticClassOverride"):
# Known attributes that we don't need to do anything with here
pass
else:
raise WebIDLError("Unknown extended attribute %s on method" % identifier,
[attr.location])
IDLInterfaceMember.handleExtendedAttribute(self, attr)
--- a/dom/bindings/test/TestCodeGen.webidl
+++ b/dom/bindings/test/TestCodeGen.webidl
@@ -6,17 +6,17 @@
typedef long myLong;
typedef TestInterface AnotherNameForTestInterface;
typedef TestInterface? NullableTestInterface;
typedef CustomEventInit TestDictionaryTypedef;
interface TestExternalInterface;
-[AvailableIn=PrivilegedApps, Pref="xyz"]
+[Pref="xyz"]
interface TestRenamedInterface {
};
callback interface TestCallbackInterface {
readonly attribute long foo;
attribute DOMString bar;
void doSomething();
long doSomethingElse(DOMString arg, TestInterface otherArg);
@@ -130,17 +130,16 @@ interface OnlyForUseInConstructor {
Constructor(DOMString str),
Constructor(unsigned long num, boolean? boolArg),
Constructor(TestInterface? iface),
Constructor(long arg1, IndirectlyImplementedInterface iface),
Constructor(Date arg1),
Constructor(ArrayBuffer arrayBuf),
Constructor(Uint8Array typedArr),
// Constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3),
- AvailableIn=CertifiedApps,
NamedConstructor=Test,
NamedConstructor=Test(DOMString str),
NamedConstructor=Test2(DictForConstructor dict, any any1, object obj1,
object? obj2, sequence<Dict> seq, optional any any2,
optional object obj3, optional object? obj4),
NamedConstructor=Test3((long or MozMap<any>) arg1)
]
interface TestInterface {
@@ -882,24 +881,16 @@ interface TestInterface {
[Pref="abc.def", Func="TestFuncControlledMember"]
void prefable17();
[Func="TestFuncControlledMember"]
void prefable18();
[Func="TestFuncControlledMember"]
void prefable19();
[Pref="abc.def", Func="TestFuncControlledMember", ChromeOnly]
void prefable20();
- [Func="TestFuncControlledMember", AvailableIn=CertifiedApps]
- void prefable21();
- [Func="TestFuncControlledMember", AvailableIn=CertifiedApps]
- void prefable22();
- [Pref="abc.def", Func="TestFuncControlledMember", AvailableIn=CertifiedApps]
- void prefable23();
- [Pref="abc.def", Func="TestFuncControlledMember", AvailableIn=PrivilegedApps]
- void prefable24();
// Conditionally exposed methods/attributes involving [SecureContext]
[SecureContext]
readonly attribute boolean conditionalOnSecureContext1;
[SecureContext, Pref="abc.def"]
readonly attribute boolean conditionalOnSecureContext2;
[SecureContext, Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
readonly attribute boolean conditionalOnSecureContext3;
--- a/dom/bindings/test/TestJSImplGen.webidl
+++ b/dom/bindings/test/TestJSImplGen.webidl
@@ -728,24 +728,16 @@ interface TestJSImplInterface {
[Pref="abc.def", Func="TestFuncControlledMember"]
void prefable17();
[Func="TestFuncControlledMember"]
void prefable18();
[Func="TestFuncControlledMember"]
void prefable19();
[Pref="abc.def", Func="TestFuncControlledMember", ChromeOnly]
void prefable20();
- [Func="TestFuncControlledMember", AvailableIn=CertifiedApps]
- void prefable21();
- [Func="TestFuncControlledMember", AvailableIn=CertifiedApps]
- void prefable22();
- [Pref="abc.def", Func="TestFuncControlledMember", AvailableIn=CertifiedApps]
- void prefable23();
- [Pref="abc.def", Func="TestFuncControlledMember", AvailableIn=PrivilegedApps]
- void prefable24();
// Conditionally exposed methods/attributes involving [SecureContext]
[SecureContext]
readonly attribute boolean conditionalOnSecureContext1;
[SecureContext, Pref="abc.def"]
readonly attribute boolean conditionalOnSecureContext2;
[SecureContext, Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
readonly attribute boolean conditionalOnSecureContext3;
--- a/dom/bindings/test/chrome.ini
+++ b/dom/bindings/test/chrome.ini
@@ -1,18 +1,20 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
+ file_bug707564.html
+ file_bug707564-2.html
!/dom/bindings/test/file_bug707564.html
!/dom/bindings/test/file_bug775543.html
!/dom/bindings/test/file_document_location_set_via_xray.html
!/dom/bindings/test/file_dom_xrays.html
!/dom/bindings/test/file_proxies_via_xray.html
-[test_bug707564-chrome.html]
+[test_bug707564.html]
[test_bug775543.html]
[test_document_location_set_via_xray.html]
[test_dom_xrays.html]
[test_proxies_via_xray.html]
[test_document_location_via_xray_cached.html]
[test_blacklisted_prerendering_function.xul]
support-files =
file_focuser.html
--- a/dom/bindings/test/file_bug707564-2.html
+++ b/dom/bindings/test/file_bug707564-2.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=707564
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 707564</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 707564 **/
var ok = parent.ok;
var isnot = parent.isnot;
addLoadEvent(function() {
var props = Object.getOwnPropertyNames(Object.getPrototypeOf(frames[0].navigator));
--- a/dom/bindings/test/mochitest.ini
+++ b/dom/bindings/test/mochitest.ini
@@ -1,25 +1,22 @@
[DEFAULT]
support-files =
file_InstanceOf.html
- file_bug707564.html
- file_bug707564-2.html
file_bug775543.html
file_document_location_set_via_xray.html
file_dom_xrays.html
file_proxies_via_xray.html
forOf_iframe.html
!/js/xpconnect/tests/mochitest/file_empty.html
[test_async_stacks.html]
[test_ByteString.html]
[test_InstanceOf.html]
[test_bug560072.html]
-[test_bug707564.html]
[test_bug742191.html]
[test_bug759621.html]
[test_bug773326.html]
[test_bug788369.html]
[test_bug852846.html]
[test_bug862092.html]
[test_bug1036214.html]
skip-if = debug == false
deleted file mode 100644
--- a/dom/bindings/test/test_bug707564-chrome.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=707564
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Bug 707564</title>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=707564">Mozilla Bug 707564</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-<iframe id="t1" src="http://example.org/tests/dom/bindings/test/file_bug707564.html"></iframe>
-<iframe id="t2"></iframe>
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-/** Test for Bug 775543 **/
-function test()
-{
- var nav = document.getElementById("t1").contentWindow.navigator;
- is(nav.foopy, undefined, "We should have an Xray now");
- is(nav.wrappedJSObject.foopy, 5, "We should have the right navigator object");
- var props = Object.getOwnPropertyNames(Object.getPrototypeOf(nav));
- isnot(props.indexOf("mozContacts"), -1,
- "Should enumerate a mozContacts property on navigator xray");
-
- var nav = document.getElementById("t2").contentWindow.navigator;
- is(nav.foopy, undefined, "We should have an Xray now again");
- is(nav.wrappedJSObject.foopy, 5, "We should have the right navigator object again");
- var found = false;
- for (var name in nav) {
- if (name == "mozContacts") {
- found = true;
- }
- }
- ok(found, "Should enumerate a mozContacts property on navigator xray via for...in");
-
- SimpleTest.finish();
-}
-
-onload = test;
-onload = function() {
- var iframe1 = document.getElementById("t1");
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: iframe1.contentDocument},
- {type: "contacts-write", allow: true, context: iframe1.contentDocument},
- {type: "contacts-create", allow: true, context: iframe1.contentDocument},
- ], function() {
- iframe1.src = "http://example.org/tests/dom/bindings/test/file_bug707564.html";
- iframe1.onload = function() {
- var iframe2 = document.getElementById("t2");
- iframe2.src = "http://example.org/tests/dom/bindings/test/file_bug707564.html";
- iframe2.onload = test;
- };
- });
-};
-
-</script>
-</pre>
-</body>
-</html>
--- a/dom/bindings/test/test_bug707564.html
+++ b/dom/bindings/test/test_bug707564.html
@@ -1,29 +1,24 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_bug707564-2.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+
+addEventListener('load', run_tests);
</script>
</pre>
</body>
</html>
--- a/dom/browser-element/mochitest/browserElementTestHelpers.js
+++ b/dom/browser-element/mochitest/browserElementTestHelpers.js
@@ -104,16 +104,17 @@ const browserElementTestHelpers = {
for (var i = 0; i < this._observers.length; i++) {
SpecialPowers.removeObserver(this._observers[i][0],
this._observers[i][1]);
}
},
// Some basically-empty pages from different domains you can load.
'emptyPage1': 'http://example.com' + _getPath() + '/file_empty.html',
+ 'fileEmptyPage1': 'file_empty.html',
'emptyPage2': 'http://example.org' + _getPath() + '/file_empty.html',
'emptyPage3': 'http://test1.example.org' + _getPath() + '/file_empty.html',
'focusPage': 'http://example.org' + _getPath() + '/file_focus.html',
};
// Returns a promise which is resolved when a subprocess is created. The
// argument to resolve() is the childID of the subprocess.
function expectProcessCreated(/* optional */ initialPriority) {
--- a/dom/browser-element/mochitest/browserElement_ActiveStateChange.js
+++ b/dom/browser-element/mochitest/browserElement_ActiveStateChange.js
@@ -1,15 +1,14 @@
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
-var fileURL = 'http://example.org/tests/dom/browser-element/mochitest/file_browserElement_ActiveStateChange.html';
+var fileURL = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/file_browserElement_ActiveStateChange.html';
var generator = runTests();
var testFrame;
var ac;
function assert(aVal, aMessage) {
return (!aVal) ? error(aMessage) : 0;
}
@@ -73,17 +72,17 @@ function setupTestFrame() {
testFrame = document.createElement('iframe');
testFrame.setAttribute('mozbrowser', 'true');
testFrame.src = fileURL;
function loadend() {
testFrame.removeEventListener('mozbrowserloadend', loadend);
ok("allowedAudioChannels" in testFrame, "allowedAudioChannels exist");
var channels = testFrame.allowedAudioChannels;
- is(channels.length, 1, "1 audio channel by default");
+ is(channels.length, 9, "9 audio channel by default");
ac = channels[0];
ok(ac instanceof BrowserElementAudioChannel, "Correct class");
ok("isActive" in ac, "isActive exists");
ok("onactivestatechanged" in ac, "onactivestatechanged exists");
generator.next();
--- a/dom/browser-element/mochitest/browserElement_AudioChannel.js
+++ b/dom/browser-element/mochitest/browserElement_AudioChannel.js
@@ -2,34 +2,33 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 1113086 - tests for AudioChannel API into BrowserElement
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function noaudio() {
info("Test : no-audio");
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
- iframe.src = 'http://example.org/tests/dom/browser-element/mochitest/file_empty.html';
+ iframe.src = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/file_empty.html';
function noaudio_loadend() {
ok("mute" in iframe, "iframe.mute exists");
ok("unmute" in iframe, "iframe.unmute exists");
ok("getMuted" in iframe, "iframe.getMuted exists");
ok("getVolume" in iframe, "iframe.getVolume exists");
ok("setVolume" in iframe, "iframe.setVolume exists");
ok("allowedAudioChannels" in iframe, "allowedAudioChannels exist");
var channels = iframe.allowedAudioChannels;
- is(channels.length, 1, "1 audio channel by default");
+ is(channels.length, 9, "9 audio channel by default");
var ac = channels[0];
ok(ac instanceof BrowserElementAudioChannel, "Correct class");
ok("getVolume" in ac, "ac.getVolume exists");
ok("setVolume" in ac, "ac.setVolume exists");
ok("getMuted" in ac, "ac.getMuted exists");
ok("setMuted" in ac, "ac.setMuted exists");
@@ -141,28 +140,28 @@ function noaudio() {
iframe.addEventListener('mozbrowserloadend', noaudio_loadend);
document.body.appendChild(iframe);
}
function audio() {
info("Test : audio");
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
- iframe.src = 'http://example.org/tests/dom/browser-element/mochitest/iframe_file_audio.html';
+ iframe.src = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/iframe_file_audio.html';
function audio_loadend() {
ok("mute" in iframe, "iframe.mute exists");
ok("unmute" in iframe, "iframe.unmute exists");
ok("getMuted" in iframe, "iframe.getMuted exists");
ok("getVolume" in iframe, "iframe.getVolume exists");
ok("setVolume" in iframe, "iframe.setVolume exists");
ok("allowedAudioChannels" in iframe, "allowedAudioChannels exist");
var channels = iframe.allowedAudioChannels;
- is(channels.length, 1, "1 audio channel by default");
+ is(channels.length, 9, "9 audio channel by default");
var ac = channels[0];
ok(ac instanceof BrowserElementAudioChannel, "Correct class");
ok("getVolume" in ac, "ac.getVolume exists");
ok("setVolume" in ac, "ac.setVolume exists");
ok("getMuted" in ac, "ac.getMuted exists");
ok("setMuted" in ac, "ac.setMuted exists");
--- a/dom/browser-element/mochitest/browserElement_AudioChannelMutedByDefault.js
+++ b/dom/browser-element/mochitest/browserElement_AudioChannelMutedByDefault.js
@@ -1,15 +1,14 @@
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
-var fileURL = 'http://example.org/tests/dom/browser-element/mochitest/file_browserElement_AudioChannelMutedByDefault.html';
+var fileURL = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/file_browserElement_AudioChannelMutedByDefault.html';
var testFrame;
var ac;
function alertListener(e) {
var message = e.detail.message
if (/^OK/.exec(message)) {
ok(true, "Message from file : " + message);
} else if (/^KO/.exec(message)) {
@@ -73,17 +72,17 @@ function setupTestFrame() {
testFrame = document.createElement('iframe');
testFrame.setAttribute('mozbrowser', 'true');
testFrame.src = fileURL;
function loadend() {
testFrame.removeEventListener('mozbrowserloadend', loadend);
ok("allowedAudioChannels" in testFrame, "allowedAudioChannels exist");
var channels = testFrame.allowedAudioChannels;
- is(channels.length, 1, "1 audio channel by default");
+ is(channels.length, 9, "9 audio channel by default");
ac = channels[0];
ok(ac instanceof BrowserElementAudioChannel, "Correct class");
ok("getMuted" in ac, "ac.getMuted exists");
ok("setMuted" in ac, "ac.setMuted exists");
ok("onactivestatechanged" in ac, "onactivestatechanged exists");
runTests();
--- a/dom/browser-element/mochitest/browserElement_AudioChannelSeeking.js
+++ b/dom/browser-element/mochitest/browserElement_AudioChannelSeeking.js
@@ -1,15 +1,14 @@
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
-var fileURL = 'http://example.org/tests/dom/browser-element/mochitest/file_browserElement_AudioChannelSeeking.html';
+var fileURL = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/file_browserElement_AudioChannelSeeking.html';
var generator = runTests();
var testFrame;
var ac;
function alertListener(e) {
var message = e.detail.message
if (/^OK/.exec(message)) {
ok(true, "Message from file : " + message);
@@ -99,17 +98,17 @@ function setupTestFrame() {
testFrame = document.createElement('iframe');
testFrame.setAttribute('mozbrowser', 'true');
testFrame.src = fileURL;
function loadend() {
testFrame.removeEventListener('mozbrowserloadend', loadend);
ok("allowedAudioChannels" in testFrame, "allowedAudioChannels exist");
var channels = testFrame.allowedAudioChannels;
- is(channels.length, 1, "1 audio channel by default");
+ is(channels.length, 9, "9 audio channel by default");
ac = channels[0];
ok(ac instanceof BrowserElementAudioChannel, "Correct class");
ok("onactivestatechanged" in ac, "onactivestatechanged exists");
continueTest();
}
--- a/dom/browser-element/mochitest/browserElement_AudioChannel_nested.js
+++ b/dom/browser-element/mochitest/browserElement_AudioChannel_nested.js
@@ -2,77 +2,68 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 1113086 - tests for AudioChannel API into BrowserElement
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function runTests() {
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
var listener = function(e) {
var message = e.detail.message;
if (/^OK/.exec(message)) {
ok(true, "Message from app: " + message);
} else if (/^KO/.exec(message)) {
ok(false, "Message from app: " + message);
} else if (/DONE/.exec(message)) {
ok(true, "Messaging from app complete");
iframe.removeEventListener('mozbrowsershowmodalprompt', listener);
+ SimpleTest.finish();
}
}
function audio_loadend() {
ok("mute" in iframe, "iframe.mute exists");
ok("unmute" in iframe, "iframe.unmute exists");
ok("getMuted" in iframe, "iframe.getMuted exists");
ok("getVolume" in iframe, "iframe.getVolume exists");
ok("setVolume" in iframe, "iframe.setVolume exists");
ok("allowedAudioChannels" in iframe, "allowedAudioChannels exist");
var channels = iframe.allowedAudioChannels;
- is(channels.length, 1, "1 audio channel by default");
+ is(channels.length, 9, "9 audio channel by default");
var ac = channels[0];
ok(ac instanceof BrowserElementAudioChannel, "Correct class");
ok("getVolume" in ac, "ac.getVolume exists");
ok("setVolume" in ac, "ac.setVolume exists");
ok("getMuted" in ac, "ac.getMuted exists");
ok("setMuted" in ac, "ac.setMuted exists");
ok("isActive" in ac, "ac.isActive exists");
info("Setting the volume...");
ac.setVolume(0.5);
ac.onactivestatechanged = function() {
ok(true, "activestatechanged event received.");
ac.onactivestatechanged = null;
- SimpleTest.finish();
}
}
iframe.addEventListener('mozbrowserloadend', audio_loadend);
iframe.addEventListener('mozbrowsershowmodalprompt', listener, false);
document.body.appendChild(iframe);
- var context = { 'url': 'http://example.org',
- 'appId': SpecialPowers.Ci.nsIScriptSecurityManager.NO_APP_ID,
- 'isInIsolatedMozBrowserElement': true };
- SpecialPowers.pushPermissions([
- {'type': 'browser', 'allow': 1, 'context': context},
- {'type': 'embed-apps', 'allow': 1, 'context': context}
- ], function() {
- iframe.src = 'http://example.org/tests/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html';
- });
+ iframe.src = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html';
}
addEventListener('testready', function() {
SpecialPowers.pushPrefEnv({'set': [["b2g.system_startup_url", window.location.href]]},
function() {
SimpleTest.executeSoon(runTests);
});
});
--- a/dom/browser-element/mochitest/browserElement_AudioPlayback.js
+++ b/dom/browser-element/mochitest/browserElement_AudioPlayback.js
@@ -3,17 +3,16 @@
// Test the mozbrowseraudioplaybackchange event is fired correctly.
'use strict';
const { Services } = SpecialPowers.Cu.import('resource://gre/modules/Services.jsm');
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
/**
* Content script passed to the child iframe
*/
function playAudioScript() {
var audio = new content.Audio();
content.document.body.appendChild(audio);
audio.oncanplay = function() {
@@ -60,17 +59,17 @@ function runTest() {
// Make sure an event only goes to the first iframe.
iframe2.addEventListener('mozbrowseraudioplaybackchange', (e) => {
ok(false,
'mozbrowseraudioplaybackchange should dispatch to the correct browser');
});
// Load a simple page to get the process started.
- iframe.src = browserElementTestHelpers.emptyPage1;
+ iframe.src = browserElementTestHelpers.fileEmptyPage1;
}
addEventListener('testready', function() {
SpecialPowers.pushPrefEnv({'set': [["b2g.system_startup_url", window.location.href]]},
function() {
SimpleTest.executeSoon(runTest);
});
});
--- a/dom/browser-element/mochitest/browserElement_BackForward.js
+++ b/dom/browser-element/mochitest/browserElement_BackForward.js
@@ -2,17 +2,16 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 741755 - Test that canGo{Back,Forward} and go{Forward,Back} work with
// <iframe mozbrowser>.
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var iframe;
function addOneShotIframeEventListener(event, fn) {
function wrapper(e) {
iframe.removeEventListener(event, wrapper);
fn(e);
};
--- a/dom/browser-element/mochitest/browserElement_BadScreenshot.js
+++ b/dom/browser-element/mochitest/browserElement_BadScreenshot.js
@@ -2,17 +2,16 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 800170 - Test that we get errors when we pass bad arguments to
// mozbrowser's getScreenshot.
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var iframe;
var numPendingTests = 0;
// Call iframe.getScreenshot with the given args. If expectSuccess is true, we
// expect the screenshot's onsuccess handler to fire. Otherwise, we expect
// getScreenshot() to throw an exception.
function checkScreenshotResult(expectSuccess, args) {
--- a/dom/browser-element/mochitest/browserElement_DOMRequestError.js
+++ b/dom/browser-element/mochitest/browserElement_DOMRequestError.js
@@ -2,17 +2,16 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test if DOMRequest returned by an iframe gets an error callback when
// the iframe is not in the DOM.
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function runTest() {
var iframe1 = document.createElement('iframe');
iframe1.setAttribute('mozbrowser', 'true');
iframe1.src = 'data:text/html,<html>' +
'<body style="background:green">hello</body></html>';
document.body.appendChild(iframe1);
--- a/dom/browser-element/mochitest/browserElement_DocumentFirstPaint.js
+++ b/dom/browser-element/mochitest/browserElement_DocumentFirstPaint.js
@@ -1,17 +1,16 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 829486 - Add mozdocumentbrowserfirstpaint event.
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var iframe;
function runTestQueue(queue) {
if (queue.length == 0) {
SimpleTest.finish();
return;
}
--- a/dom/browser-element/mochitest/browserElement_Find.js
+++ b/dom/browser-element/mochitest/browserElement_Find.js
@@ -2,17 +2,16 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 1163961 - Test search API
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function runTest() {
let iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
iframe.src = 'data:text/html,foo bar foo XXX Foo BAR foobar foobar';
const once = (eventName) => {
--- a/dom/browser-element/mochitest/browserElement_GetContentDimensions.js
+++ b/dom/browser-element/mochitest/browserElement_GetContentDimensions.js
@@ -1,17 +1,16 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 757859 - Test the getContentDimensions functionality of mozbrowser
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var resizeContent = function() {
var innerBox = content.document.getElementById('abox');
innerBox.style.width = '800px';
innerBox.style.height = '800px';
}
function runTest() {
--- a/dom/browser-element/mochitest/browserElement_GetScreenshot.js
+++ b/dom/browser-element/mochitest/browserElement_GetScreenshot.js
@@ -1,17 +1,16 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test the getScreenshot property for mozbrowser
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function runTest() {
var iframe1 = document.createElement('iframe');
iframe1.setAttribute('mozbrowser', 'true');
iframe1.src = 'data:text/html,<html>' +
'<body style="background:green">hello</body></html>';
document.body.appendChild(iframe1);
--- a/dom/browser-element/mochitest/browserElement_GetScreenshotDppx.js
+++ b/dom/browser-element/mochitest/browserElement_GetScreenshotDppx.js
@@ -1,17 +1,16 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test the getScreenshot property for mozbrowser
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function runTest() {
var dppxPref = 'layout.css.devPixelsPerPx';
var cssPixelWidth = 600;
var cssPixelHeight = 400;
var iframe1 = document.createElement('iframe');
iframe1.setAttribute('width', cssPixelWidth);
--- a/dom/browser-element/mochitest/browserElement_NextPaint.js
+++ b/dom/browser-element/mochitest/browserElement_NextPaint.js
@@ -1,17 +1,16 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 808231 - Add mozbrowsernextpaint event.
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function runTest() {
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
document.body.appendChild(iframe);
// Add a first listener that we'll remove shortly after.
iframe.addNextPaintListener(wrongListener);
--- a/dom/browser-element/mochitest/browserElement_NoAudioTrack.js
+++ b/dom/browser-element/mochitest/browserElement_NoAudioTrack.js
@@ -1,15 +1,14 @@
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
-var fileURL = 'http://example.org/tests/dom/browser-element/mochitest/file_browserElement_NoAudioTrack.html';
+var fileURL = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/file_browserElement_NoAudioTrack.html';
var generator = runTests();
var testFrame;
function alertListener(e) {
var message = e.detail.message;
if (/^OK/.exec(message)) {
ok(true, "Message from file : " + message);
continueTest();
@@ -62,17 +61,17 @@ function setupTestFrame() {
testFrame = document.createElement('iframe');
testFrame.setAttribute('mozbrowser', 'true');
testFrame.src = fileURL;
function loadend() {
testFrame.removeEventListener('mozbrowserloadend', loadend);
ok("allowedAudioChannels" in testFrame, "allowedAudioChannels exist");
var channels = testFrame.allowedAudioChannels;
- is(channels.length, 1, "1 audio channel by default");
+ is(channels.length, 9, "9 audio channel by default");
var ac = channels[0];
ok(ac instanceof BrowserElementAudioChannel, "Correct class");
ok("onactivestatechanged" in ac, "onactivestatechanged exists");
ac.onactivestatechanged = () => {
ac.onactivestatechanged = null;
error("Should not receive onactivestatechanged!");
--- a/dom/browser-element/mochitest/browserElement_OpenMixedProcess.js
+++ b/dom/browser-element/mochitest/browserElement_OpenMixedProcess.js
@@ -15,17 +15,16 @@
// Since the name of the test determines the OOP-by-default pref, the "inproc"
// version of this test opens an OOP frame, and the "oop" version opens an
// in-process frame. Enjoy. :)
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function runTest() {
// We're going to open a remote frame if OOP off by default. If OOP is on by
// default, we're going to open an in-process frame.
var remote = !browserElementTestHelpers.getOOPByDefaultPref();
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
--- a/dom/browser-element/mochitest/browserElement_PurgeHistory.js
+++ b/dom/browser-element/mochitest/browserElement_PurgeHistory.js
@@ -2,31 +2,32 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 807056 - [Browser] Clear History doesn't clear back/forward history in open tabs
// <iframe mozbrowser>.
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var iframe;
function addOneShotIframeEventListener(event, fn) {
function wrapper(e) {
iframe.removeEventListener(event, wrapper);
fn(e);
};
iframe.addEventListener(event, wrapper);
}
function runTest() {
iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
+ // FIXME: Bug 1270790
+ iframe.setAttribute('remote', 'true');
addOneShotIframeEventListener('mozbrowserloadend', function() {
SimpleTest.executeSoon(test2);
});
iframe.src = browserElementTestHelpers.emptyPage1;
document.body.appendChild(iframe);
}
--- a/dom/browser-element/mochitest/browserElement_ReloadPostRequest.js
+++ b/dom/browser-element/mochitest/browserElement_ReloadPostRequest.js
@@ -3,17 +3,16 @@
// Bug 793644, fire an event when attempting to reloads browser element after
// POST respest.
"use strict";
SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var iframe;
var gotConfirmRepost = false;
var doRepost = true;
var timer;
var isPostRequestSubmitted;
function getExpectedStrings() {
--- a/dom/browser-element/mochitest/browserElement_SendEvent.js
+++ b/dom/browser-element/mochitest/browserElement_SendEvent.js
@@ -1,17 +1,16 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test that sendMouseEvent dispatch events.
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function runTest() {
var iframe = document.createElement("iframe");
iframe.setAttribute('mozbrowser', 'true');
document.body.appendChild(iframe);
var x = 10;
var y = 10;
// First we force a reflow so that getChildProcessOffset actually returns
@@ -74,27 +73,13 @@ function runTest() {
iframe.sendTouchEvent("touchcancel", [1], [x], [y], [2], [2],
[20], [0.5], 1, 0);
iframe.removeEventListener('mozbrowserlocationchange', onlocchange);
SimpleTest.finish();
break;
}
});
- iframe.src = "data:text/html,<html><body>" +
- "<button>send[Mouse|Touch]Event</button>" +
- "</body><script>" +
- "function changeHash(e) {" +
- " document.location.hash = e.type;" +
- "};" +
- "window.addEventListener('mousedown', changeHash);" +
- "window.addEventListener('mousemove', changeHash);" +
- "window.addEventListener('mouseup', changeHash);" +
- "window.addEventListener('click', changeHash, true);" +
- "window.addEventListener('touchstart', changeHash);" +
- "window.addEventListener('touchmove', changeHash);" +
- "window.addEventListener('touchend', changeHash);" +
- "window.addEventListener('touchcancel', changeHash);" +
- "</script></html>";
+ iframe.src = "file_browserElement_SendEvent.html";
}
addEventListener('testready', runTest);
--- a/dom/browser-element/mochitest/browserElement_SetInputMethodActive.js
+++ b/dom/browser-element/mochitest/browserElement_SetInputMethodActive.js
@@ -2,17 +2,16 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 905573 - Add setInputMethodActive to browser elements to allow gaia
// system set the active IME app.
'use strict';
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
// We'll need to get the appId from the current document,
// it's either SpecialPowers.Ci.nsIScriptSecurityManager.NO_APP_ID when
// we are not running inside an app (e.g. Firefox Desktop),
// or the appId of Mochitest app when we are running inside that app
// (e.g. Emulator).
var currentAppId = SpecialPowers.wrap(document).nodePrincipal.appId;
var inApp =
@@ -62,31 +61,29 @@ function createFrames() {
if (loadendCount === 3) {
setPermissions();
}
};
// Create an input field to receive string from input method iframes.
gInputFrame = document.createElement('iframe');
gInputFrame.setAttribute('mozbrowser', 'true');
- gInputFrame.src =
- 'data:text/html,<input autofocus value="hello" />' +
- '<p>This is targetted mozbrowser frame.</p>';
+ gInputFrame.src = 'file_browserElement_SetInputMethodActive.html';
document.body.appendChild(gInputFrame);
gInputFrame.addEventListener('mozbrowserloadend', countLoadend);
for (let i = 0; i < 2; i++) {
- let frame = gInputMethodFrames[i] = document.createElement('iframe');
- frame.setAttribute('mozbrowser', 'true');
- if (currentAppManifestURL) {
- frame.setAttribute('mozapp', currentAppManifestURL);
- }
- frame.src = 'file_empty.html#' + i;
+ let frame = gInputMethodFrames[i] = document.createElement('iframe');
+ frame.setAttribute('mozbrowser', 'true');
+ if (currentAppManifestURL) {
+ frame.setAttribute('mozapp', currentAppManifestURL);
+ }
+ frame.addEventListener('mozbrowserloadend', countLoadend);
+ frame.src = 'file_empty.html#' + i;
document.body.appendChild(frame);
- frame.addEventListener('mozbrowserloadend', countLoadend);
}
}
function setPermissions() {
let permissions = [{
type: 'input',
allow: true,
context: {
--- a/dom/browser-element/mochitest/browserElement_SetNFCFocus.js
+++ b/dom/browser-element/mochitest/browserElement_SetNFCFocus.js
@@ -1,30 +1,27 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 1188639 - Check permission to use setNFCFocus
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function hasSetNFCFocus() {
return new Promise((resolve, reject) => {
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
iframe.addEventListener('mozbrowserloadend', e => {
is(iframe.setNFCFocus !== undefined, true,
"has permission to use setNFCFocus");
resolve();
});
document.body.appendChild(iframe);
});
}
function runTest() {
- SpecialPowers.pushPermissions(
- [{ 'type': 'nfc-manager', 'allow': 1, 'context': document }],
- () => hasSetNFCFocus().then(SimpleTest.finish));
+ hasSetNFCFocus().then(SimpleTest.finish);
}
addEventListener('testready', runTest);
--- a/dom/browser-element/mochitest/browserElement_SetVisible.js
+++ b/dom/browser-element/mochitest/browserElement_SetVisible.js
@@ -2,17 +2,16 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test the setVisible property for mozbrowser
"use strict";
SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var iframeScript = function() {
content.document.addEventListener("visibilitychange", function() {
sendAsyncMessage('test:visibilitychange', {
hidden: content.document.hidden
});
}, false);
}
--- a/dom/browser-element/mochitest/browserElement_SetVisibleFrames.js
+++ b/dom/browser-element/mochitest/browserElement_SetVisibleFrames.js
@@ -7,28 +7,20 @@
// In this test, we modify the parent's visibility and check that the child's
// visibility is changed as appopriate. We test modifying the child's
// visibility in a separate testcase.
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var iframe;
function runTest() {
- var principal = SpecialPowers.wrap(document).nodePrincipal;
- SpecialPowers.addPermission("browser", true, {url: SpecialPowers.wrap(principal.URI).spec,
- originAttributes: {
- appId: principal.appId,
- inIsolatedMozBrowser: true
- }});
-
iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
// Our test involves three <iframe mozbrowser>'s, parent, child1, and child2.
// child1 and child2 are contained inside parent. child1 is visibile, and
// child2 is not.
//
// For the purposes of this test, we want there to be a process barrier
@@ -70,23 +62,16 @@ function getVisibleTest2() {
function finish() {
// We need to remove this listener because when this test finishes and the
// iframe containing this document is navigated, we'll fire a
// visibilitychange(false) event on all child iframes. That's OK and
// expected, but if we don't remove our listener, then we'll end up causing
// the /next/ test to fail!
iframe.removeEventListener('mozbrowsershowmodalprompt', checkMessage);
-
- var principal = SpecialPowers.wrap(document).nodePrincipal;
- SpecialPowers.removePermission("browser", {url: SpecialPowers.wrap(principal.URI).spec,
- originAttributes: {
- appId: principal.appId,
- inIsolatedMozBrowser: true
- }});
SimpleTest.finish();
}
var expectedMsg = null;
var expectedMsgCallback = null;
function expectMessage(msg, next) {
expectedMsg = msg;
expectedMsgCallback = next;
--- a/dom/browser-element/mochitest/browserElement_SetVisibleFrames2.js
+++ b/dom/browser-element/mochitest/browserElement_SetVisibleFrames2.js
@@ -3,26 +3,18 @@
// Bug 762939 - Test that setting a <iframe mozbrowser> to invisible / visible
// inside an invisible <iframe mozbrowser> doesn't trigger any events.
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
function runTest() {
- var principal = SpecialPowers.wrap(document).nodePrincipal;
- SpecialPowers.addPermission("browser", true, {url: SpecialPowers.wrap(principal.URI).spec,
- originAttributes: {
- appId: principal.appId,
- inIsolatedMozBrowser: true
- }});
-
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
// We need remote = false here until bug 761935 is fixed; see
// SetVisibleFrames.js for an explanation.
iframe.remote = false;
iframe.addEventListener('mozbrowserloadend', function loadEnd(e) {
@@ -52,19 +44,12 @@ function runTest() {
ok(false, "Got unexpected message: " + e.detail.message);
}
});
document.body.appendChild(iframe);
}
function finish() {
- var principal = SpecialPowers.wrap(document).nodePrincipal;
- SpecialPowers.removePermission("browser", {url: SpecialPowers.wrap(principal.URI).spec,
- originAttributes: {
- appId: principal.appId,
- inIsolatedMozBrowser: true
- }});
-
SimpleTest.finish();
}
addEventListener('testready', runTest);
--- a/dom/browser-element/mochitest/browserElement_Stop.js
+++ b/dom/browser-element/mochitest/browserElement_Stop.js
@@ -7,26 +7,26 @@
// the page from loading, the timeout ensures that the page is
// actually blocked from loading, once stop is called the
// image load will be cancaelled and mozbrowserloadend should be called.
"use strict";
SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var iframe;
var stopped = false;
var imgSrc = 'http://test/tests/dom/browser-element/mochitest/file_bug709759.sjs';
function runTest() {
iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
-
+ // FIXME: Bug 1270790
+ iframe.setAttribute('remote', 'true');
iframe.addEventListener('mozbrowserloadend', loadend);
iframe.src = 'data:text/html,<html>' +
'<body><img src="' + imgSrc + '" /></body></html>';
document.body.appendChild(iframe);
setTimeout(function() {
stopped = true;
--- a/dom/browser-element/mochitest/browserElement_VisibilityChange.js
+++ b/dom/browser-element/mochitest/browserElement_VisibilityChange.js
@@ -1,17 +1,16 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test that the onmozbrowservisibilitychange event works.
'use strict';
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
var iframe1 = null;
function runTest() {
iframe1 = document.createElement('iframe');
iframe1.setAttribute('mozbrowser', 'true');
document.body.appendChild(iframe1);
iframe1.src = 'data:text/html,<html><head><title>Title</title></head><body></body></html>';
--- a/dom/browser-element/mochitest/browserElement_XFrameOptionsAllowFrom.js
+++ b/dom/browser-element/mochitest/browserElement_XFrameOptionsAllowFrom.js
@@ -28,50 +28,32 @@ function arrayBuffersEqual(a, b) {
function runTest() {
var count = 0;
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
iframe.height = '1000px';
+ var step1, stepfinish;
// The innermost page we load will fire an alert when it successfully loads.
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
switch (e.detail.message) {
case 'step 1':
- // Make the page wait for us to unblock it (which we do after we finish
- // taking the screenshot).
- e.preventDefault();
-
- iframe.getScreenshot(1000, 1000).onsuccess = function(sshot) {
- var fr = new FileReader();
- fr.onloadend = function() {
- if (initialScreenshotArrayBuffer == null)
- initialScreenshotArrayBuffer = fr.result;
- e.detail.unblock();
- };
- fr.readAsArrayBuffer(sshot.target.result);
- };
+ step1 = SpecialPowers.snapshotWindow(iframe.contentWindow);
break;
case 'step 2':
ok(false, 'cross origin page loaded');
break;
case 'finish':
// The page has now attempted to load the X-Frame-Options page; take
// another screenshot.
- iframe.getScreenshot(1000, 1000).onsuccess = function(sshot) {
- var fr = new FileReader();
- fr.onloadend = function() {
- ok(arrayBuffersEqual(fr.result, initialScreenshotArrayBuffer),
- "Screenshots should be identical");
- SimpleTest.finish();
- };
- fr.readAsArrayBuffer(sshot.target.result);
- };
- break;
+ stepfinish = SpecialPowers.snapshotWindow(iframe.contentWindow);
+ ok(step1.toDataURL() == stepfinish.toDataURL(), "Screenshots should be identical");
+ SimpleTest.finish();
}
});
document.body.appendChild(iframe);
iframe.src = 'http://example.com/tests/dom/browser-element/mochitest/file_browserElement_XFrameOptionsAllowFrom.html';
}
--- a/dom/browser-element/mochitest/browserElement_XFrameOptionsDeny.js
+++ b/dom/browser-element/mochitest/browserElement_XFrameOptionsDeny.js
@@ -31,44 +31,28 @@ function runTest() {
var iframe = document.createElement('iframe');
iframe.setAttribute('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
// frames.
iframe.height = '1000px';
+ var step1, stepfinish;
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
switch (e.detail.message) {
case 'step 1':
- // Make the page wait for us to unblock it (which we do after we finish
- // taking the screenshot).
- e.preventDefault();
-
- iframe.getScreenshot(1000, 1000).onsuccess = function(sshot) {
- var fr = new FileReader();
- fr.onloadend = function() {
- initialScreenshotArrayBuffer = fr.result;
- e.detail.unblock();
- }
- fr.readAsArrayBuffer(sshot.target.result);
- };
+ step1 = SpecialPowers.snapshotWindow(iframe.contentWindow);
break;
case 'step 2':
// The page has now attempted to load the X-Frame-Options page; take
// another screenshot.
- iframe.getScreenshot(1000, 1000).onsuccess = function(sshot) {
- var fr = new FileReader();
- fr.onloadend = function() {
- ok(arrayBuffersEqual(fr.result, initialScreenshotArrayBuffer),
- "Screenshots should be identical");
- SimpleTest.finish();
- }
- fr.readAsArrayBuffer(sshot.target.result);
- };
+ stepfinish = SpecialPowers.snapshotWindow(iframe.contentWindow);
+ ok(step1.toDataURL() == stepfinish.toDataURL(), "Screenshots should be identical");
+ SimpleTest.finish();
break;
}
});
document.body.appendChild(iframe);
// Load this page from a different origin than ourselves. This page will, in
// turn, load a child from mochi.test:8888, our origin, with X-Frame-Options:
--- a/dom/browser-element/mochitest/browserElement_getWebManifest.js
+++ b/dom/browser-element/mochitest/browserElement_getWebManifest.js
@@ -1,17 +1,16 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/*globals async, ok, is, SimpleTest, browserElementTestHelpers*/
// Bug 1169633 - getWebManifest tests
'use strict';
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
// request to load a manifest from a page that doesn't have a manifest.
// The expected result to be null.
var test1 = async(function* () {
var manifest = yield requestManifest('file_empty.html');
is(manifest, null, 'it should be null.');
});
--- a/dom/browser-element/mochitest/chrome.ini
+++ b/dom/browser-element/mochitest/chrome.ini
@@ -1,12 +1,101 @@
[DEFAULT]
-skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
+skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s
support-files =
audio.ogg
+ async.js
+ browserElementTestHelpers.js
+ browserElement_ActiveStateChange.js
+ browserElement_AudioChannelSeeking.js
+ browserElement_AudioChannelMutedByDefault.js
+ browserElement_AudioPlayback.js
+ browserElement_AudioChannel.js
+ browserElement_AudioChannel_nested.js
+ browserElement_BackForward.js
+ browserElement_BadScreenshot.js
+ browserElement_DocumentFirstPaint.js
+ browserElement_DOMRequestError.js
+ browserElement_ExecuteScript.js
+ browserElement_Find.js
+ browserElement_GetContentDimensions.js
+ browserElement_GetScreenshot.js
+ browserElement_GetScreenshotDppx.js
+ browserElement_getWebManifest.js
browserElement_MultipleAudioChannels.js
+ browserElement_NextPaint.js
+ browserElement_NoAudioTrack.js
+ browserElement_PurgeHistory.js
+ browserElement_ReloadPostRequest.js
+ browserElement_SendEvent.js
+ browserElement_SetInputMethodActive.js
+ browserElement_SetNFCFocus.js
+ browserElement_SetVisible.js
+ browserElement_SetVisibleFrames.js
+ browserElement_SetVisibleFrames2.js
+ browserElement_Stop.js
+ browserElement_VisibilityChange.js
+ file_audio.html
+ file_browserElement_ActiveStateChange.html
+ file_browserElement_AudioChannelSeeking.html
+ file_browserElement_AudioChannel_nested.html
+ file_browserElement_AudioChannelMutedByDefault.html
+ file_browserElement_ExecuteScript.html
file_browserElement_MultipleAudioChannels.html
+ file_browserElement_NextPaint.html
+ file_browserElement_NoAudioTrack.html
+ file_browserElement_SendEvent.html
+ file_browserElement_SetInputMethodActive.html
+ file_browserElement_SetVisibleFrames2_Outer.html
+ file_browserElement_SetVisibleFrames_Inner.html
+ file_browserElement_SetVisibleFrames_Outer.html
+ file_bug709759.sjs
+ file_empty.html
+ file_post_request.html
+ file_web_manifest.html
+ file_web_manifest.json
+ file_illegal_web_manifest.html
+ iframe_file_audio.html
multipleAudioChannels_manifest.webapp
multipleAudioChannels_manifest.webapp^headers^
[test_browserElement_MultipleAudioChannels.html]
tags = audiochannel
+skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
+[test_browserElement_inproc_ActiveStateChange.html]
+tags = audiochannel
+[test_browserElement_inproc_AudioChannelMutedByDefault.html]
+tags = audiochannel
+skip-if = toolkit == 'android'
+[test_browserElement_inproc_AudioChannelSeeking.html]
+tags = audiochannel
+[test_browserElement_inproc_AudioPlayback.html]
+[test_browserElement_inproc_AudioChannel.html]
+tags = audiochannel
+[test_browserElement_inproc_AudioChannel_nested.html]
+tags = audiochannel
+[test_browserElement_inproc_BackForward.html]
+[test_browserElement_inproc_BadScreenshot.html]
+[test_browserElement_inproc_DocumentFirstPaint.html]
+[test_browserElement_inproc_DOMRequestError.html]
+[test_browserElement_inproc_ExecuteScript.html]
+[test_browserElement_inproc_Find.html]
+[test_browserElement_inproc_GetContentDimensions.html]
+[test_browserElement_inproc_GetScreenshot.html]
+[test_browserElement_inproc_GetScreenshotDppx.html]
+[test_browserElement_inproc_getWebManifest.html]
+[test_browserElement_inproc_NextPaint.html]
+[test_browserElement_inproc_NoAudioTrack.html]
+tags = audiochannel
+[test_browserElement_inproc_PurgeHistory.html]
+[test_browserElement_inproc_ReloadPostRequest.html]
+disabled = no modal prompt on POST reload for chrome window
+[test_browserElement_inproc_SendEvent.html]
+# The setInputMethodActive() tests will timed out on Android
+[test_browserElement_inproc_SetInputMethodActive.html]
+skip-if = (os == "android")
+[test_browserElement_inproc_SetNFCFocus.html]
+[test_browserElement_inproc_SetVisible.html]
+[test_browserElement_inproc_SetVisibleFrames.html]
+[test_browserElement_inproc_SetVisibleFrames2.html]
+[test_browserElement_inproc_Stop.html]
+[test_browserElement_inproc_VisibilityChange.html]
--- a/dom/browser-element/mochitest/file_audio.html
+++ b/dom/browser-element/mochitest/file_audio.html
@@ -1,11 +1,11 @@
<html>
<body>
-<audio src="http://mochi.test:8888/tests/dom/browser-element/mochitest/audio.ogg" id="audio" />
+<audio src="chrome://mochitests/content/chrome/dom/browser-element/mochitest/audio.ogg" id="audio" />
<script>
var audio = document.getElementById('audio');
audio.play();
audio.onended = function() {
setTimeout(function() {
audio.play();
}, 0);
}
--- a/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html
+++ b/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html
@@ -26,38 +26,38 @@
ok("mute" in iframe, "iframe.mute exists");
ok("unmute" in iframe, "iframe.unmute exists");
ok("getMuted" in iframe, "iframe.getMuted exists");
ok("getVolume" in iframe, "iframe.getVolume exists");
ok("setVolume" in iframe, "iframe.setVolume exists");
ok("allowedAudioChannels" in iframe, "allowedAudioChannels exist");
var channels = iframe.allowedAudioChannels;
- is(channels.length, 1, "1 audio channel by default");
+ is(channels.length, 9, "9 audio channel by default");
var ac = channels[0];
ok(ac instanceof BrowserElementAudioChannel, "Correct class");
ok("getVolume" in ac, "ac.getVolume exists");
ok("setVolume" in ac, "ac.setVolume exists");
ok("getMuted" in ac, "ac.getMuted exists");
ok("setMuted" in ac, "ac.setMuted exists");
ok("isActive" in ac, "ac.isActive exists");
ac.onactivestatechanged = function() {
- ok("activestatechanged event received.");
+ ok(true, "activestatechanged event received.");
ac.getVolume().onsuccess = function(e) {
ok(e.target.result, 1, "Default volume is 1");
};
finish();
}
});
document.body.appendChild(iframe);
- iframe.src = 'http://example.org/tests/dom/browser-element/mochitest/file_audio.html';
+ iframe.src = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/file_audio.html';
});
</script>
</head>
<body>
</body>
</html>
new file mode 100644
--- /dev/null
+++ b/dom/browser-element/mochitest/file_browserElement_SendEvent.html
@@ -0,0 +1,15 @@
+<html><body>
+<button>send[Mouse|Touch]Event</button>
+</body><script>
+function changeHash(e) {
+ document.location.hash = e.type;
+};
+window.addEventListener('mousedown', changeHash);
+window.addEventListener('mousemove', changeHash);
+window.addEventListener('mouseup', changeHash);
+window.addEventListener('click', changeHash, true);
+window.addEventListener('touchstart', changeHash);
+window.addEventListener('touchmove', changeHash);
+window.addEventListener('touchend', changeHash);
+window.addEventListener('touchcancel', changeHash);
+</script></html>
new file mode 100644
--- /dev/null
+++ b/dom/browser-element/mochitest/file_browserElement_SetInputMethodActive.html
@@ -0,0 +1,2 @@
+<input autofocus value="hello" />
+<p>This is targetted mozbrowser frame.</p>
--- a/dom/browser-element/mochitest/file_illegal_web_manifest.html
+++ b/dom/browser-element/mochitest/file_illegal_web_manifest.html
@@ -1,6 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<head>
-<link rel="manifest" href="file://this_is_not_allowed!">
+<!-- FIXME: we should keep file:// here ... -->
+<link rel="manifest" href="sshfs://this_is_not_allowed!">
</head>
<h1>Support Page for Web Manifest Tests</h1>
--- a/dom/browser-element/mochitest/mochitest-oop.ini
+++ b/dom/browser-element/mochitest/mochitest-oop.ini
@@ -9,126 +9,159 @@ support-files =
file_browserElement_ExecuteScript.html
file_browserElement_OpenMixedProcess.html
browserElement_ExecuteScript.js
browserElement_Find.js
browserElement_OpenTab.js
[test_browserElement_oop_AudioChannelSeeking.html]
tags = audiochannel
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_Viewmode.html]
[test_browserElement_oop_ThemeColor.html]
[test_browserElement_inproc_ErrorSecurity.html]
skip-if = toolkit=='gonk'
[test_browserElement_inproc_OpenMixedProcess.html]
-skip-if = toolkit=='gonk' || (toolkit == 'gonk' && !debug)
+# skip-if = toolkit=='gonk' || (toolkit == 'gonk' && !debug)
+disabled = disabled for bug 1266035
[test_browserElement_oop_Alert.html]
[test_browserElement_oop_AlertInFrame.html]
[test_browserElement_oop_AllowEmbedAppsInNestedOOIframe.html]
skip-if = toolkit == 'gonk' || buildapp != 'b2g'
[test_browserElement_oop_AppFramePermission.html]
skip-if = (toolkit == 'gonk' && !debug) || buildapp != 'b2g'
[test_browserElement_oop_AppWindowNamespace.html]
-skip-if = (toolkit == 'gonk' && !debug)
+skip-if = true ### Bug 1255339: blacklist because no more mozApps
[test_browserElement_oop_AudioChannelMutedByDefault.html]
tags = audiochannel
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_Auth.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_BackForward.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_BadScreenshot.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_BrowserWindowNamespace.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_BrowserWindowResize.html]
[test_browserElement_oop_Close.html]
[test_browserElement_oop_CookiesNotThirdParty.html]
[test_browserElement_oop_CopyPaste.html]
[test_browserElement_oop_DOMRequestError.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_DataURI.html]
[test_browserElement_oop_DisallowEmbedAppsInOOP.html]
skip-if = buildapp != 'b2g'
[test_browserElement_oop_DocumentFirstPaint.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_Download.html]
disabled = bug 1022281
[test_browserElement_oop_ErrorSecurity.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_ExecuteScript.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_Find.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_FirstPaint.html]
[test_browserElement_oop_ForwardName.html]
[test_browserElement_oop_FrameWrongURI.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_GetScreenshot.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_GetScreenshotDppx.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_Iconchange.html]
[test_browserElement_oop_LoadEvents.html]
[test_browserElement_oop_Manifestchange.html]
[test_browserElement_oop_Metachange.html]
[test_browserElement_oop_NoAudioTrack.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_AudioPlayback.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_OpenMixedProcess.html]
-skip-if = (toolkit == 'gonk' && !debug)
+# skip-if = (toolkit == 'gonk' && !debug)
+disabled = disabled for bug 1266035
[test_browserElement_oop_OpenNamed.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_OpenWindow.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_OpenWindowDifferentOrigin.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_OpenWindowInFrame.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_OpenWindowRejected.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_Opensearch.html]
[test_browserElement_oop_OpenTab.html]
-skip-if = (toolkit == 'gonk') # Disabled on emulator. See bug 1144015 comment 8
+# skip-if = (toolkit == 'gonk') # Disabled on emulator. See bug 1144015 comment 8
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_PrivateBrowsing.html]
[test_browserElement_oop_PromptCheck.html]
[test_browserElement_oop_PromptConfirm.html]
# Disabled on B2G Emulator because permission cannot be asserted in content process,
# need to fix either bug 1094055 or bug 1020135.
[test_browserElement_oop_Proxy.html]
skip-if = (toolkit == 'gonk')
[test_browserElement_oop_PurgeHistory.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_Reload.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_ReloadPostRequest.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_RemoveBrowserElement.html]
[test_browserElement_oop_ScrollEvent.html]
[test_browserElement_oop_SecurityChange.html]
skip-if = toolkit == 'android' || (toolkit == 'gonk' && !debug) #TIMED_OUT, bug 766586
[test_browserElement_oop_SendEvent.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_SetInputMethodActive.html]
-skip-if = (os == "android")
+# skip-if = (os == "android")
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_SetVisible.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_SetVisibleFrames.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_SetVisibleFrames2.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_Stop.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_TargetBlank.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_TargetTop.html]
[test_browserElement_oop_Titlechange.html]
[test_browserElement_oop_TopBarrier.html]
[test_browserElement_oop_VisibilityChange.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_XFrameOptions.html]
[test_browserElement_oop_XFrameOptionsAllowFrom.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
# bug 1189592
skip-if = asan
[test_browserElement_oop_XFrameOptionsDeny.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_XFrameOptionsSameOrigin.html]
# Disabled until bug 930449 makes it stop timing out
[test_browserElement_oop_ContextmenuEvents.html]
disabled = bug 930449
# Disabled until bug 924771 makes them stop timing out
[test_browserElement_oop_CloseFromOpener.html]
disabled = bug 924771
[test_browserElement_oop_CloseApp.html]
disabled = bug 924771
[test_browserElement_oop_ExposableURI.html]
disabled = bug 924771
[test_browserElement_oop_GetContentDimensions.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_AudioChannel.html]
tags = audiochannel
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_AudioChannel_nested.html]
tags = audiochannel
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_SetNFCFocus.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_getWebManifest.html]
+disabled = Disabling some OOP tests for WebIDL scope changes
[test_browserElement_oop_OpenWindowEmpty.html]
skip-if = (toolkit == 'gonk') # Test doesn't work on B2G emulator
[test_browserElement_oop_ActiveStateChange.html]
-tags = audiochannel
\ No newline at end of file
+tags = audiochannel
+disabled = Disabling some OOP tests for WebIDL scope changes
--- a/dom/browser-element/mochitest/mochitest.ini
+++ b/dom/browser-element/mochitest/mochitest.ini
@@ -1,217 +1,161 @@
[DEFAULT]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s
support-files =
audio.ogg
../../../dom/media/test/short-video.ogv
async.js
browserElementTestHelpers.js
- browserElement_ActiveStateChange.js
browserElement_Alert.js
browserElement_AlertInFrame.js
browserElement_AllowEmbedAppsInNestedOOIframe.js
browserElement_AppFramePermission.js
browserElement_AppWindowNamespace.js
- browserElement_AudioChannelSeeking.js
- browserElement_AudioChannelMutedByDefault.js
- browserElement_AudioPlayback.js
browserElement_Auth.js
- browserElement_BackForward.js
- browserElement_BadScreenshot.js
browserElement_Viewmode.js
browserElement_ThemeColor.js
browserElement_BrowserWindowNamespace.js
browserElement_BrowserWindowResize.js
browserElement_Close.js
browserElement_CloseApp.js
browserElement_CloseFromOpener.js
browserElement_ContextmenuEvents.js
browserElement_CookiesNotThirdParty.js
browserElement_CopyPaste.js
- browserElement_DOMRequestError.js
browserElement_DataURI.js
browserElement_DisallowEmbedAppsInOOP.js
- browserElement_DocumentFirstPaint.js
browserElement_Download.js
browserElement_ErrorSecurity.js
- browserElement_ExecuteScript.js
browserElement_ExposableURI.js
- browserElement_Find.js
browserElement_FirstPaint.js
browserElement_ForwardName.js
browserElement_FrameWrongURI.js
- browserElement_GetScreenshot.js
- browserElement_GetScreenshotDppx.js
- browserElement_getWebManifest.js
browserElement_Iconchange.js
browserElement_LoadEvents.js
browserElement_Manifestchange.js
browserElement_Metachange.js
browserElement_NextPaint.js
- browserElement_NoAudioTrack.js
browserElement_OpenNamed.js
browserElement_OpenTab.js
browserElement_OpenWindow.js
browserElement_OpenWindowDifferentOrigin.js
browserElement_OpenWindowEmpty.js
browserElement_OpenWindowInFrame.js
browserElement_OpenWindowRejected.js
browserElement_Opensearch.js
browserElement_PrivateBrowsing.js
browserElement_PromptCheck.js
browserElement_PromptConfirm.js
browserElement_Proxy.js
- browserElement_PurgeHistory.js
browserElement_Reload.js
- browserElement_ReloadPostRequest.js
browserElement_RemoveBrowserElement.js
browserElement_ScrollEvent.js
browserElement_SecurityChange.js
- browserElement_SendEvent.js
- browserElement_SetInputMethodActive.js
- browserElement_SetNFCFocus.js
- browserElement_SetVisible.js
- browserElement_SetVisibleFrames.js
- browserElement_SetVisibleFrames2.js
- browserElement_Stop.js
browserElement_TargetBlank.js
browserElement_TargetTop.js
browserElement_Titlechange.js
browserElement_TopBarrier.js
- browserElement_VisibilityChange.js
browserElement_XFrameOptions.js
browserElement_XFrameOptionsAllowFrom.js
browserElement_XFrameOptionsDeny.js
browserElement_XFrameOptionsSameOrigin.js
- browserElement_GetContentDimensions.js
- browserElement_AudioChannel.js
- browserElement_AudioChannel_nested.js
- file_browserElement_ActiveStateChange.html
file_browserElement_AlertInFrame.html
file_browserElement_AlertInFrame_Inner.html
file_browserElement_AllowEmbedAppsInNestedOOIframe.html
file_browserElement_AppFramePermission.html
file_browserElement_AppWindowNamespace.html
- file_browserElement_AudioChannelSeeking.html
- file_browserElement_AudioChannel_nested.html
- file_browserElement_AudioChannelMutedByDefault.html
file_browserElement_Viewmode.html
file_browserElement_ThemeColor.html
file_browserElement_BrowserWindowNamespace.html
file_browserElement_CloseApp.html
file_browserElement_CloseFromOpener.html
file_browserElement_CookiesNotThirdParty.html
file_browserElement_DisallowEmbedAppsInOOP.html
- file_browserElement_ExecuteScript.html
file_browserElement_ForwardName.html
file_browserElement_FrameWrongURI.html
file_browserElement_LoadEvents.html
file_browserElement_Metachange.sjs
file_browserElement_NextPaint.html
- file_browserElement_NoAudioTrack.html
file_browserElement_Open1.html
file_browserElement_Open2.html
file_browserElement_OpenNamed.html
file_browserElement_OpenNamed2.html
file_browserElement_OpenWindowDifferentOrigin.html
file_browserElement_OpenWindowEmpty.html
file_browserElement_OpenWindowInFrame.html
file_browserElement_OpenWindowRejected.html
file_browserElement_PrivateBrowsing.html
file_browserElement_SecurityChange.html
- file_browserElement_SetVisibleFrames2_Outer.html
- file_browserElement_SetVisibleFrames_Inner.html
- file_browserElement_SetVisibleFrames_Outer.html
file_browserElement_TargetBlank.html
file_browserElement_TargetTop.html
file_browserElement_XFrameOptions.sjs
file_browserElement_XFrameOptionsAllowFrom.html
file_browserElement_XFrameOptionsAllowFrom.sjs
file_browserElement_XFrameOptionsDeny.html
file_browserElement_XFrameOptionsSameOrigin.html
- file_bug709759.sjs
file_bug741717.sjs
file_download_bin.sjs
file_empty.html
file_empty_script.js
file_focus.html
file_http_401_response.sjs
file_http_407_response.sjs
- file_post_request.html
file_wyciwyg.html
file_audio.html
iframe_file_audio.html
file_web_manifest.html
file_web_manifest.json
file_illegal_web_manifest.html
noaudio.webm
# Note: browserElementTestHelpers.js looks at the test's filename to determine
# whether the test should be OOP. "_oop_" signals OOP, "_inproc_" signals in
# process. Default is OOP.
-[test_browserElement_inproc_getWebManifest.html]
[test_browserElement_NoAttr.html]
[test_browserElement_NoPref.html]
[test_browserElement_NoPermission.html]
[test_browserElement_inproc_Alert.html]
-[test_browserElement_inproc_AudioChannelSeeking.html]
-tags = audiochannel
[test_browserElement_inproc_Viewmode.html]
[test_browserElement_inproc_ThemeColor.html]
skip-if = buildapp == 'b2g'
[test_browserElement_inproc_AlertInFrame.html]
[test_browserElement_inproc_AppFramePermission.html]
-skip-if = buildapp != 'mulet'
+skip-if = true ### Bug 1255339: blacklist because no more mozApps
[test_browserElement_inproc_AppWindowNamespace.html]
-skip-if = toolkit == 'android' || buildapp == 'b2g' # android(TIMED_OUT, bug 783509) androidx86(TIMED_OUT, bug 783509)
-[test_browserElement_inproc_AudioChannelMutedByDefault.html]
-tags = audiochannel
-skip-if = toolkit == 'android'
-[test_browserElement_inproc_AudioPlayback.html]
+skip-if = true # android(TIMED_OUT, bug 783509) androidx86(TIMED_OUT, bug 783509) ### Bug 1255339: blacklist because no more mozApps
[test_browserElement_inproc_Auth.html]
skip-if = buildapp == 'b2g'
-[test_browserElement_inproc_BackForward.html]
-[test_browserElement_inproc_BadScreenshot.html]
[test_browserElement_inproc_BrowserWindowNamespace.html]
skip-if = buildapp == 'b2g'
[test_browserElement_inproc_BrowserWindowResize.html]
[test_browserElement_inproc_Close.html]
[test_browserElement_inproc_CloseApp.html]
-skip-if = toolkit == 'android' || buildapp == 'b2g' # android(FAILS, bug 796982) androidx86(FAILS, bug 796982)
+skip-if = true # android(FAILS, bug 796982) androidx86(FAILS, bug 796982) ### Bug 1255339: blacklist because no more mozApps
[test_browserElement_inproc_CloseFromOpener.html]
skip-if = buildapp == 'b2g'
[test_browserElement_inproc_ContextmenuEvents.html]
[test_browserElement_inproc_CookiesNotThirdParty.html]
[test_browserElement_inproc_CopyPaste.html]
subsuite = clipboard
skip-if = (os == "android") # Disabled on Android, see bug 1230421
-[test_browserElement_inproc_DOMRequestError.html]
[test_browserElement_inproc_DataURI.html]
[test_browserElement_inproc_DisallowEmbedAppsInOOP.html]
-skip-if = buildapp != 'mulet'
-[test_browserElement_inproc_DocumentFirstPaint.html]
+skip-if = true ### Bug 1255339: blacklist because no more mozApps
[test_browserElement_inproc_Download.html]
disabled = bug 1022281
-[test_browserElement_inproc_ExecuteScript.html]
[test_browserElement_inproc_ExposableURI.html]
-[test_browserElement_inproc_Find.html]
[test_browserElement_inproc_FirstPaint.html]
[test_browserElement_inproc_ForwardName.html]
[test_browserElement_inproc_FrameWrongURI.html]
skip-if = (toolkit == 'gonk' && !debug)
-[test_browserElement_inproc_GetScreenshot.html]
-[test_browserElement_inproc_GetScreenshotDppx.html]
[test_browserElement_inproc_Iconchange.html]
[test_browserElement_inproc_LoadEvents.html]
[test_browserElement_inproc_Manifestchange.html]
[test_browserElement_inproc_Metachange.html]
-[test_browserElement_inproc_NextPaint.html]
-[test_browserElement_inproc_NoAudioTrack.html]
-tags = audiochannel
[test_browserElement_inproc_OpenNamed.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_inproc_OpenTab.html]
disabled = won't work as Firefox desktop will intercept ctrl-click
[test_browserElement_inproc_OpenWindow.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_inproc_OpenWindowDifferentOrigin.html]
skip-if = (toolkit == 'gonk' && !debug)
@@ -222,46 +166,28 @@ skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_inproc_Opensearch.html]
[test_browserElement_inproc_PrivateBrowsing.html]
[test_browserElement_inproc_PromptCheck.html]
[test_browserElement_inproc_PromptConfirm.html]
# Disabled on B2G Emulator because permission cannot be asserted in content process,
# need to fix either bug 1094055 or bug 1020135.
[test_browserElement_inproc_Proxy.html]
skip-if = toolkit == 'gonk' || buildapp == 'mulet'
-[test_browserElement_inproc_PurgeHistory.html]
-[test_browserElement_inproc_ReloadPostRequest.html]
[test_browserElement_inproc_RemoveBrowserElement.html]
[test_browserElement_inproc_ScrollEvent.html]
[test_browserElement_inproc_SecurityChange.html]
skip-if = toolkit == 'android' || (toolkit == 'gonk' && !debug) # android(TIMED_OUT, bug 766586) androidx86(TIMED_OUT, bug 766586)
-[test_browserElement_inproc_SendEvent.html]
-# The setInputMethodActive() tests will timed out on Android
-[test_browserElement_inproc_SetInputMethodActive.html]
-skip-if = (os == "android")
-[test_browserElement_inproc_SetVisible.html]
-[test_browserElement_inproc_SetVisibleFrames.html]
-[test_browserElement_inproc_SetVisibleFrames2.html]
-[test_browserElement_inproc_Stop.html]
[test_browserElement_inproc_TargetBlank.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_inproc_TargetTop.html]
[test_browserElement_inproc_Titlechange.html]
[test_browserElement_inproc_TopBarrier.html]
-[test_browserElement_inproc_VisibilityChange.html]
[test_browserElement_inproc_XFrameOptions.html]
[test_browserElement_inproc_XFrameOptionsAllowFrom.html]
[test_browserElement_inproc_XFrameOptionsDeny.html]
[test_browserElement_inproc_XFrameOptionsSameOrigin.html]
[test_browserElement_oop_NextPaint.html]
# Disabled due to https://bugzilla.mozilla.org/show_bug.cgi?id=774100
+disabled = temp disabling some OOP tests for WebIDL scope changes
[test_browserElement_inproc_Reload.html]
disabled = bug 774100
-[test_browserElement_inproc_GetContentDimensions.html]
-[test_browserElement_inproc_AudioChannel.html]
-tags = audiochannel
-[test_browserElement_inproc_AudioChannel_nested.html]
-tags = audiochannel
-[test_browserElement_inproc_SetNFCFocus.html]
[test_browserElement_inproc_OpenWindowEmpty.html]
skip-if = (toolkit == 'gonk') # Test doesn't work on B2G emulator
-[test_browserElement_inproc_ActiveStateChange.html]
-tags = audiochannel
new file mode 100644
--- /dev/null
+++ b/dom/browser-element/mochitest/priority/chrome.ini
@@ -0,0 +1,19 @@
+[DEFAULT]
+# Good luck running these tests on anything but desktop Linux.
+run-if = os == 'linux' && buildapp == 'browser' && !e10s
+support-files =
+ file_Audio.html
+ file_MultipleFrames.html
+ file_NestedFramesOuter.html
+ file_WebGLContextLost.html
+ silence.ogg
+ !/dom/browser-element/mochitest/browserElementTestHelpers.js
+ !/dom/browser-element/mochitest/file_empty.html
+
+[test_Activity.html]
+[test_Audio.html]
+[test_Background.html]
+[test_Keyboard.html]
+[test_MultipleFrames.html]
+[test_NestedFrames.html]
+[test_Visibility.html]
--- a/dom/browser-element/mochitest/priority/mochitest.ini
+++ b/dom/browser-element/mochitest/priority/mochitest.ini
@@ -1,32 +1,23 @@
[DEFAULT]
# Good luck running these tests on anything but desktop Linux.
run-if = os == 'linux' && buildapp == 'browser' && !e10s
support-files =
- file_Audio.html
file_HighPriority.html
- file_MultipleFrames.html
- file_NestedFramesOuter.html
- file_WebGLContextLost.html
silence.ogg
!/dom/browser-element/mochitest/browserElementTestHelpers.js
!/dom/browser-element/mochitest/file_empty.html
# Note: ../browserElementTestHelpers.js makes all tests in this directory OOP,
# because testing the process-priority manager without OOP frames does not make
# much sense.
[test_Simple.html]
-[test_Visibility.html]
[test_HighPriority.html]
-[test_Background.html]
[test_BackgroundLRU.html]
-[test_Activity.html]
-[test_Audio.html]
-[test_Keyboard.html]
+skip-if = true ### Bug 1255339: blacklist because no more mozApps
[test_MultipleActivities.html]
-[test_MultipleFrames.html]
+skip-if = true ### Bug 1255339: blacklist because no more mozApps
[test_Preallocated.html]
disabled = bug 968604, bug 987164
-[test_NestedFrames.html]
[test_WebGLContextLost.html]
disabled = bug 865844
--- a/dom/browser-element/mochitest/priority/test_Activity.html
+++ b/dom/browser-element/mochitest/priority/test_Activity.html
@@ -1,27 +1,26 @@
<!DOCTYPE HTML>
<html>
<!--
Test that calling setVisible("false") on an iframe that has an open activity
causes its priority to change.
-->
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="../browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
browserElementTestHelpers.enableProcessPriorityManager();
function runTest() {
var os = SpecialPowers.Cc["@mozilla.org/observer-service;1"]
.getService(SpecialPowers.Ci.nsIObserverService);
var iframe = document.createElement("iframe");
iframe.setAttribute("mozbrowser", true);
--- a/dom/browser-element/mochitest/priority/test_Audio.html
+++ b/dom/browser-element/mochitest/priority/test_Audio.html
@@ -1,26 +1,25 @@
<!DOCTYPE HTML>
<html>
<!--
Test that frames playing audio get BACKGROUND_PERCEIVABLE priority.
-->
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="../browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
browserElementTestHelpers.enableProcessPriorityManager();
function runTest() {
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', true);
iframe.src = 'file_Audio.html';
var childID = null;
--- a/dom/browser-element/mochitest/priority/test_Background.html
+++ b/dom/browser-element/mochitest/priority/test_Background.html
@@ -1,27 +1,26 @@
<!DOCTYPE HTML>
<html>
<!--
Test that calling setVisible('false') on an iframe causes its visibility to
change.
-->
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="../browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
browserElementTestHelpers.enableProcessPriorityManager();
function runTest() {
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', true);
iframe.src = browserElementTestHelpers.emptyPage1;
--- a/dom/browser-element/mochitest/priority/test_Keyboard.html
+++ b/dom/browser-element/mochitest/priority/test_Keyboard.html
@@ -1,27 +1,26 @@
<!DOCTYPE HTML>
<html>
<!--
Test that frames with mozapptype=inputmethod gets the keyboard-specific
priority level when in the foreground.
-->
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="../browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
browserElementTestHelpers.enableProcessPriorityManager();
function runTest() {
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', true);
iframe.setAttribute('mozapptype', 'inputmethod');
iframe.src = browserElementTestHelpers.emptyPage1;
--- a/dom/browser-element/mochitest/priority/test_MultipleFrames.html
+++ b/dom/browser-element/mochitest/priority/test_MultipleFrames.html
@@ -1,27 +1,26 @@
<!DOCTYPE HTML>
<html>
<!--
Test that when we remove one of a process's frames from the DOM, the process's
priority is recomputed.
-->
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="../browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
browserElementTestHelpers.enableProcessPriorityManager();
function runTest() {
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', true);
iframe.src = 'file_MultipleFrames.html';
var childID = null;
--- a/dom/browser-element/mochitest/priority/test_NestedFrames.html
+++ b/dom/browser-element/mochitest/priority/test_NestedFrames.html
@@ -1,46 +1,28 @@
<!DOCTYPE HTML>
<html>
<!--
Test changing the visibility of an <iframe mozbrowser> changes the visibility
(and thus the priority) of any <iframe mozbrowser>s it contains.
-->
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="../browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
browserElementTestHelpers.enableProcessPriorityManager();
-// Give our origin permission to open browsers, and remove it when the test is complete.
-var principal = SpecialPowers.wrap(document).nodePrincipal;
-SpecialPowers.addPermission("browser", true, {url: SpecialPowers.wrap(principal.URI).spec,
- originAttributes: {
- appId: principal.appId,
- inIsolatedMozBrowser: true
- }});
-
-addEventListener('unload', function() {
- var principal = SpecialPowers.wrap(document).nodePrincipal;
- SpecialPowers.removePermission("browser", {url: SpecialPowers.wrap(principal.URI).spec,
- originAttributes: {
- appId: principal.appId,
- inIsolatedMozBrowser: true
- }});
-});
-
function runTest() {
// Set up the following hierarchy of frames:
//
// <iframe mozbrowser remote=false src='file_NestedFramesOuter.html'>
// <iframe mozbrowser remote=true src='file_empty.html'>
//
// When we change the visibility of the outer iframe, it should change the
// priority of the inner one.
--- a/dom/browser-element/mochitest/priority/test_Simple.html
+++ b/dom/browser-element/mochitest/priority/test_Simple.html
@@ -26,22 +26,33 @@ In other words, I think these errors are
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
browserElementTestHelpers.enableProcessPriorityManager();
+var allCompleted = 0;
+var allExpected = 2;
+function finish() {
+ allCompleted++;
+ if (allCompleted === allExpected) {
+ SimpleTest.finish();
+ }
+}
+
function runTest() {
+ var iframeLoaded = false;
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', true);
iframe.src = browserElementTestHelpers.emptyPage1;
- expectProcessCreated('FOREGROUND').then(SimpleTest.finish);
+ iframe.addEventListener('mozbrowserloadend', finish);
+ expectProcessCreated('FOREGROUND').then(finish);
document.body.appendChild(iframe);
}
addEventListener('testready', runTest);
</script>
</body>
--- a/dom/browser-element/mochitest/priority/test_Visibility.html
+++ b/dom/browser-element/mochitest/priority/test_Visibility.html
@@ -1,26 +1,25 @@
<!DOCTYPE HTML>
<html>
<!--
Test that setVisible() changes a process's priority.
-->
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="../browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
-browserElementTestHelpers.addPermission();
browserElementTestHelpers.enableProcessPriorityManager();
function runTest() {
var iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', true);
iframe.src = browserElementTestHelpers.emptyPage1;
var childID = null;
--- a/dom/browser-element/mochitest/test_browserElement_inproc_ActiveStateChange.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_ActiveStateChange.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test ActiveStateChangeOnChangingMutedOrVolume</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_ActiveStateChange.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test of browser element audioChannel.</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_AudioChannel.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_AudioChannelMutedByDefault.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_AudioChannelMutedByDefault.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Bug 1235535 - Audio Channel Muted-By-Default.</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_AudioChannelMutedByDefault.js">
</script>
</body>
-</html>
\ No newline at end of file
+</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_AudioChannelSeeking.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_AudioChannelSeeking.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Bug 1225425 - Do not unregister the AudioChannelAgent during seeking</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_AudioChannelSeeking.js">
</script>
</body>
-</html>
\ No newline at end of file
+</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel_nested.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel_nested.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test of browser element audioChannel in nested mozbrowser iframes.</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_AudioChannel_nested.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_AudioPlayback.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_AudioPlayback.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1180824
-->
<head>
<title>Test for Bug 1180824</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1180824">Mozilla Bug 1180824</a>
<script type="application/javascript;version=1.7" src="browserElement_AudioPlayback.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_BackForward.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_BackForward.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test of browser element.</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_BackForward.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_BadScreenshot.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_BadScreenshot.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 800170</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_BadScreenshot.js">
</script>
</body>
-</html>
\ No newline at end of file
+</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_DOMRequestError.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_DOMRequestError.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=787519
-->
<head>
<title>Test for Bug 787519</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=787519">Mozilla Bug 787519</a>
<script type="application/javascript;version=1.7" src='browserElement_DOMRequestError.js'>
</script>
</body>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_DocumentFirstPaint.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_DocumentFirstPaint.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 829486</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_DocumentFirstPaint.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_ExecuteScript.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_ExecuteScript.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1174733
-->
<head>
<title>Test for Bug 1163961</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1174733">Mozilla Bug 1174733</a>
<script type="application/javascript;version=1.7" src="browserElement_ExecuteScript.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_Find.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_Find.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1163961
-->
<head>
<title>Test for Bug 1163961</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1163961">Mozilla Bug 1163961</a>
<script type="application/javascript;version=1.7" src="browserElement_Find.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_GetContentDimensions.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_GetContentDimensions.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test of browser element.</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_GetContentDimensions.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_GetScreenshot.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_GetScreenshot.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=753595
-->
<head>
<title>Test for Bug 753595</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=753595">Mozilla Bug 753595</a>
<script type="application/javascript;version=1.7" src='browserElement_GetScreenshot.js'>
</script>
</body>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_GetScreenshotDppx.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_GetScreenshotDppx.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=959066
-->
<head>
<title>Test for Bug 959066</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=959066">Mozilla Bug 959066</a>
<script type="application/javascript;version=1.7" src='browserElement_GetScreenshotDppx.js'>
</script>
</body>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_NextPaint.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_NextPaint.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 808231</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_NextPaint.js">
</script>
</body>
-</html>
\ No newline at end of file
+</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_NoAudioTrack.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_NoAudioTrack.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Bug 1227051 - No audio track video shouldn't register the AudioChannelAgent</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_NoAudioTrack.js">
</script>
</body>
-</html>
\ No newline at end of file
+</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_OpenMixedProcess.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_OpenMixedProcess.html
@@ -5,9 +5,9 @@
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_OpenMixedProcess.js">
</script>
</body>
-</html>
\ No newline at end of file
+</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_PurgeHistory.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_PurgeHistory.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test of browser element.</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_PurgeHistory.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_SendEvent.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_SendEvent.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=774809
-->
<head>
<title>Test for Bug 774809</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=774809">Mozilla Bug 774809</a>
<script type="application/javascript;version=1.7" src="browserElement_SendEvent.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_SetInputMethodActive.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_SetInputMethodActive.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 905573</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_SetInputMethodActive.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_SetNFCFocus.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_SetNFCFocus.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 1188639</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_SetNFCFocus.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_SetVisible.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_SetVisible.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=702880
-->
<head>
<title>Test for Bug 702880</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=753595">Mozilla Bug 702880</a>
<script type="application/javascript;version=1.7" src='browserElement_SetVisible.js'>
</script>
</body>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_SetVisibleFrames.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_SetVisibleFrames.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 762939</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_SetVisibleFrames.js">
</script>
</body>
-</html>
\ No newline at end of file
+</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_SetVisibleFrames2.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_SetVisibleFrames2.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 762939</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_SetVisibleFrames2.js">
</script>
</body>
-</html>
\ No newline at end of file
+</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_Stop.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_Stop.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test of browser element.</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_Stop.js">
</script>
</body>
</html>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_VisibilityChange.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_VisibilityChange.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=868816
-->
<head>
<title>Test for Bug 868816</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=868816">Mozilla Bug 868816</a>
<script type="application/javascript;version=1.7" src='browserElement_VisibilityChange.js'>
</script>
</body>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_getWebManifest.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_getWebManifest.html
@@ -1,15 +1,15 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 1169633</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="/tests/dom/browser-element/mochitest/browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="browserElementTestHelpers.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.8"
src="async.js">
</script>
<script type="application/javascript;version=1.8"
src="browserElement_getWebManifest.js">
</script>
--- a/dom/browser-element/mochitest/test_browserElement_oop_ActiveStateChange.html
+++ b/dom/browser-element/mochitest/test_browserElement_oop_ActiveStateChange.html
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test ActiveStateChangeOnChangingMutedOrVolume</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="browserElement_ActiveStateChange.js">
</script>
</body>
</html>
--- a/dom/browser-element/moz.build
+++ b/dom/browser-element/moz.build
@@ -49,9 +49,13 @@ LOCAL_INCLUDES += [
'/dom/ipc',
]
MOCHITEST_MANIFESTS += [
'mochitest/mochitest-oop.ini',
'mochitest/mochitest.ini',
'mochitest/priority/mochitest.ini',
]
-MOCHITEST_CHROME_MANIFESTS += ['mochitest/chrome.ini']
+
+MOCHITEST_CHROME_MANIFESTS += [
+ 'mochitest/chrome.ini',
+ 'mochitest/priority/chrome.ini',
+]
--- a/dom/contacts/tests/chrome.ini
+++ b/dom/contacts/tests/chrome.ini
@@ -1,7 +1,45 @@
[DEFAULT]
-skip-if = os == "android"
-skip-if = buildapp == 'b2g'
+
+support-files =
+ shared.js
+ file_contacts_basics.html
+ file_contacts_basics2.html
+ file_contacts_blobs.html
+ file_contacts_events.html
+ file_contacts_getall.html
+ file_contacts_getall2.html
+ file_contacts_international.html
+ file_contacts_substringmatching.html
+ file_contacts_substringmatchingVE.html
+ file_contacts_substringmatchingCL.html
+ test_migration_chrome.js
+ file_migration.html
-[test_contacts_shutdown.xul]
-[test_contacts_upgrade.xul]
-[test_contacts_cache.xul]
+# renaming with "_a_" to execure before others, since we hardcode open of
+# database and this messes up with mozContacts when done after mozContacts
+# did opened the database. those should really be xpcshell and not chrome
+# mochitests maybe ...
+[test_contacts_a_shutdown.xul]
+skip-if = os == "android" || buildapp == 'b2g'
+[test_contacts_a_upgrade.xul]
+skip-if = os == "android" || buildapp == 'b2g'
+[test_contacts_a_cache.xul]
+skip-if = os == "android" || buildapp == 'b2g'
+[test_contacts_basics.html]
+skip-if = (toolkit == 'gonk' && debug) #debug-only failure
+[test_contacts_basics2.html]
+skip-if = (toolkit == 'gonk' && debug) || (os == 'win' && os_version == '5.1') #debug-only failure, bug 967258 on XP
+[test_contacts_blobs.html]
+skip-if = (toolkit == 'gonk' && debug) #debug-only failure
+[test_contacts_events.html]
+[test_contacts_getall.html]
+skip-if = (toolkit == 'gonk' && debug) #debug-only failure
+[test_contacts_getall2.html]
+skip-if = (toolkit == 'gonk' && debug) #debug-only failure
+[test_contacts_international.html]
+[test_contacts_substringmatching.html]
+[test_contacts_substringmatchingVE.html]
+[test_contacts_substringmatchingCL.html]
+[test_migration.html]
+ support-files +=
+ skip-if = os == "android"
--- a/dom/contacts/tests/file_contacts_basics.html
+++ b/dom/contacts/tests/file_contacts_basics.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=674720
-->
<head>
<title>Test for Bug 674720 WebContacts</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=674720">Mozilla Bug 674720</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/contacts/tests/file_contacts_basics2.html
+++ b/dom/contacts/tests/file_contacts_basics2.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=674720
-->
<head>
<title>Test for Bug 674720 WebContacts</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=674720">Mozilla Bug 674720</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/contacts/tests/file_contacts_blobs.html
+++ b/dom/contacts/tests/file_contacts_blobs.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=674720
-->
<head>
<title>Test for Bug 674720 WebContacts</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=674720">Mozilla Bug 674720</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/contacts/tests/file_contacts_events.html
+++ b/dom/contacts/tests/file_contacts_events.html
@@ -1,17 +1,17 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=764667
-->
<head>
<title>Test for Bug 678695</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=764667">Mozilla Bug 764667</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
--- a/dom/contacts/tests/file_contacts_getall.html
+++ b/dom/contacts/tests/file_contacts_getall.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=836519
-->
<head>
<title>Mozilla Bug 836519</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836519">Mozilla Bug 836519</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/contacts/tests/file_contacts_getall2.html
+++ b/dom/contacts/tests/file_contacts_getall2.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=836519
-->
<head>
<title>Mozilla Bug 836519</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836519">Mozilla Bug 836519</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/contacts/tests/file_contacts_international.html
+++ b/dom/contacts/tests/file_contacts_international.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=815833
-->
<head>
<title>Test for Bug 815833 WebContacts</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=815833">Mozilla Bug 815833</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/contacts/tests/file_contacts_substringmatching.html
+++ b/dom/contacts/tests/file_contacts_substringmatching.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=877302
-->
<head>
<title>Test for Bug 877302 substring matching for WebContacts</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=877302">Mozilla Bug 877302</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/contacts/tests/file_contacts_substringmatchingCL.html
+++ b/dom/contacts/tests/file_contacts_substringmatchingCL.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=877302
-->
<head>
<title>Test for Bug 949537 substring matching for WebContacts</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=949537">Mozilla Bug 949537</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/contacts/tests/file_contacts_substringmatchingVE.html
+++ b/dom/contacts/tests/file_contacts_substringmatchingVE.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=877302
-->
<head>
<title>Test for Bug 877302 substring matching for WebContacts</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=877302">Mozilla Bug 877302</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/contacts/tests/file_migration.html
+++ b/dom/contacts/tests/file_migration.html
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Migration tests</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<h1>migration tests</h1>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
--- a/dom/contacts/tests/mochitest.ini
+++ b/dom/contacts/tests/mochitest.ini
@@ -1,36 +1,6 @@
[DEFAULT]
support-files =
shared.js
- file_contacts_basics.html
- file_contacts_basics2.html
- file_contacts_blobs.html
- file_contacts_events.html
- file_contacts_getall.html
- file_contacts_getall2.html
- file_contacts_international.html
- file_contacts_substringmatching.html
- file_contacts_substringmatchingVE.html
- file_contacts_substringmatchingCL.html
- test_migration_chrome.js
- file_migration.html
file_permission_denied.html
-[test_contacts_basics.html]
-skip-if = (toolkit == 'gonk' && debug) #debug-only failure
-[test_contacts_basics2.html]
-skip-if = (toolkit == 'gonk' && debug) || (os == 'win' && os_version == '5.1') #debug-only failure, bug 967258 on XP
-[test_contacts_blobs.html]
-skip-if = (toolkit == 'gonk' && debug) #debug-only failure
-[test_contacts_events.html]
-[test_contacts_getall.html]
-skip-if = (toolkit == 'gonk' && debug) #debug-only failure
-[test_contacts_getall2.html]
-skip-if = (toolkit == 'gonk' && debug) #debug-only failure
-[test_contacts_international.html]
-[test_contacts_substringmatching.html]
-[test_contacts_substringmatchingVE.html]
-[test_contacts_substringmatchingCL.html]
-[test_migration.html]
- support-files +=
- skip-if = os == "android"
[test_permission_denied.html]
rename from dom/contacts/tests/test_contacts_cache.xul
rename to dom/contacts/tests/test_contacts_a_cache.xul
rename from dom/contacts/tests/test_contacts_shutdown.xul
rename to dom/contacts/tests/test_contacts_a_shutdown.xul
rename from dom/contacts/tests/test_contacts_upgrade.xul
rename to dom/contacts/tests/test_contacts_a_upgrade.xul
--- a/dom/contacts/tests/test_contacts_basics.html
+++ b/dom/contacts/tests/test_contacts_basics.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_basics.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_contacts_basics2.html
+++ b/dom/contacts/tests/test_contacts_basics2.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_basics2.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_contacts_blobs.html
+++ b/dom/contacts/tests/test_contacts_blobs.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_blobs.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_contacts_events.html
+++ b/dom/contacts/tests/test_contacts_events.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_events.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_contacts_getall.html
+++ b/dom/contacts/tests/test_contacts_getall.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_getall.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_contacts_getall2.html
+++ b/dom/contacts/tests/test_contacts_getall2.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_getall2.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_contacts_international.html
+++ b/dom/contacts/tests/test_contacts_international.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_international.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_contacts_substringmatching.html
+++ b/dom/contacts/tests/test_contacts_substringmatching.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_substringmatching.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_contacts_substringmatchingCL.html
+++ b/dom/contacts/tests/test_contacts_substringmatchingCL.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_substringmatchingCL.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_contacts_substringmatchingVE.html
+++ b/dom/contacts/tests/test_contacts_substringmatchingVE.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_contacts_substringmatchingVE.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/contacts/tests/test_migration.html
+++ b/dom/contacts/tests/test_migration.html
@@ -1,29 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe></iframe>
<pre id="test">
<script type="application/javascript">
function run_tests() {
var iframe = document.querySelector("iframe");
iframe.src = "file_migration.html";
}
SimpleTest.waitForExplicitFinish();
-onload = function() {
- SpecialPowers.pushPermissions([
- {type: "contacts-read", allow: true, context: document},
- {type: "contacts-write", allow: true, context: document},
- {type: "contacts-create", allow: true, context: document},
- ], run_tests);
-};
+onload = run_tests;
</script>
</pre>
</body>
</html>
--- a/dom/html/test/chrome.ini
+++ b/dom/html/test/chrome.ini
@@ -1,6 +1,12 @@
[DEFAULT]
-skip-if = buildapp == 'b2g' || os == 'android'
support-files =
file_anchor_ping.html
+ wakelock.ogg
+ wakelock.ogv
[test_anchor_ping.html]
+skip-if = buildapp == 'b2g' || os == 'android'
+[test_audio_wakelock.html]
+skip-if = buildapp == 'mulet' # TC: Bug 1144079 - Re-enable Mulet mochitests and reftests taskcluster-specific disables.
+[test_video_wakelock.html]
+skip-if = toolkit == 'android' || (toolkit == 'gonk' && debug) #bug 871015, bug 881443
--- a/dom/html/test/mochitest.ini
+++ b/dom/html/test/mochitest.ini
@@ -194,30 +194,26 @@ support-files =
form_submit_server.sjs
formData_worker.js
formData_test.js
image.png
image-allow-credentials.png
image-allow-credentials.png^headers^
nnc_lockup.gif
reflect.js
- wakelock.ogg
- wakelock.ogv
file_ignoreuserfocus.html
simpleFileOpener.js
file_mozaudiochannel.html
file_bug1166138_1x.png
file_bug1166138_2x.png
file_bug1166138_def.png
[test_a_text.html]
[test_anchor_href_cache_invalidation.html]
[test_applet_attributes_reflection.html]
-[test_audio_wakelock.html]
-skip-if = buildapp == 'mulet' # TC: Bug 1144079 - Re-enable Mulet mochitests and reftests taskcluster-specific disables.
[test_base_attributes_reflection.html]
[test_bug100533.html]
[test_bug109445.html]
[test_bug109445.xhtml]
[test_bug1297.html]
[test_bug1366.html]
[test_bug1400.html]
[test_bug143220.html]
@@ -539,18 +535,16 @@ skip-if = buildapp == 'mulet' || buildap
[test_rowscollection.html]
[test_srcdoc-2.html]
[test_srcdoc.html]
[test_style_attributes_reflection.html]
[test_track.html]
[test_track_disabled.html]
[test_ul_attributes_reflection.html]
[test_undoManager.html]
-[test_video_wakelock.html]
-skip-if = toolkit == 'android' || (toolkit == 'gonk' && debug) #bug 871015, bug 881443
[test_input_files_not_nsIFile.html]
[test_ignoreuserfocus.html]
[test_fragment_form_pointer.html]
[test_bug1682.html]
[test_bug1823.html]
[test_bug57600.html]
[test_bug196523.html]
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
--- a/dom/html/test/test_audio_wakelock.html
+++ b/dom/html/test/test_audio_wakelock.html
@@ -1,19 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=868943
-->
<head>
<title>Test for Bug 868943</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=868943">Mozilla Bug 868943</a>
<p id="display"></p>
<div id="content">
</div>
<pre id="test">
<script type="application/javascript">
@@ -110,20 +110,16 @@ function runTests() {
SimpleTest.finish();
return;
}
var test = tests.pop();
test();
};
-SpecialPowers.pushPermissions(
- [{'type': 'power', 'allow': true, 'context': document}],
- function() {
- SpecialPowers.pushPrefEnv({"set": [["media.wakelock_timeout", 500]]}, runTests);
- });
+SpecialPowers.pushPrefEnv({"set": [["media.wakelock_timeout", 500]]}, runTests);
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>
--- a/dom/html/test/test_video_wakelock.html
+++ b/dom/html/test/test_video_wakelock.html
@@ -1,19 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=868943
-->
<head>
<title>Test for Bug 868943</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=868943">Mozilla Bug 868943</a>
<p id="display"></p>
<div id="content">
</div>
<pre id="test">
<script type="application/javascript">
@@ -182,21 +182,17 @@ function runTests() {
SimpleTest.finish();
return;
}
var test = tests.pop();
test();
};
-SpecialPowers.pushPermissions(
- [{'type': 'power', 'allow': true, 'context': document}],
- function() {
- SpecialPowers.pushPrefEnv({"set": [["media.wakelock_timeout", 500],
- ["dom.wakelock.enabled", true]]}, runTests);
- });
+SpecialPowers.pushPrefEnv({"set": [["media.wakelock_timeout", 500],
+ ["dom.wakelock.enabled", true]]}, runTests);
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/chrome.ini
@@ -0,0 +1,52 @@
+[DEFAULT]
+# dom/inputmethod only makes sense on B2G
+run-if = (buildapp == 'b2g' && toolkit != 'gonk') || buildapp == 'mulet'
+support-files =
+ bug1110030_helper.js
+ inputmethod_common.js
+ file_inputmethod.html
+ file_blank.html
+ file_test_app.html
+ file_test_bug1066515.html
+ file_test_bug1137557.html
+ file_test_bug1175399.html
+ file_test_empty_app.html
+ file_test_focus_blur_manage_events.html
+ file_test_sendkey_cancel.html
+ file_test_setSupportsSwitching.html
+ file_test_simple_manage_events.html
+ file_test_sms_app.html
+ file_test_sms_app_1066515.html
+ file_test_sync_edit.html
+ file_test_two_inputs.html
+ file_test_two_selects.html
+ file_test_unload.html
+ file_test_unload_action.html
+
+[test_basic.html]
+[test_bug944397.html]
+[test_bug949059.html]
+[test_bug953044.html]
+[test_bug960946.html]
+[test_bug978918.html]
+[test_bug1026997.html]
+[test_bug1043828.html]
+[test_bug1059163.html]
+disabled = fails because receiving bad values
+[test_bug1066515.html]
+[test_bug1137557.html]
+[test_bug1175399.html]
+[test_focus_blur_manage_events.html]
+disabled = fails because receiving bad events
+[test_forward_hardware_key_to_ime.html]
+skip-if = buildapp != 'mulet'
+[test_input_registry_events.html]
+disabled = timeout on pine
+[test_sendkey_cancel.html]
+[test_setSupportsSwitching.html]
+[test_simple_manage_events.html]
+disabled = fails because receiving bad events
+[test_sync_edit.html]
+[test_two_inputs.html]
+[test_two_selects.html]
+[test_unload.html]
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_bug1066515.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div id="text" contenteditable>Jan Jongboom</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_bug1137557.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<textarea rows=30 cols=30></textarea>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_bug1175399.html
@@ -0,0 +1,1 @@
+<html><body><input value="First" readonly></body></html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_focus_blur_manage_events.html
@@ -0,0 +1,22 @@
+<html><body>
+<input type="text">
+<input type="search">
+<textarea></textarea>
+<p contenteditable></p>
+<input type="number">
+<input type="tel">
+<input type="url">
+<input type="email">
+<input type="password">
+<input type="datetime">
+<input type="date" value="2015-08-03" min="1990-01-01" max="2020-01-01">
+<input type="month">
+<input type="week">
+<input type="time">
+<input type="datetime-local">
+<input type="color">
+<select><option selected>foo</option><option disabled>bar</option>
+<optgroup label="group"><option>baz</option></optgroup></select>
+<select multiple><option selected>foo</option><option disabled>bar</option>
+<optgroup label="group"><option>baz</option></optgroup></select>
+</body></html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_setSupportsSwitching.html
@@ -0,0 +1,5 @@
+<html><body>
+<input type="text">
+<input type="number">
+<input type="password">
+</body></html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_simple_manage_events.html
@@ -0,0 +1,1 @@
+<html><body><input type="text"></body></html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_sync_edit.html
@@ -0,0 +1,1 @@
+<html><body><input value="First"></body></html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_two_inputs.html
@@ -0,0 +1,1 @@
+<html><body><input value="First"><input value="Second"></body></html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_two_selects.html
@@ -0,0 +1,1 @@
+<html><body><select><option>First</option></select><select><option>Second</option></select></html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_unload.html
@@ -0,0 +1,1 @@
+<html><body><form id="form"><input value="First"><input type="submit"></form></body></html>
new file mode 100644
--- /dev/null
+++ b/dom/inputmethod/mochitest/file_test_unload_action.html
@@ -0,0 +1,1 @@
+<html><body><input value="Second"></body></html>
--- a/dom/inputmethod/mochitest/inputmethod_common.js
+++ b/dom/inputmethod/mochitest/inputmethod_common.js
@@ -2,33 +2,22 @@ function inputmethod_setup(callback) {
SimpleTest.waitForExplicitFinish();
SimpleTest.requestCompleteLog();
let appInfo = SpecialPowers.Cc['@mozilla.org/xre/app-info;1']
.getService(SpecialPowers.Ci.nsIXULAppInfo);
if (appInfo.name != 'B2G') {
SpecialPowers.Cu.import("resource://gre/modules/Keyboard.jsm", this);
}
- let permissions = [];
- ['input', 'input-manage', 'browser'].forEach(function(name) {
- permissions.push({
- type: name,
- allow: true,
- context: document
- });
- });
-
- SpecialPowers.pushPermissions(permissions, function() {
- let prefs = [
- ['dom.mozBrowserFramesEnabled', true],
- // Enable navigator.mozInputMethod.
- ['dom.mozInputMethod.enabled', true]
- ];
- SpecialPowers.pushPrefEnv({set: prefs}, function() {
- SimpleTest.waitForFocus(callback);
- });
+ let prefs = [
+ ['dom.mozBrowserFramesEnabled', true],
+ // Enable navigator.mozInputMethod.
+ ['dom.mozInputMethod.enabled', true]
+ ];
+ SpecialPowers.pushPrefEnv({set: prefs}, function() {
+ SimpleTest.waitForFocus(callback);
});
}
function inputmethod_cleanup() {
SpecialPowers.wrap(navigator.mozInputMethod).setActive(false);
SimpleTest.finish();
}
deleted file mode 100644
--- a/dom/inputmethod/mochitest/mochitest.ini
+++ /dev/null
@@ -1,38 +0,0 @@
-[DEFAULT]
-# dom/inputmethod only makes sense on B2G
-run-if = (buildapp == 'b2g' && toolkit != 'gonk') || buildapp == 'mulet'
-support-files =
- inputmethod_common.js
- file_inputmethod.html
- file_blank.html
- file_test_app.html
- file_test_sendkey_cancel.html
- file_test_sms_app.html
- file_test_sms_app_1066515.html
-
-[test_basic.html]
-[test_bug944397.html]
-[test_bug949059.html]
-[test_bug953044.html]
-[test_bug960946.html]
-[test_bug978918.html]
-[test_bug1026997.html]
-[test_bug1043828.html]
-[test_bug1059163.html]
-[test_bug1066515.html]
-[test_bug1175399.html]
-[test_bug1137557.html]
-[test_focus_blur_manage_events.html]
-[test_forward_hardware_key_to_ime.html]
-skip-if = buildapp != 'mulet'
-support-files =
- bug1110030_helper.js
- file_test_empty_app.html
-[test_input_registry_events.html]
-[test_sendkey_cancel.html]
-[test_setSupportsSwitching.html]
-[test_simple_manage_events.html]
-[test_sync_edit.html]
-[test_two_inputs.html]
-[test_two_selects.html]
-[test_unload.html]
--- a/dom/inputmethod/mochitest/test_basic.html
+++ b/dom/inputmethod/mochitest/test_basic.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=932145
-->
<head>
<title>Basic test for InputMethod API.</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=932145">Mozilla Bug 932145</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
SimpleTest.requestFlakyTimeout("untriaged");
--- a/dom/inputmethod/mochitest/test_bug1026997.html
+++ b/dom/inputmethod/mochitest/test_bug1026997.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1026997
-->
<head>
<title>SelectionChange on InputMethod API.</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1026997">Mozilla Bug 1026997</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
inputmethod_setup(function() {
--- a/dom/inputmethod/mochitest/test_bug1043828.html
+++ b/dom/inputmethod/mochitest/test_bug1043828.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1043828
-->
<head>
<title>Basic test for Switching Keyboards.</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1043828">Mozilla Bug 1043828</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
SimpleTest.requestFlakyTimeout("untriaged");
@@ -81,55 +81,44 @@ function runTest() {
keyboardB = document.createElement('iframe');
keyboardB.setAttribute('mozbrowser', true);
document.body.appendChild(keyboardB);
// simulate two different keyboard apps
let imeUrl = basePath + '/file_blank.html';
- SpecialPowers.pushPermissions([{
- type: 'input',
- allow: true,
- context: {
- url: imeUrl,
- originAttributes: {
- inIsolatedMozBrowser: true
- }
- }
- }], function() {
- keyboardA.src = imeUrl;
- keyboardB.src = imeUrl;
+ keyboardA.src = imeUrl;
+ keyboardB.src = imeUrl;
- var handler = {
- handleEvent: function(){
- keyboardB.removeEventListener('mozbrowserloadend', this);
+ var handler = {
+ handleEvent: function(){
+ keyboardB.removeEventListener('mozbrowserloadend', this);
- mmKeyboardB = SpecialPowers.getBrowserFrameMessageManager(keyboardB);
+ mmKeyboardB = SpecialPowers.getBrowserFrameMessageManager(keyboardB);
+
+ mmKeyboardB.loadFrameScript('data:,(' + kbFrameScript.toString() + ')();', false);
- mmKeyboardB.loadFrameScript('data:,(' + kbFrameScript.toString() + ')();', false);
-
- mmKeyboardB.addMessageListener('test:InputMethod:getText:Resolve', function() {
- info('getText() was resolved');
- inputmethod_cleanup();
- });
+ mmKeyboardB.addMessageListener('test:InputMethod:getText:Resolve', function() {
+ info('getText() was resolved');
+ inputmethod_cleanup();
+ });
- mmKeyboardB.addMessageListener('test:InputMethod:getText:Reject', function() {
- ok(false, 'getText() was rejected');
- inputmethod_cleanup();
- });
+ mmKeyboardB.addMessageListener('test:InputMethod:getText:Reject', function() {
+ ok(false, 'getText() was rejected');
+ inputmethod_cleanup();
+ });
- setTimeout(function(){
- step2();
- }, WAIT_TIME);
- }
- };
+ setTimeout(function(){
+ step2();
+ }, WAIT_TIME);
+ }
+ };
- keyboardB.addEventListener('mozbrowserloadend', handler);
- });
+ keyboardB.addEventListener('mozbrowserloadend', handler);
}
// STEP 2: Set keyboard A active
function step2() {
info('step2');
let req = keyboardA.setInputMethodActive(true);
req.onsuccess = function(){
--- a/dom/inputmethod/mochitest/test_bug1059163.html
+++ b/dom/inputmethod/mochitest/test_bug1059163.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1059163
-->
<head>
<title>Basic test for repeat sendKey events</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1059163">Mozilla Bug 1059163</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
inputmethod_setup(function() {
runTest();
@@ -41,19 +41,20 @@ function appFrameScript() {
function runTest() {
let im = navigator.mozInputMethod;
// Set current page as an input method.
SpecialPowers.wrap(im).setActive(true);
// Create an app frame to recieve keyboard inputs.
let app = document.createElement('iframe');
- app.src = 'data:text/html,<html><body><div id="text" contenteditable>Jan Jongboom</div></html>';
+ app.src = 'file_test_bug1066515.html';
app.setAttribute('mozbrowser', true);
document.body.appendChild(app);
+
app.addEventListener('mozbrowserloadend', function() {
let mm = SpecialPowers.getBrowserFrameMessageManager(app);
mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
im.oninputcontextchange = function() {
is(im.inputcontext.type, 'contenteditable', 'type');
is(im.inputcontext.inputType, 'textarea', 'inputType');
--- a/dom/inputmethod/mochitest/test_bug1066515.html
+++ b/dom/inputmethod/mochitest/test_bug1066515.html
@@ -1,19 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1066515
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1066515</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1066515">Mozilla Bug 1066515</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
// The input context.
--- a/dom/inputmethod/mochitest/test_bug1137557.html
+++ b/dom/inputmethod/mochitest/test_bug1137557.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1137557
-->
<head>
<title>Test for new API arguments accepting D3E properties</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1137557">Mozilla Bug 1137557</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
inputmethod_setup(function() {
@@ -1729,17 +1729,17 @@ function runRepeatTests() {
function runTest() {
let im = navigator.mozInputMethod;
// Set current page as an input method.
SpecialPowers.wrap(im).setActive(true);
let iframe = document.createElement('iframe');
- iframe.src = 'data:text/html,<html><body><textarea rows=30 cols=30></textarea></body></html>';
+ iframe.src = 'file_test_bug1137557.html';
iframe.setAttribute('mozbrowser', true);
document.body.appendChild(iframe);
let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
iframe.addEventListener('mozbrowserloadend', function() {
mm.addMessageListener('test:eventDetail', function(msg) {
gEventDetails.push(msg.data);
--- a/dom/inputmethod/mochitest/test_bug1175399.html
+++ b/dom/inputmethod/mochitest/test_bug1175399.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1175399
-->
<head>
<title>Test focus when page unloads</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1175399">Mozilla Bug 1175399</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
inputmethod_setup(function() {
@@ -30,17 +30,17 @@ let appFrameScript = function appFrameSc
function runTest() {
let im = navigator.mozInputMethod;
// Set current page as an input method.
SpecialPowers.wrap(im).setActive(true);
let iframe = document.createElement('iframe');
- iframe.src = 'data:text/html,<html><body><input value="First" readonly></body></html>';
+ iframe.src = 'file_test_bug1175399.html';
iframe.setAttribute('mozbrowser', true);
document.body.appendChild(iframe);
let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
im.oninputcontextchange = function() {
is(false, 'should not receive inputcontextchange event');
};
--- a/dom/inputmethod/mochitest/test_bug944397.html
+++ b/dom/inputmethod/mochitest/test_bug944397.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=944397
-->
<head>
<title>Basic test for InputMethod API.</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=944397">Mozilla Bug 944397</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
SimpleTest.requestFlakyTimeout("untriaged");
@@ -68,43 +68,32 @@ function runTest() {
// STEP 2a: Create a browser frame to load the input method app.
keyboard = document.createElement('iframe');
keyboard.setAttribute('mozbrowser', true);
document.body.appendChild(keyboard);
// STEP 2b: Grant input privileges to the keyboard iframe
let imeUrl = basePath + '/file_inputmethod.html#data';
- SpecialPowers.pushPermissions([{
- type: 'input',
- allow: true,
- context: {
- url: imeUrl,
- originAttributes: {
- inIsolatedMozBrowser: true
- }
- }
- }], function() {
- // STEP 2c: Tell Gecko to use this iframe as its keyboard app
- let req = keyboard.setInputMethodActive(true);
+ // STEP 2c: Tell Gecko to use this iframe as its keyboard app
+ let req = keyboard.setInputMethodActive(true);
+
+ req.onsuccess = function() {
+ ok(true, 'setInputMethodActive succeeded.');
+ };
- req.onsuccess = function() {
- ok(true, 'setInputMethodActive succeeded.');
- };
+ req.onerror = function() {
+ ok(false, 'setInputMethodActive failed: ' + this.error.name);
+ inputmethod_cleanup();
+ };
- req.onerror = function() {
- ok(false, 'setInputMethodActive failed: ' + this.error.name);
- inputmethod_cleanup();
- };
-
- // STEP 3: Loads the input method app to the browser frame after a delay.
- setTimeout(function() {
- keyboard.src = imeUrl;
- }, 100);
- });
+ // STEP 3: Loads the input method app to the browser frame after a delay.
+ setTimeout(function() {
+ keyboard.src = imeUrl;
+ }, 100);
}
function step4(val) {
ok(true, 'Keyboard input was received.');
is(val, '#dataYuan', 'Input value');
inputmethod_cleanup();
}
--- a/dom/inputmethod/mochitest/test_bug949059.html
+++ b/dom/inputmethod/mochitest/test_bug949059.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=949059
-->
<head>
<title>Test "mgmt" property of MozInputMethod.</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=949059">Mozilla Bug 949059</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
inputmethod_setup(function() {
--- a/dom/inputmethod/mochitest/test_bug953044.html
+++ b/dom/inputmethod/mochitest/test_bug953044.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=953044
-->
<head>
<title>Basic test for InputMethod API.</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=953044">Mozilla Bug 953044</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
inputmethod_setup(function() {
--- a/dom/inputmethod/mochitest/test_bug960946.html
+++ b/dom/inputmethod/mochitest/test_bug960946.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=960946
-->
<head>
<title>Basic test for repeat sendKey events</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=960946">Mozilla Bug 960946</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
// The input context.
--- a/dom/inputmethod/mochitest/test_bug978918.html
+++ b/dom/inputmethod/mochitest/test_bug978918.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=978918
-->
<head>
<title>Basic test for InputMethod API.</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=978918">Mozilla Bug 978918</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
// The input context.
--- a/dom/inputmethod/mochitest/test_focus_blur_manage_events.html
+++ b/dom/inputmethod/mochitest/test_focus_blur_manage_events.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1201407
-->
<head>
<title>Test inputcontextfocus and inputcontextblur event</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1201407">Mozilla Bug 1201407</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
let contentFrameMM;
@@ -131,37 +131,26 @@ function setupInputAppFrame() {
path.substring(0, path.lastIndexOf('/'));
let imeUrl = basePath + '/file_blank.html';
let inputAppFrame = document.createElement('iframe');
inputAppFrame.setAttribute('mozbrowser', true);
inputAppFrame.src = imeUrl;
document.body.appendChild(inputAppFrame);
- SpecialPowers.pushPermissions([{
- type: 'input',
- allow: true,
- context: {
- url: imeUrl,
- originAttributes: {
- inIsolatedMozBrowser: true
- }
- }
- }], function() {
- let mm = SpecialPowers.getBrowserFrameMessageManager(inputAppFrame);
- inputAppFrame.addEventListener('mozbrowserloadend', function() {
- mm.addMessageListener('text:appEvent', function(msg) {
- ok(false, 'Input app should not receive ' + msg.data.type + ' event.');
- });
- mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
+ let mm = SpecialPowers.getBrowserFrameMessageManager(inputAppFrame);
+ inputAppFrame.addEventListener('mozbrowserloadend', function() {
+ mm.addMessageListener('text:appEvent', function(msg) {
+ ok(false, 'Input app should not receive ' + msg.data.type + ' event.');
+ });
+ mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
- // Set the input app frame to be active
- let req = inputAppFrame.setInputMethodActive(true);
- resolve(req);
- });
+ // Set the input app frame to be active
+ let req = inputAppFrame.setInputMethodActive(true);
+ resolve(req);
});
});
}
function setupContentFrame() {
info('setupContentFrame');
return new Promise((resolve, reject) => {
let contentFrameScript = function contentFrameScript() {
@@ -172,38 +161,17 @@ function setupContentFrame() {
input.focus();
addMessageListener('test:next', function() {
content.document.body.children[++i].focus();
});
};
let iframe = document.createElement('iframe');
- iframe.src = 'data:text/html,<html><body>' +
- '<input type="text">' +
- '<input type="search">' +
- '<textarea></textarea>' +
- '<p contenteditable></p>' +
- '<input type="number">' +
- '<input type="tel">' +
- '<input type="url">' +
- '<input type="email">' +
- '<input type="password">' +
- '<input type="datetime">' +
- '<input type="date" value="2015-08-03" min="1990-01-01" max="2020-01-01">' +
- '<input type="month">' +
- '<input type="week">' +
- '<input type="time">' +
- '<input type="datetime-local">' +
- '<input type="color">' +
- '<select><option selected>foo</option><option disabled>bar</option>' +
- '<optgroup label="group"><option>baz</option></optgroup></select>' +
- '<select multiple><option selected>foo</option><option disabled>bar</option>' +
- '<optgroup label="group"><option>baz</option></optgroup></select>' +
- '</body></html>';
+ iframe.src = 'file_test_focus_blur_manage_events.html';
iframe.setAttribute('mozbrowser', true);
document.body.appendChild(iframe);
let mm = contentFrameMM =
SpecialPowers.getBrowserFrameMessageManager(iframe);
iframe.addEventListener('mozbrowserloadend', function() {
mm.loadFrameScript('data:,(' + encodeURIComponent(contentFrameScript.toString()) + ')();', false);
--- a/dom/inputmethod/mochitest/test_forward_hardware_key_to_ime.html
+++ b/dom/inputmethod/mochitest/test_forward_hardware_key_to_ime.html
@@ -1,21 +1,21 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1110030
-->
<head>
<title>Forwarding Hardware Key to InputMethod</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/NativeKeyCodes.js"></script>
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/NativeKeyCodes.js"></script>
<script type="text/javascript" src="bug1110030_helper.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1110030">Mozilla Bug 1110030</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
// The input context.
var gContext = null;
--- a/dom/inputmethod/mochitest/test_input_registry_events.html
+++ b/dom/inputmethod/mochitest/test_input_registry_events.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1201407
-->
<head>
<title>Test addinputrequest and removeinputrequest event</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1201407">Mozilla Bug 1201407</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
let appFrameMM;
@@ -57,46 +57,37 @@ function setupInputAppFrame() {
let path = location.pathname;
let basePath = location.protocol + '//' + location.host +
path.substring(0, path.lastIndexOf('/'));
let imeUrl = basePath + '/file_blank.html';
let inputAppFrame = document.createElement('iframe');
inputAppFrame.setAttribute('mozbrowser', true);
+ // FIXME: Bug 1270790
+ inputAppFrame.setAttribute('remote', true);
inputAppFrame.src = imeUrl;
document.body.appendChild(inputAppFrame);
- SpecialPowers.pushPermissions([{
- type: 'input',
- allow: true,
- context: {
- url: imeUrl,
- originAttributes: {
- inIsolatedMozBrowser: true
- }
- }
- }], function() {
- let mm = appFrameMM =
- SpecialPowers.getBrowserFrameMessageManager(inputAppFrame);
+ let mm = appFrameMM =
+ SpecialPowers.getBrowserFrameMessageManager(inputAppFrame);
- inputAppFrame.addEventListener('mozbrowserloadend', function() {
- mm.addMessageListener('test:appEvent', function(msg) {
- ok(false, 'Input app should not receive ' + msg.data.type + ' event.');
- });
- mm.addMessageListener('test:resolved', function(msg) {
- nextStep && nextStep(msg.data);
- });
- mm.addMessageListener('test:rejected', function(msg) {
- nextStep && nextStep(msg.data);
- });
- mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
+ inputAppFrame.addEventListener('mozbrowserloadend', function() {
+ mm.addMessageListener('test:appEvent', function(msg) {
+ ok(false, 'Input app should not receive ' + msg.data.type + ' event.');
+ });
+ mm.addMessageListener('test:resolved', function(msg) {
+ nextStep && nextStep(msg.data);
+ });
+ mm.addMessageListener('test:rejected', function(msg) {
+ nextStep && nextStep(msg.data);
+ });
+ mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
- resolve();
- });
+ resolve();
});
});
}
function Deferred() {
this.promise = new Promise((res, rej) => {
this.resolve = res;
this.reject = rej;
--- a/dom/inputmethod/mochitest/test_sendkey_cancel.html
+++ b/dom/inputmethod/mochitest/test_sendkey_cancel.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=952080
-->
<head>
<title>SendKey with canceled keydown test for InputMethod API.</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=952080">Mozilla Bug 952080</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
// The input context.
--- a/dom/inputmethod/mochitest/test_setSupportsSwitching.html
+++ b/dom/inputmethod/mochitest/test_setSupportsSwitching.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1197682
-->
<head>
<title>Test inputcontext#inputType and MozInputMethodManager#supportsSwitching()</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1197682">Mozilla Bug 1197682</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
inputmethod_setup(function() {
@@ -108,21 +108,17 @@ function runTest() {
};
// Set current page as an input method.
SpecialPowers.wrap(im).setActive(true);
// Set text and password inputs as supports switching (and not supported for number type)
im.mgmt.setSupportsSwitchingTypes(['text', 'password']);
let iframe = document.createElement('iframe');
- iframe.src = 'data:text/html,<html><body>' +
- '<input type="text">' +
- '<input type="number">' +
- '<input type="password">' +
- '</body></html>';
+ iframe.src = 'file_test_setSupportsSwitching.html';
iframe.setAttribute('mozbrowser', true);
document.body.appendChild(iframe);
let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
iframe.addEventListener('mozbrowserloadend', function() {
mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
});
--- a/dom/inputmethod/mochitest/test_simple_manage_events.html
+++ b/dom/inputmethod/mochitest/test_simple_manage_events.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1201407
-->
<head>
<title>Test simple manage notification events on MozInputMethodManager</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1201407">Mozilla Bug 1201407</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
let appFrameMM;
@@ -93,55 +93,44 @@ function setupInputAppFrame() {
path.substring(0, path.lastIndexOf('/'));
let imeUrl = basePath + '/file_blank.html';
let inputAppFrame = document.createElement('iframe');
inputAppFrame.setAttribute('mozbrowser', true);
inputAppFrame.src = imeUrl;
document.body.appendChild(inputAppFrame);
- SpecialPowers.pushPermissions([{
- type: 'input',
- allow: true,
- context: {
- url: imeUrl,
- originAttributes: {
- inIsolatedMozBrowser: true
- }
- }
- }], function() {
- let mm = appFrameMM =
- SpecialPowers.getBrowserFrameMessageManager(inputAppFrame);
+ let mm = appFrameMM =
+ SpecialPowers.getBrowserFrameMessageManager(inputAppFrame);
- inputAppFrame.addEventListener('mozbrowserloadend', function() {
- mm.addMessageListener('test:appEvent', function(msg) {
- ok(false, 'Input app should not receive ' + msg.data.type + ' event.');
- });
- mm.addMessageListener('test:inputcontextchange', function(msg) {
- nextStep && nextStep({ type: 'inputcontextchange' });
- });
- mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
+ inputAppFrame.addEventListener('mozbrowserloadend', function() {
+ mm.addMessageListener('test:appEvent', function(msg) {
+ ok(false, 'Input app should not receive ' + msg.data.type + ' event.');
+ });
+ mm.addMessageListener('test:inputcontextchange', function(msg) {
+ nextStep && nextStep({ type: 'inputcontextchange' });
+ });
+ mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
- // Set the input app frame to be active
- let req = inputAppFrame.setInputMethodActive(true);
- resolve(req);
- });
+ // Set the input app frame to be active
+ let req = inputAppFrame.setInputMethodActive(true);
+ resolve(req);
});
});
}
function setupContentFrame() {
let contentFrameScript = function contentFrameScript() {
let input = content.document.body.firstElementChild;
input.focus();
};
let iframe = document.createElement('iframe');
- iframe.src = 'data:text/html,<html><body><input type="text"></body></html>';
+ iframe.src = 'file_test_simple_manage_events.html';
iframe.setAttribute('mozbrowser', true);
document.body.appendChild(iframe);
let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
iframe.addEventListener('mozbrowserloadend', function() {
mm.loadFrameScript('data:,(' + encodeURIComponent(contentFrameScript.toString()) + ')();', false);
});
--- a/dom/inputmethod/mochitest/test_sync_edit.html
+++ b/dom/inputmethod/mochitest/test_sync_edit.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1079455
-->
<head>
<title>Sync edit of an input</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1079455">Mozilla Bug 1079455</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
inputmethod_setup(function() {
@@ -59,17 +59,17 @@ function runTest() {
inputmethod_cleanup();
}
};
// Set current page as an input method.
SpecialPowers.wrap(im).setActive(true);
let iframe = document.createElement('iframe');
- iframe.src = 'data:text/html,<html><body><input value="First"></body></html>';
+ iframe.src = 'file_test_sync_edit.html';
iframe.setAttribute('mozbrowser', true);
document.body.appendChild(iframe);
let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
iframe.addEventListener('mozbrowserloadend', function() {
mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
});
}
--- a/dom/inputmethod/mochitest/test_two_inputs.html
+++ b/dom/inputmethod/mochitest/test_two_inputs.html
@@ -1,19 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1057898
https://bugzilla.mozilla.org/show_bug.cgi?id=952741
-->
<head>
<title>Test switching between two inputs</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1057898">Mozilla Bug 1057898</a>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=952741">Mozilla Bug 952741</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
@@ -161,17 +161,17 @@ function runTest() {
break;
}
};
// Set current page as an input method.
SpecialPowers.wrap(im).setActive(true);
let iframe = document.createElement('iframe');
- iframe.src = 'data:text/html,<html><body><input value="First"><input value="Second"></body></html>';
+ iframe.src = 'file_test_two_inputs.html';
iframe.setAttribute('mozbrowser', true);
document.body.appendChild(iframe);
let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
iframe.addEventListener('mozbrowserloadend', function() {
mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
});
--- a/dom/inputmethod/mochitest/test_two_selects.html
+++ b/dom/inputmethod/mochitest/test_two_selects.html
@@ -1,18 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1079728
-->
<head>
<title>Test switching between two inputs</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1079728">Mozilla Bug 1079728</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
inputmethod_setup(function() {
@@ -159,17 +159,17 @@ function runTest() {
break;
}
};
// Set current page as an input method.
SpecialPowers.wrap(im).setActive(true);
let iframe = document.createElement('iframe');
- iframe.src = 'data:text/html,<html><body><select><option>First</option></select><select><option>Second</option></select></html>';
+ iframe.src = 'file_test_two_selects.html';
iframe.setAttribute('mozbrowser', true);
document.body.appendChild(iframe);
let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
iframe.addEventListener('mozbrowserloadend', function() {
mm.loadFrameScript('data:,(' + encodeURIComponent(appFrameScript.toString()) + ')();', false);
});
--- a/dom/inputmethod/mochitest/test_unload.html
+++ b/dom/inputmethod/mochitest/test_unload.html
@@ -1,19 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1122463
https://bugzilla.mozilla.org/show_bug.cgi?id=820057
-->
<head>
<title>Test focus when page unloads</title>
- <script type="application/javascript;version=1.7" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript;version=1.7" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript;version=1.7" src="inputmethod_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1122463">Mozilla Bug 1122463</a>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=820057">Mozilla Bug 820057</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript;version=1.7">
@@ -27,17 +27,17 @@ let appFrameScript = function appFrameSc
let submit1 = form1.lastElementChild;
let input2;
let cancelSubmit = function(evt) {
evt.preventDefault();
};
// Content of the second page.
- form1.action = 'data:text/html,<html><body><input value="Second"></body></html>';
+ form1.action = 'file_test_unload_action.html';
let i = 1;
input1.focus();
addMessageListener('test:next', function() {
i++;
switch (i) {
@@ -137,17 +137,17 @@ function runTest() {
break;
}
}
// Set current page as an input method.
SpecialPowers.wrap(im).setActive(true);
let iframe = document.createElement('iframe');
- iframe.src = 'data:text/html,<html><body><form id="form"><input value="First"><input type="submit"></form></body></html>';
+ iframe.src = 'file_test_unload.html';
iframe.setAttribute('mozbrowser', true);
document.body.appendChild(iframe);
let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
im.oninputcontextchange = nextStep;
let frameScriptLoaded = false;
iframe.addEventListener('mozbrowserloadend', function() {
--- a/dom/inputmethod/moz.build
+++ b/dom/inputmethod/moz.build
@@ -33,9 +33,9 @@ EXTRA_COMPONENTS += [
]
EXTRA_PP_JS_MODULES += [
'Keyboard.jsm',
]
JAR_MANIFESTS += ['jar.mn']
-MOCHITEST_MANIFESTS += ['mochitest/mochitest.ini']
+MOCHITEST_CHROME_MANIFESTS += ['mochitest/chrome.ini']
--- a/dom/mobilemessage/moz.build
+++ b/dom/mobilemessage/moz.build
@@ -1,17 +1,17 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['interfaces']
-MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini']
+MOCHITEST_CHROME_MANIFESTS += ['tests/mochitest/chrome.ini']
XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
EXPORTS.mozilla.dom.mobilemessage += [
'Constants.h', # Required by almost all cpp files
'ipc/SmsChild.h',
'ipc/SmsParent.h',
'Types.h', # Required by IPDL SmsTypes.h
]
rename from dom/mobilemessage/tests/mochitest/mochitest.ini
rename to dom/mobilemessage/tests/mochitest/chrome.ini
--- a/dom/mobilemessage/tests/mochitest/test_sms_basics.html
+++ b/dom/mobilemessage/tests/mochitest/test_sms_basics.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for WebSMS</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
<iframe></iframe>
</div>
<pre id="test">
<script type="application/javascript;version=1.8">
@@ -68,47 +68,39 @@ function checkWebidlInterfaceNotInWindow
ok(!(iface in window), iface + " should not be there");
}
}
function test() {
checkWebidlInterfaceNotInWindow();
// If sms is disabled and permission is removed, sms is disabled.
- SpecialPowers.pushPrefEnv({"set": [["dom.sms.enabled", false]]}, function() {
- SpecialPowers.pushPermissions([{'type': 'sms', 'remove': true, 'context': document}], test2);
- });
+ SpecialPowers.pushPrefEnv({"set": [["dom.sms.enabled", false]]}, test2);
}
function test2() {
checkSmsDisabled();
// If sms is enabled and permission is removed, sms is disabled.
- SpecialPowers.pushPrefEnv({"set": [["dom.sms.enabled", true]]}, function() {
- SpecialPowers.pushPermissions([{'type': 'sms', 'remove': true, 'context': document}], test3);
- });
+ SpecialPowers.pushPrefEnv({"set": [["dom.sms.enabled", true]]}, test3);
}
function test3() {
checkSmsDisabled();
// If sms is disabled and permission is granted, sms is disabled.
- SpecialPowers.pushPrefEnv({"set": [["dom.sms.enabled", false]]}, function() {
- SpecialPowers.pushPermissions([{'type': 'sms', 'allow': true, 'context': document}], test4);
- });
+ SpecialPowers.pushPrefEnv({"set": [["dom.sms.enabled", false]]}, test4);
}
function test4() {
checkSmsDisabled();
// Even if sms is enabled and permission is granted, sms is still disabled due
// to the webidl check "AvailableIn=CertifiedApps."
- SpecialPowers.pushPrefEnv({"set": [["dom.sms.enabled", true]]}, function() {
- SpecialPowers.pushPermissions([{'type': 'sms', 'allow': true, 'context': document}], test5);
- });
+ SpecialPowers.pushPrefEnv({"set": [["dom.sms.enabled", true]]}, test5);
}
function test5() {
checkSmsDisabled();
var iframeElt = document.getElementsByTagName('iframe')[0];
iframeElt.addEventListener("load", function() {
iframeElt.removeEventListener("load", arguments.callee);
--- a/dom/network/TCPSocket.cpp
+++ b/dom/network/TCPSocket.cpp
@@ -1230,16 +1230,10 @@ TCPSocket::Observe(nsISupports* aSubject
return NS_OK;
}
/* static */
bool
TCPSocket::ShouldTCPSocketExist(JSContext* aCx, JSObject* aGlobal)
{
JS::Rooted<JSObject*> global(aCx, aGlobal);
- if (nsContentUtils::IsSystemPrincipal(nsContentUtils::ObjectPrincipal(global))) {
- return true;
- }
-
- const char* const perms[] = { "tcp-socket", nullptr };
- return Preferences::GetBool("dom.mozTCPSocket.enabled") &&
- CheckAnyPermissions(aCx, global, perms);
+ return nsContentUtils::IsSystemPrincipal(nsContentUtils::ObjectPrincipal(global));
}
--- a/dom/network/tests/chrome.ini
+++ b/dom/network/tests/chrome.ini
@@ -1,7 +1,13 @@
[DEFAULT]
support-files =
tcpsocket_test.jsm
test_tcpsocket_client_and_server_basics.js
add_task.js
+ file_udpsocket_iframe.html
-[test_tcpsocket_jsm.html]
\ No newline at end of file
+[test_tcpsocket_jsm.html]
+[test_tcpsocket_client_and_server_basics.html]
+[test_tcpsocket_enabled_with_perm.html]
+skip-if = toolkit == "gonk"
+[test_tcpsocket_legacy.html]
+[test_udpsocket.html]
--- a/dom/network/tests/mochitest.ini
+++ b/dom/network/tests/mochitest.ini
@@ -1,27 +1,20 @@
[DEFAULT]
support-files =
add_task.js
- file_udpsocket_iframe.html
- test_tcpsocket_client_and_server_basics.js
[test_network_basics.html]
skip-if = toolkit == "gonk" || toolkit == 'android'
-[test_tcpsocket_client_and_server_basics.html]
[test_tcpsocket_default_permissions.html]
skip-if = toolkit == "gonk"
[test_tcpsocket_enabled_no_perm.html]
skip-if = toolkit == "gonk"
-[test_tcpsocket_enabled_with_perm.html]
-skip-if = toolkit == "gonk"
-[test_tcpsocket_legacy.html]
[test_networkstats_alarms.html]
skip-if = toolkit != "gonk"
[test_networkstats_basics.html]
skip-if = toolkit != "gonk"
[test_networkstats_disabled.html]
skip-if = toolkit != "gonk"
[test_networkstats_enabled_no_perm.html]
skip-if = toolkit != "gonk"
[test_networkstats_enabled_perm.html]
skip-if = toolkit != "gonk"
-[test_udpsocket.html]
\ No newline at end of file
--- a/dom/network/tests/test_tcpsocket_client_and_server_basics.html
+++ b/dom/network/tests/test_tcpsocket_client_and_server_basics.html
@@ -5,18 +5,18 @@ Core tests for TCPSocket and TCPServerSo
separate xpcshell incarnations. This migration and cleanup occurred as part
of bug 1084245 in order to get coverage of the tests from content.
https://bugzilla.mozilla.org/show_bug.cgi?id=1084245
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1084245</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script type="application/javascript" src="add_task.js"></script>
<script type="application/javascript">
function createServer(port, options, backlog) {
return new TCPServerSocket(port, options, backlog);
}
function createSocket(host, port, options) {
return new TCPSocket(host, port, options);
--- a/dom/network/tests/test_tcpsocket_client_and_server_basics.js
+++ b/dom/network/tests/test_tcpsocket_client_and_server_basics.js
@@ -150,31 +150,16 @@ function defer() {
deferred.resolve = resolve;
deferred.reject = reject;
});
return deferred;
}
function* test_basics() {
- if (enablePrefsAndPermissions()) {
- // Enable our use of TCPSocket
- let prefDeferred = defer();
- SpecialPowers.pushPrefEnv(
- { set: [ ['dom.mozTCPSocket.enabled', true] ] },
- prefDeferred.resolve);
- yield prefDeferred.promise;
-
- let permDeferred = defer();
- SpecialPowers.pushPermissions(
- [ { type: 'tcp-socket', allow: true, context: document } ],
- permDeferred.resolve);
- yield permDeferred.promise;
- }
-
// See bug 903830; in e10s mode we never get to find out the localPort if we
// let it pick a free port by choosing 0. This is the same port the xpcshell
// test was using.
let serverPort = 8085;
// - Start up a listening socket.
let listeningServer = createServer(serverPort,
{ binaryType: 'arraybuffer' },
--- a/dom/network/tests/test_tcpsocket_enabled_no_perm.html
+++ b/dom/network/tests/test_tcpsocket_enabled_no_perm.html
@@ -14,16 +14,17 @@
/** Test to ensure TCPSocket preference being turned on does not enable
navigator.mozTCPSocket.
**/
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [['dom.mozTCPSocket.enabled', true]]}, runTest);
function runTest() {
is('TCPSocket' in this, false, "TCPSocket should not be accessible if dom.mozTCPSocket.enabled is true");
- is('mozTCPSocket' in navigator, false, "mozTCPSocket should be accessible if dom.mozTCPSocket.enabled is true");
+ is('TCPServerSocket' in this, false, "TCPServerSocket should not be accessible if dom.mozTCPSocket.enabled is true");
+ is('mozTCPSocket' in navigator, false, "mozTCPSocket should not be accessible if dom.mozTCPSocket.enabled is true");
SimpleTest.finish();
}
</script>
</pre>
</body>
</html>
--- a/dom/network/tests/test_tcpsocket_enabled_with_perm.html
+++ b/dom/network/tests/test_tcpsocket_enabled_with_perm.html
@@ -1,30 +1,28 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test to ensure TCPSocket permission enabled and open works with tcp-socket perm</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
/** Test to ensure TCPSocket permission being turned on enables
navigator.mozTCPSocket, and mozTCPSocket.open works when
the tcp-socket permission has been granted.
**/
SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [['dom.mozTCPSocket.enabled', true]]}, function() {
- SpecialPowers.pushPermissions([{type: "tcp-socket", allow: true, context: document}], runTest);
-});
+SpecialPowers.pushPrefEnv({"set": [['dom.mozTCPSocket.enabled', true]]}, runTest);
function runTest() {
ok('TCPSocket' in this, "TCPSocket should be accessible if dom.mozTCPSocket.enabled is true");
ok(new TCPSocket('localhost', 80), "TCPSocket constructor should work for content that has the tcp-socket permission");
ok(navigator.mozTCPSocket.open('localhost', 80), "navigator.mozTCPSocket.open should work for content that has the tcp-socket permission");
// This just helps the test harness clean up quickly
SpecialPowers.forceCC();
--- a/dom/network/tests/test_tcpsocket_legacy.html
+++ b/dom/network/tests/test_tcpsocket_legacy.html
@@ -1,38 +1,32 @@
<!DOCTYPE HTML>
<html>
<!--
Test of legacy navigator interface for opening TCPSocket/TCPServerSocket.
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 885982</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1084245">Mozilla Bug 1084245</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
<script>
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv(
{ set: [ ['dom.mozTCPSocket.enabled', true] ] },
- setPerms);
-
- function setPerms() {
- SpecialPowers.pushPermissions(
- [ { type: 'tcp-socket', allow: true, context: document } ],
- runTest);
- }
+ runTest);
function runTest() {
// See bug 903830; in e10s mode we never get to find out the localPort if we
// let it pick a free port by choosing 0. This is the same port the xpcshell
// test was using.
var serverPort = 8085;
var listeningServer = navigator.mozTCPSocket.listen(serverPort,
--- a/dom/network/tests/test_udpsocket.html
+++ b/dom/network/tests/test_udpsocket.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test UDPSocket API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<iframe id="iframe"></iframe>
<pre id="test">
<script type="application/javascript;version=1.8">
@@ -386,23 +386,20 @@ function runTest() {
})
.catch(function(err) {
ok(false, 'test failed due to: ' + err);
SimpleTest.finish();
});
}
window.addEventListener('load', function () {
- SpecialPowers.pushPermissions([
- {type: 'udp-socket', allow: true, context: document}], function() {
- SpecialPowers.pushPrefEnv({
- 'set': [
- ['dom.udpsocket.enabled', true],
- ['browser.sessionhistory.max_total_viewers', 10]
- ]
- }, runTest);
- });
+ SpecialPowers.pushPrefEnv({
+ 'set': [
+ ['dom.udpsocket.enabled', true],
+ ['browser.sessionhistory.max_total_viewers', 10]
+ ]
+ }, runTest);
});
</script>
</pre>
</body>
</html>
--- a/dom/permission/tests/mochitest.ini
+++ b/dom/permission/tests/mochitest.ini
@@ -1,30 +1,42 @@
[DEFAULT]
support-files =
file_framework.js
file_shim.html
[test_alarms.html]
+skip-if = true
[test_browser.html]
+skip-if = true
[test_embed-apps.html]
-skip-if = ((buildapp == 'b2g') && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage
+skip-if = true || e10s #Bug 931116, b2g desktop specific, initial triage ### Bug 1255339: blacklist because no more mozApps
[test_idle.html]
-skip-if = (toolkit == 'gonk' && debug) #debug-only failure
+# skip-if = (toolkit == 'gonk' && debug) #debug-only failure
+skip-if = true
[test_permission_basics.html]
-skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(https not working, bug 907770) b2g-debug(https not working, bug 907770) b2g-desktop(Bug 907770)
+skip-if = true || buildapp == 'b2g' || buildapp == 'mulet' || toolkit == 'android' || e10s # b2g(https not working, bug 907770) b2g-debug(https not working, bug 907770) b2g-desktop(Bug 907770) ### Bug 1255339: blacklist because no more mozApps
[test_permissions.html]
+skip-if = true
[test_permissions_api.html]
[test_power.html]
+skip-if = true
[test_presentation-device-manage.html]
+skip-if = true
[test_systemXHR.html]
[test_tcp-socket.html]
+skip-if = true
[test_udp-socket.html]
+skip-if = true
[test_webapps-manage.html]
-skip-if = buildapp != 'b2g' && buildapp != 'mulet'
+# skip-if = buildapp != 'b2g' && buildapp != 'mulet'
+skip-if = true
[test_camera.html]
disabled = disabled until bug 859593 is fixed
[test_keyboard.html]
-skip-if = toolkit == 'android'
+# skip-if = toolkit == 'android'
+skip-if = true
[test_input-manage.html]
-skip-if = toolkit == 'android'
+# skip-if = toolkit == 'android'
+skip-if = true
[test_wifi-manage.html]
-skip-if = (buildapp != 'b2g') || (buildapp == 'b2g' && toolkit != 'gonk') #b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
+# skip-if = (buildapp != 'b2g') || (buildapp == 'mulet') || (buildapp == 'b2g' && toolkit != 'gonk') #b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
+skip-if = true
--- a/dom/power/moz.build
+++ b/dom/power/moz.build
@@ -27,9 +27,10 @@ UNIFIED_SOURCES += [
'WakeLock.cpp',
]
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
+MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
--- a/dom/power/test/browser_wakelocks.js
+++ b/dom/power/test/browser_wakelocks.js
@@ -222,15 +222,11 @@ function runNextStep() {
if (gCurStepIndex < gSteps.length) {
gSteps[gCurStepIndex]();
} else {
finish();
}
}
function test() {
- SpecialPowers.pushPermissions([
- {type: "power", allow: true, context: kUrlSource}
- ], function () {
- SpecialPowers.pushPrefEnv({"set": [["dom.wakelock.enabled", true]]},
- runNextStep);
- });
+ SpecialPowers.pushPrefEnv({"set": [["dom.wakelock.enabled", true]]},
+ runNextStep);
}
new file mode 100644
--- /dev/null
+++ b/dom/power/test/chrome.ini
@@ -0,0 +1,9 @@
+[test_power_basics.html]
+[test_power_set_cpusleepallowed.html]
+skip-if = toolkit != "gonk"
+[test_power_set_screen_brightness.html]
+skip-if = toolkit != "gonk"
+[test_power_set_screen_enabled.html]
+skip-if = toolkit != "gonk"
+[test_power_set_key_light_enabled.html]
+skip-if = toolkit != "gonk"
--- a/dom/power/test/mochitest.ini
+++ b/dom/power/test/mochitest.ini
@@ -1,13 +1,4 @@
[test_bug957893.html]
[test_bug957899.html]
[test_wakelock_not_exposed.html]
skip-if = appname == "b2g" || buildapp == "mulet"
-[test_power_basics.html]
-[test_power_set_cpusleepallowed.html]
-skip-if = toolkit != "gonk"
-[test_power_set_screen_brightness.html]
-skip-if = toolkit != "gonk"
-[test_power_set_screen_enabled.html]
-skip-if = toolkit != "gonk"
-[test_power_set_key_light_enabled.html]
-skip-if = toolkit != "gonk"
--- a/dom/power/test/test_power_basics.html
+++ b/dom/power/test/test_power_basics.html
@@ -1,45 +1,29 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Power API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Power API **/
-/** Test permission **/
-// In b2g, addPermission 'power' is only working after a document reload
-// See bug 802312
-
SimpleTest.waitForExplicitFinish();
function startTest() {
- SpecialPowers.pushPermissions([
- {type: "power", allow: true, context: window.frames[0].document}
- ], doTest1);
+ doTest1();
}
function doTest1() {
- window.frames[0].frameElement.setAttribute('onload', 'doTest2()');
+ window.frames[0].frameElement.setAttribute('onload', 'doTest3()');
power = window.frames[0].navigator.mozPower;
ok(power, "Should be able to access power manager with permission.");
- SpecialPowers.removePermission("power", window.frames[0].document);
- window.frames[0].location.reload();
-}
-
-function doTest2() {
- window.frames[0].frameElement.setAttribute('onload', 'doTest3()');
- power = window.frames[0].navigator.mozPower;
- ok(!power, "Shouldn't be able to access power manager with permission.");
-
- SpecialPowers.addPermission("power",true, window.frames[0].document);
window.frames[0].location.reload();
}
function doTest3() {
power = window.frames[0].navigator.mozPower;
ok(power, "Should be able to access power manager with permission.");
SimpleTest.finish();
}
--- a/dom/power/test/test_power_set_cpusleepallowed.html
+++ b/dom/power/test/test_power_set_cpusleepallowed.html
@@ -1,15 +1,15 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test Enabling/Disabling CPU Sleep with Power Management API</title>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript">
"use strict";
@@ -36,26 +36,20 @@
testDisableSleep();
testEnableSleep();
SimpleTest.finish();
}
SimpleTest.expectAssertions(0, 9);
SimpleTest.waitForExplicitFinish();
- if (SpecialPowers.hasPermission("power", document)) {
- // Currently only applicable on FxOS
- if (navigator.userAgent.indexOf("Mobile") != -1 &&
- navigator.appVersion.indexOf("Android") == -1) {
- startTests();
- } else {
- ok(true, "mozPower on Firefox OS only.");
- SimpleTest.finish();
- }
+ // Currently only applicable on FxOS
+ if (navigator.userAgent.indexOf("Mobile") != -1 &&
+ navigator.appVersion.indexOf("Android") == -1) {
+ startTests();
} else {
- // Add the permission and reload so it's propogated
- SpecialPowers.addPermission("power", true, document);
- window.location.reload();
+ ok(true, "mozPower on Firefox OS only.");
+ SimpleTest.finish();
}
</script>
</pre>
</body>
</html>
--- a/dom/power/test/test_power_set_key_light_enabled.html
+++ b/dom/power/test/test_power_set_key_light_enabled.html
@@ -1,15 +1,15 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test Enabling/Disabling Screen with Power Management API</title>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript">
"use strict";
@@ -39,26 +39,20 @@
testDisableKeyLight();
testEnableKeyLight();
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
- if (SpecialPowers.hasPermission("power", document)) {
- // Currently only applicable on FxOS
- if (navigator.userAgent.indexOf("Mobile") != -1 &&
- navigator.appVersion.indexOf("Android") == -1) {
- startTests();
- } else {
- ok(true, "mozPower on Firefox OS only.");
- SimpleTest.finish();
- }
+ // Currently only applicable on FxOS
+ if (navigator.userAgent.indexOf("Mobile") != -1 &&
+ navigator.appVersion.indexOf("Android") == -1) {
+ startTests();
} else {
- // Add the permission and reload so it's propogated
- SpecialPowers.addPermission("power", true, document);
- window.location.reload();
+ ok(true, "mozPower on Firefox OS only.");
+ SimpleTest.finish();
}
</script>
</pre>
</body>
</html>
--- a/dom/power/test/test_power_set_screen_brightness.html
+++ b/dom/power/test/test_power_set_screen_brightness.html
@@ -1,15 +1,15 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test Setting Screen Brightness with Power Management API</title>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript">
"use strict";
@@ -51,26 +51,20 @@
function fuzzyEq(a, b) {
var epsilon = 0.002;
return Math.abs(a - b) < epsilon;
}
SimpleTest.expectAssertions(0, 9);
SimpleTest.waitForExplicitFinish();
- if (SpecialPowers.hasPermission("power", document)) {
- // Currently only applicable on FxOS
- if (navigator.userAgent.indexOf("Mobile") != -1 &&
- navigator.appVersion.indexOf("Android") == -1) {
- startTests();
- } else {
- ok(true, "mozPower on Firefox OS only.");
- SimpleTest.finish();
- }
+ // Currently only applicable on FxOS
+ if (navigator.userAgent.indexOf("Mobile") != -1 &&
+ navigator.appVersion.indexOf("Android") == -1) {
+ startTests();
} else {
- // Add the permission and reload so it's propogated
- SpecialPowers.addPermission("power", true, document);
- window.location.reload();
+ ok(true, "mozPower on Firefox OS only.");
+ SimpleTest.finish();
}
</script>
</pre>
</body>
</html>
--- a/dom/power/test/test_power_set_screen_enabled.html
+++ b/dom/power/test/test_power_set_screen_enabled.html
@@ -1,15 +1,15 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test Enabling/Disabling Screen with Power Management API</title>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript">
"use strict";
@@ -40,26 +40,20 @@
testDisableScreen();
testEnableScreen();
SimpleTest.finish();
}
SimpleTest.expectAssertions(0, 9);
SimpleTest.waitForExplicitFinish();
- if (SpecialPowers.hasPermission("power", document)) {
- // Currently only applicable on FxOS
- if (navigator.userAgent.indexOf("Mobile") != -1 &&
- navigator.appVersion.indexOf("Android") == -1) {
- startTests();
- } else {
- ok(true, "mozPower on Firefox OS only.");
- SimpleTest.finish();
- }
+ // Currently only applicable on FxOS
+ if (navigator.userAgent.indexOf("Mobile") != -1 &&
+ navigator.appVersion.indexOf("Android") == -1) {
+ startTests();
} else {
- // Add the permission and reload so it's propogated
- SpecialPowers.addPermission("power", true, document);
- window.location.reload();
+ ok(true, "mozPower on Firefox OS only.");
+ SimpleTest.finish();
}
</script>
</pre>
</body>
</html>
--- a/dom/presentation/tests/mochitest/chrome.ini
+++ b/dom/presentation/tests/mochitest/chrome.ini
@@ -1,4 +1,14 @@
[DEFAULT]
-skip-if = buildapp == 'b2g' || os == 'android'
+support-files =
+ PresentationDeviceInfoChromeScript.js
+ PresentationSessionChromeScript.js
[test_presentation_datachannel_sessiontransport.html]
+skip-if = buildapp == 'b2g' || os == 'android'
+[test_presentation_device_info.html]
+[test_presentation_sender_startWithDevice.html]
+skip-if = toolkit == 'android' # Bug 1129785
+[test_presentation_tcp_sender.html]
+skip-if = toolkit == 'android' # Bug 1129785
+[test_presentation_tcp_sender_default_request.html]
+skip-if = toolkit == 'android' # Bug 1129785
--- a/dom/presentation/tests/mochitest/mochitest.ini
+++ b/dom/presentation/tests/mochitest/mochitest.ini
@@ -23,28 +23,21 @@ skip-if = (e10s || toolkit == 'gonk' ||
[test_presentation_1ua_sender_and_receiver.html]
skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785
[test_presentation_1ua_sender_and_receiver_oop.html]
skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785
[test_presentation_1ua_connection_wentaway_inproc.html]
skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785
[test_presentation_1ua_connection_wentaway_oop.html]
skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785
-[test_presentation_device_info.html]
[test_presentation_device_info_permission.html]
-[test_presentation_sender_startWithDevice.html]
-skip-if = toolkit == 'android' # Bug 1129785
[test_presentation_tcp_sender_disconnect.html]
skip-if = toolkit == 'android' # Bug 1129785
[test_presentation_tcp_sender_establish_connection_error.html]
skip-if = toolkit == 'android' # Bug 1129785
-[test_presentation_tcp_sender.html]
-skip-if = toolkit == 'android' # Bug 1129785
-[test_presentation_tcp_sender_default_request.html]
-skip-if = toolkit == 'android' # Bug 1129785
[test_presentation_tcp_receiver_establish_connection_error.html]
skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android' || os == 'mac' || os == 'win' || buildapp == 'mulet') # Bug 1129785, Bug 1204709
[test_presentation_tcp_receiver_establish_connection_timeout.html]
skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785
[test_presentation_tcp_receiver.html]
skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785
[test_presentation_tcp_receiver_oop.html]
skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785
--- a/dom/presentation/tests/mochitest/test_presentation_device_info.html
+++ b/dom/presentation/tests/mochitest/test_presentation_device_info.html
@@ -1,17 +1,17 @@
<!DOCTYPE HTML>
<html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<head>
<meta charset="utf-8">
<title>Test for B2G Presentation Device Info API</title>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1080474">Test for B2G Presentation Device Info API</a>
<script type="application/javascript;version=1.8">
'use strict';
SimpleTest.waitForExplicitFinish();
@@ -126,23 +126,19 @@ function runTests() {
info('test finished, teardown');
gScript.sendAsyncMessage('teardown', '');
gScript.destroy();
SimpleTest.finish();
});
}
window.addEventListener('load', function() {
- SpecialPowers.pushPermissions([
- {type: 'presentation-device-manage', allow: true, context: document},
- ], function() {
- SpecialPowers.pushPrefEnv({
- 'set': [
- ['dom.presentation.enabled', true],
- ]
- }, runTests);
- });
+ SpecialPowers.pushPrefEnv({
+ 'set': [
+ ['dom.presentation.enabled', true],
+ ]
+ }, runTests);
});
</script>
</pre>
</body>
</html>
--- a/dom/presentation/tests/mochitest/test_presentation_device_info_permission.html
+++ b/dom/presentation/tests/mochitest/test_presentation_device_info_permission.html
@@ -17,23 +17,19 @@
SimpleTest.waitForExplicitFinish();
function runTests() {
is(navigator.mozPresentationDeviceInfo, undefined, 'navigator.mozPresentationDeviceInfo is undefined');
SimpleTest.finish();
}
window.addEventListener('load', function() {
- SpecialPowers.pushPermissions([
- {type: 'presentation-device-manage', allow: false, context: document},
- ], function() {
- SpecialPowers.pushPrefEnv({
- 'set': [
- ['dom.presentation.enabled', true],
- ]
- }, runTests);
- });
+ SpecialPowers.pushPrefEnv({
+ 'set': [
+ ['dom.presentation.enabled', true],
+ ]
+ }, runTests);
});
</script>
</pre>
</body>
</html>
--- a/dom/presentation/tests/mochitest/test_presentation_sender_startWithDevice.html
+++ b/dom/presentation/tests/mochitest/test_presentation_sender_startWithDevice.html
@@ -1,17 +1,17 @@
<!DOCTYPE HTML>
<html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<head>
<meta charset="utf-8">
<title>Test startWithDevice for B2G Presentation API at sender side</title>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1239242">Test startWithDevice for B2G Presentation API at sender side</a>
<script type="application/javascript;version=1.8">
'use strict';
var gScript = SpecialPowers.loadChromeScript(SimpleTest.getTestFileURL('PresentationSessionChromeScript.js'));
@@ -155,22 +155,17 @@ function runTests() {
testSetup().
then(testStartConnectionWithDevice).
then(testStartConnectionWithDeviceNotFoundError).
then(teardown);
}
SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPermissions([
- {type: 'presentation-device-manage', allow: true, context: document},
- {type: 'presentation', allow: true, context: document},
-], function() {
- SpecialPowers.pushPrefEnv({ 'set': [["dom.presentation.enabled", true],
- ["dom.presentation.session_transport.data_channel.enable", false],
- ["dom.presentation.test.enabled", true],
- ["dom.presentation.test.stage", 0]]},
- runTests);
-});
+SpecialPowers.pushPrefEnv({ 'set': [["dom.presentation.enabled", true],
+ ["dom.presentation.session_transport.data_channel.enable", false],
+ ["dom.presentation.test.enabled", true],
+ ["dom.presentation.test.stage", 0]]},
+ runTests);
</script>
</body>
</html>
--- a/dom/presentation/tests/mochitest/test_presentation_tcp_sender.html
+++ b/dom/presentation/tests/mochitest/test_presentation_tcp_sender.html
@@ -1,17 +1,17 @@
<!DOCTYPE HTML>
<html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<head>
<meta charset="utf-8">
<title>Test for B2G Presentation API at sender side</title>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1069230">Test for B2G Presentation API at sender side</a>
<script type="application/javascript;version=1.8">
'use strict';
var gScript = SpecialPowers.loadChromeScript(SimpleTest.getTestFileURL('PresentationSessionChromeScript.js'));
@@ -185,20 +185,15 @@ function runTests() {
then(testStartConnection).
then(testSend).
then(testIncomingMessage).
then(testCloseConnection).
then(teardown);
}
SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPermissions([
- {type: 'presentation-device-manage', allow: false, context: document},
- {type: 'presentation', allow: true, context: document},
-], function() {
- SpecialPowers.pushPrefEnv({ 'set': [["dom.presentation.enabled", true],
- ["dom.presentation.session_transport.data_channel.enable", false]]},
- runTests);
-});
+SpecialPowers.pushPrefEnv({ 'set': [["dom.presentation.enabled", true],
+ ["dom.presentation.session_transport.data_channel.enable", false]]},
+ runTests);
</script>
</body>
</html>
--- a/dom/presentation/tests/mochitest/test_presentation_tcp_sender_default_request.html
+++ b/dom/presentation/tests/mochitest/test_presentation_tcp_sender_default_request.html
@@ -1,17 +1,17 @@
<!DOCTYPE HTML>
<html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<head>
<meta charset="utf-8">
<title>Test default request for B2G Presentation API at sender side</title>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1069230">Test default request for B2G Presentation API at sender side</a>
<script type="application/javascript;version=1.8">
'use strict';
var gScript = SpecialPowers.loadChromeScript(SimpleTest.getTestFileURL('PresentationSessionChromeScript.js'));
@@ -134,20 +134,15 @@ function runTests() {
testSetup().
then(testStartConnection).
then(testCloseConnection).
then(teardown);
}
SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPermissions([
- {type: 'presentation-device-manage', allow: false, context: document},
- {type: 'presentation', allow: true, context: document},
-], function() {
- SpecialPowers.pushPrefEnv({ 'set': [["dom.presentation.enabled", true],
- ["dom.presentation.session_transport.data_channel.enable", false]]},
- runTests);
-});
+SpecialPowers.pushPrefEnv({ 'set': [["dom.presentation.enabled", true],
+ ["dom.presentation.session_transport.data_channel.enable", false]]},
+ runTests);
</script>
</body>
</html>
--- a/dom/settings/moz.build
+++ b/dom/settings/moz.build
@@ -13,18 +13,16 @@ EXTRA_PP_COMPONENTS += [
]
if CONFIG['MOZ_B2G']:
EXTRA_COMPONENTS += [
'SettingsService.js',
'SettingsService.manifest',
]
- MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
-
EXTRA_JS_MODULES += [
'SettingsDB.jsm',
'SettingsRequestManager.jsm'
]
-MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
+MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
--- a/dom/settings/tests/chrome.ini
+++ b/dom/settings/tests/chrome.ini
@@ -1,10 +1,23 @@
[DEFAULT]
-skip-if = buildapp != 'b2g'
support-files =
+ file_loadserver.js
+ file_bug1110872.js
+ file_bug1110872.html
test_settings_service.js
test_settings_service_callback.js
-
[test_settings_service.xul]
-skip-if= buildapp == 'mulet'
+run-if = buildapp == 'b2g' || buildapp == 'mulet'
[test_settings_service_callback.xul]
+run-if = buildapp == 'b2g' || buildapp == 'mulet'
+[test_settings_basics.html]
+[test_settings_permissions.html]
+[test_settings_blobs.html]
+[test_settings_data_uris.html]
+[test_settings_events.html]
+[test_settings_navigator_object.html]
+[test_settings_onsettingchange.html]
+[test_settings_bug1110872.html]
+skip-if = !e10s
+[test_settings_observer_killer.html]
+skip-if = !debug
--- a/dom/settings/tests/file_bug1110872.html
+++ b/dom/settings/tests/file_bug1110872.html
@@ -1,20 +1,15 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug {1110872} Settings API Reloads</title>
</head>
<body>
<script type="application/javascript;version=1.7">
- SpecialPowers.addPermission("settings-read", true, document);
- SpecialPowers.addPermission("settings-write", true, document);
- SpecialPowers.addPermission("settings-api-read", true, document);
- SpecialPowers.addPermission("settings-api-write", true, document);
- SpecialPowers.addPermission("settings-clear", true, document);
var createLock = function (msg) {
var lock = navigator.mozSettings.createLock();
var req = lock.get("wallpaper.image");
// We don't actually care about success or failure here, we just
// want to know the queue gets processed at all.
req.onsuccess = function () {
parent.postMessage({name:"done" + msg.data.step}, "*");
deleted file mode 100644
--- a/dom/settings/tests/mochitest.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-[DEFAULT]
-support-files =
- file_loadserver.js
- file_bug1110872.js
- file_bug1110872.html
-
-[test_settings_basics.html]
-[test_settings_permissions.html]
-[test_settings_blobs.html]
-[test_settings_data_uris.html]
-[test_settings_events.html]
-[test_settings_navigator_object.html]
-[test_settings_onsettingchange.html]
-[test_settings_bug1110872.html]
-skip-if = !e10s
-[test_settings_observer_killer.html]
-skip-if = !debug
--- a/dom/settings/tests/test_settings_basics.html
+++ b/dom/settings/tests/test_settings_basics.html
@@ -1,38 +1,33 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id={678695}
-->
<head>
<title>Test for Bug {678695} Settings API</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id={678695}">Mozilla Bug {678695}</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
"use strict";
var url = SimpleTest.getTestFileURL("file_loadserver.js");
var script = SpecialPowers.loadChromeScript(url);
-SpecialPowers.addPermission("settings-api-read", true, document);
-SpecialPowers.addPermission("settings-api-write", true, document);
-SpecialPowers.addPermission("settings-read", true, document);
-SpecialPowers.addPermission("settings-write", true, document);
-SpecialPowers.addPermission("settings-clear", true, document);
function onUnwantedSuccess() {
ok(false, "onUnwantedSuccess: shouldn't get here");
}
function onFailure() {
ok(false, "in on Failure!");
}
--- a/dom/settings/tests/test_settings_blobs.html
+++ b/dom/settings/tests/test_settings_blobs.html
@@ -1,38 +1,33 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=821630
-->
<head>
<title>Test for Bug 821630 Settings API</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=821630">Mozilla Bug 821630</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript;version=1.7">
"use strict";
var url = SimpleTest.getTestFileURL("file_loadserver.js");
var script = SpecialPowers.loadChromeScript(url);
-SpecialPowers.addPermission("settings-read", true, document);
-SpecialPowers.addPermission("settings-write", true, document);
-SpecialPowers.addPermission("settings-api-read", true, document);
-SpecialPowers.addPermission("settings-api-write", true, document);
-SpecialPowers.addPermission("settings-clear", true, document);
function onUnwantedSuccess() {
ok(false, "onUnwantedSuccess: shouldn't get here");
}
function onFailure() {
return function(s) {
if (s) {
--- a/dom/settings/tests/test_settings_bug1110872.html
+++ b/dom/settings/tests/test_settings_bug1110872.html
@@ -1,15 +1,15 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug {1110872} Settings API</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7" src="file_bug1110872.js">
</script>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id={1110872}">Mozilla Bug {1110872}</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
--- a/dom/settings/tests/test_settings_data_uris.html
+++ b/dom/settings/tests/test_settings_data_uris.html
@@ -1,38 +1,33 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=806374
-->
<head>
<title>Test for Bug 806374 Settings API</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=821630">Mozilla Bug 821630</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript;version=1.7">
"use strict";
var url = SimpleTest.getTestFileURL("file_loadserver.js");
var script = SpecialPowers.loadChromeScript(url);
-SpecialPowers.addPermission("settings-read", true, document);
-SpecialPowers.addPermission("settings-write", true, document);
-SpecialPowers.addPermission("settings-api-read", true, document);
-SpecialPowers.addPermission("settings-api-write", true, document);
-SpecialPowers.addPermission("settings-clear", true, document);
function onUnwantedSuccess() {
ok(false, "onUnwantedSuccess: shouldn't get here");
}
function onFailure() {
return function(s) {
if (s) {
--- a/dom/settings/tests/test_settings_events.html
+++ b/dom/settings/tests/test_settings_events.html
@@ -1,30 +1,26 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=678695
-->
<head>
<title>Test for Bug 678695</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=678695">Mozilla Bug 678695</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
-SpecialPowers.addPermission("settings-api-read", true, document);
-SpecialPowers.addPermission("settings-api-write", true, document);
-SpecialPowers.addPermission("settings-read", true, document);
-SpecialPowers.addPermission("settings-write", true, document);
/** Test for Bug 678695 **/
var e = new MozSettingsEvent("settingchanged", {settingName: "a", settingValue: 1});
ok(e, "Should have settings event!");
is(e.settingName, "a", "Name should be a.");
is(e.settingValue, 1, "Value should be 1.");
--- a/dom/settings/tests/test_settings_navigator_object.html
+++ b/dom/settings/tests/test_settings_navigator_object.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=898512
-->
<head>
<title>Test for Bug 898512 Settings API</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=898512">Mozilla Bug 898512</a>
<p id="display"></p>
<div id="content" style="display: none">
<iframe></iframe>
</div>
@@ -25,22 +25,13 @@ function testPref() {
SpecialPowers.pushPrefEnv({
set: [["dom.mozSettings.enabled", false]]
}, function() {
is(navigator.mozSettings, undefined, "navigator.mozSettings is undefined");
SimpleTest.finish();
});
}
-SpecialPowers.pushPermissions([
- {type: "settings-read", allow: 0, context: document},
- {type: "settings-write", allow: 0, context: document},
- {type: "settings-api-read", allow: 0, context: document},
- {type: "settings-api-write", allow: 0, context: document},
- {type: "settings-clear", allow: 0, context: document}
-], function() {
- is(frames[0].navigator.mozSettings, undefined, "navigator.mozSettings is undefined when the page doesn't have permissions");
- testPref();
-});
+testPref();
</script>
</pre>
</body>
</html>
--- a/dom/settings/tests/test_settings_observer_killer.html
+++ b/dom/settings/tests/test_settings_observer_killer.html
@@ -1,68 +1,60 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1193469
-->
<head>
<title>Test for Bug 1193469 Settings API</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1193469">Mozilla Bug 1193469</a>
<p id="display"></p>
<div id="content" style="display: none">
<iframe></iframe>
</div>
<pre id="test">
<script class="testbody" type="text/javascript;version=1.7">
var url = SimpleTest.getTestFileURL("file_loadserver.js");
var script = SpecialPowers.loadChromeScript(url);
SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPermissions([
- {type: "settings-api-read", allow: 1, context: document},
- {type: "settings-api-write", allow: 1, context: document},
- {type: "settings-read", allow: 1, context: document},
- {type: "settings-write", allow: 1, context: document},
- {type: "settings-clear", allow: 1, context: document}
-], function() {
- SpecialPowers.pushPrefEnv({
- set: [["dom.mozSettings.enabled", true]]
- },
- function () {
- ok(true, "abusing observers");
+SpecialPowers.pushPrefEnv({
+ set: [["dom.mozSettings.enabled", true]]
+},
+ function () {
+ ok(true, "abusing observers");
- var obs;
- for (obs = 0; obs < 9; obs++) {
- navigator.mozSettings.addObserver("fake.setting.key", function(v) {
- // nothing to do for real ...
- ok(false, "should not be called");
- });
- ok(true, "first: added observer #" + obs);
- }
- ok(true, "adding first observers, should not have thrown");
+ var obs;
+ for (obs = 0; obs < 9; obs++) {
+ navigator.mozSettings.addObserver("fake.setting.key", function(v) {
+ // nothing to do for real ...
+ ok(false, "should not be called");
+ });
+ ok(true, "first: added observer #" + obs);
+ }
+ ok(true, "adding first observers, should not have thrown");
- try {
- ok(true, "second: adding new observer");
- navigator.mozSettings.addObserver("fake.setting.key", function(v) {
- // nothing to do for real ...
- ok(false, "should not be called");
- });
- ok(false, "adding too many observers should have thrown");
- } catch (ex) {
- ok(true, "got exception when trying to add too many observers");
- }
+ try {
+ ok(true, "second: adding new observer");
+ navigator.mozSettings.addObserver("fake.setting.key", function(v) {
+ // nothing to do for real ...
+ ok(false, "should not be called");
+ });
+ ok(false, "adding too many observers should have thrown");
+ } catch (ex) {
+ ok(true, "got exception when trying to add too many observers");
+ }
- SimpleTest.finish();
- });
-});
+ SimpleTest.finish();
+ });
</script>
</pre>
</body>
</html>
--- a/dom/settings/tests/test_settings_onsettingchange.html
+++ b/dom/settings/tests/test_settings_onsettingchange.html
@@ -1,38 +1,33 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=678695
-->
<head>
<title>Test for Bug 678695 Settings API</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=678695">Mozilla Bug 678695</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
"use strict";
var url = SimpleTest.getTestFileURL("file_loadserver.js");
var script = SpecialPowers.loadChromeScript(url);
-SpecialPowers.addPermission("settings-write", true, document);
-SpecialPowers.addPermission("settings-read", true, document);
-SpecialPowers.addPermission("settings-api-read", true, document);
-SpecialPowers.addPermission("settings-api-write", true, document);
-SpecialPowers.addPermission("settings-clear", true, document);
var screenBright = {"screen.brightness": 0.7};
function onFailure() {
ok(false, "in on Failure!");
}
function observer1(setting) {
--- a/dom/settings/tests/test_settings_permissions.html
+++ b/dom/settings/tests/test_settings_permissions.html
@@ -1,47 +1,42 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id={678695}
-->
<head>
<title>Test for Bug {678695} Settings API</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id={900551}">Mozilla Bug {900551}</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
"use strict";
var url = SimpleTest.getTestFileURL("file_loadserver.js");
var script = SpecialPowers.loadChromeScript(url);
-SpecialPowers.removePermission("settings-read", document);
-SpecialPowers.removePermission("settings-write", document);
-SpecialPowers.addPermission("settings-api-read", true, document);
-SpecialPowers.addPermission("settings-api-write", true, document);
-SpecialPowers.addPermission("settings:wallpaper.image-read", true, document);
-SpecialPowers.addPermission("settings:wallpaper.image-write", true, document);
-SpecialPowers.addPermission("settings-clear", true, document);
function onUnwantedSuccess() {
ok(false, "onUnwantedSuccess: shouldn't get here");
}
+// No more permissions, so failure cannot happen
function onFailure() {
- ok(false, "in on Failure!");
+ ok(true, "in on Failure!");
+ next();
}
const wifi = {"wifi.enabled": false}
const wallpaper = {"wallpaper.image": "test-image"};
var combination = {
"wifi.enabled": false,
"wallpaper.image": "test-image"
--- a/dom/tests/mochitest/general/chrome.ini
+++ b/dom/tests/mochitest/general/chrome.ini
@@ -1,9 +1,11 @@
[DEFAULT]
skip-if = buildapp == 'b2g' || os == 'android'
[test_innerScreen.xul]
[test_offsets.css]
[test_offsets.js]
[test_offsets.xul]
skip-if = buildapp == 'mulet'
+[test_idleapi_permissions.html]
+skip-if = buildapp == 'b2g' || buildapp == 'mulet'
[test_spacetopagedown.html]
--- a/dom/tests/mochitest/general/mochitest.ini
+++ b/dom/tests/mochitest/general/mochitest.ini
@@ -78,18 +78,16 @@ skip-if = buildapp == 'mulet'
[test_focus_legend_noparent.html]
[test_focusrings.xul]
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT
[test_for_of.html]
[test_frameElementWrapping.html]
[test_pointerPreserves3D.html]
[test_pointerPreserves3DClip.html]
[test_framedhistoryframes.html]
-[test_idleapi_permissions.html]
-skip-if = buildapp == 'b2g' || buildapp == 'mulet'
[test_img_mutations.html]
[test_interfaces.html]
skip-if = ((buildapp == 'mulet' || buildapp == 'b2g') && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
# [test_network_events.html]
# Disable this test until bug 795711 is fixed.
[test_offsets.html]
support-files = test_offsets.js
[test_outerHTML.html]
--- a/dom/tests/mochitest/general/test_idleapi_permissions.html
+++ b/dom/tests/mochitest/general/test_idleapi_permissions.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for idle api permissions</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
@@ -28,19 +28,16 @@ function doAddIdleObserver(obs) {
i.remove();
return added;
}
function run_test() {
// addIdleObserver checks whether time is > 0.
this.idleObserver.time = 100;
- var added = doAddIdleObserver(this.idleObserver, false);
- ok(!added, "Should not be able to add idle observer without permission");
-
SpecialPowers.pushPermissions([{type: "idle", allow: true, context: document}], () => {
added = doAddIdleObserver(this.idleObserver, true);
ok(added, "Should be able to add idle observer with permission.");
SimpleTest.finish();
});
}
SimpleTest.waitForExplicitFinish();
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/geolocation/chrome.ini
@@ -0,0 +1,9 @@
+[DEFAULT]
+support-files =
+ geolocation.html
+ geolocation_common.js
+
+[test_mozsettings.html]
+skip-if = buildapp == 'b2g' || toolkit == 'android'
+[test_mozsettingsWatch.html]
+skip-if = buildapp == 'b2g' || toolkit == 'android'
--- a/dom/tests/mochitest/geolocation/mochitest.ini
+++ b/dom/tests/mochitest/geolocation/mochitest.ini
@@ -31,20 +31,16 @@ skip-if = buildapp == 'b2g' || toolkit =
[test_manyCurrentSerial.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT
[test_manyWatchConcurrent.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT
[test_manyWatchSerial.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT
[test_manyWindows.html]
skip-if = buildapp == 'b2g'
-[test_mozsettings.html]
-skip-if = buildapp == 'b2g' || toolkit == 'android'
-[test_mozsettingsWatch.html]
-skip-if = buildapp == 'b2g' || toolkit == 'android'
[test_optional_api_params.html]
skip-if = buildapp == 'b2g'
[test_shutdown.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT
[test_timeoutCurrent.html]
[test_timerRestartWatch.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT
[test_windowClose.html]
--- a/dom/tests/mochitest/geolocation/test_mozsettings.html
+++ b/dom/tests/mochitest/geolocation/test_mozsettings.html
@@ -1,49 +1,40 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=478911
-->
<head>
<title>Test for getCurrentPosition </title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="geolocation_common.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=777594">Mozilla Bug 777594</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
var timeToWaitMs = 1000;
resume_geolocationProvider(function() {
- force_prompt(true, test1);
+ force_prompt(true, test2);
});
SpecialPowers.importInMainProcess("resource://gre/modules/SettingsRequestManager.jsm");
-function test1() {
- //This pushPermissions call is after pushPrefEnv call and pushPrefEnv calls follow after this
- SpecialPowers.pushPermissions([{'type': 'settings-read', 'allow': true, 'context': document},
- {'type': 'settings-write', 'allow': true, 'context': document},
- {'type': 'settings-api-write', 'allow': true, 'context': document},
- {'type': 'settings-api-read', 'allow': true, 'context': document}
- ], test2);
-}
-
function test2() {
ok(navigator.geolocation, "get geolocation object");
toggleGeolocationSetting(false, function() {
ok(true, "turned off geolocation via mozSettings");
setTimeout(function() {
navigator.geolocation.getCurrentPosition(successCallbackAfterMozsettingOff,
failureCallbackAfterMozsettingOff);
--- a/dom/tests/mochitest/geolocation/test_mozsettingsWatch.html
+++ b/dom/tests/mochitest/geolocation/test_mozsettingsWatch.html
@@ -1,47 +1,38 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=478911
-->
<head>
<title>Test for getCurrentPosition </title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="geolocation_common.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=777594">Mozilla Bug 777594</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
resume_geolocationProvider(function() {
- force_prompt(true, test1);
+ force_prompt(true, test2);
});
SpecialPowers.importInMainProcess("resource://gre/modules/SettingsRequestManager.jsm");
-function test1() {
- //This pushPermissions call is after pushPrefEnv call and pushPrefEnv calls follow after this
- SpecialPowers.pushPermissions([{'type': 'settings-read', 'allow': true, 'context': document},
- {'type': 'settings-write', 'allow': true, 'context': document},
- {'type': 'settings-api-write', 'allow': true, 'context': document},
- {'type': 'settings-api-read', 'allow': true, 'context': document}
- ], test2);
-}
-
var watchId;
function test2() {
ok(navigator.geolocation, "get geolocation object");
toggleGeolocationSetting(false, function() {
ok(true, "turned off geolocation via mozSettings");
setTimeout(function() {
watchId = navigator.geolocation.watchPosition(successCallbackAfterMozsettingOff,
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/notification/chrome.ini
@@ -0,0 +1,8 @@
+[DEFAULT]
+
+support-files =
+ MockServices.js
+ NotificationTest.js
+
+[test_notification_noresend.html]
+skip-if = (toolkit == 'gonk') # Mochitest on Gonk registers an app manifest that messes with the logic
--- a/dom/tests/mochitest/notification/mochitest.ini
+++ b/dom/tests/mochitest/notification/mochitest.ini
@@ -4,11 +4,9 @@ support-files =
MockServices.js
NotificationTest.js
[test_notification_basics.html]
[test_notification_storage.html]
[test_bug931307.html]
skip-if = (os == 'android') # Bug 1258975 on android.
[test_notification_resend.html]
-skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || e10s # On e10s, faking the app seems to be failing
-[test_notification_noresend.html]
-skip-if = (toolkit == 'gonk') # Mochitest on Gonk registers an app manifest that messes with the logic
+skip-if = true ### Bug 1255339: blacklist because no more mozApps
--- a/dom/tests/mochitest/notification/test_notification_noresend.html
+++ b/dom/tests/mochitest/notification/test_notification_noresend.html
@@ -1,16 +1,16 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Testing mozResendAllNotifications() resend behavior for Pages</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="MockServices.js"></script>
<script type="text/javascript" src="NotificationTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1159128">Bug 1159128</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
<script type="text/javascript">
var info = NotificationTest.info;
--- a/dom/tests/moz.build
+++ b/dom/tests/moz.build
@@ -29,17 +29,19 @@ MOCHITEST_MANIFESTS += [
'mochitest/webcomponents/mochitest.ini',
'mochitest/whatwg/mochitest.ini',
]
MOCHITEST_CHROME_MANIFESTS += [
'mochitest/beacon/chrome.ini',
'mochitest/chrome/chrome.ini',
'mochitest/general/chrome.ini',
+ 'mochitest/geolocation/chrome.ini',
'mochitest/localstorage/chrome.ini',
+ 'mochitest/notification/chrome.ini',
'mochitest/sessionstorage/chrome.ini',
'mochitest/whatwg/chrome.ini',
]
if CONFIG['MOZ_GAMEPAD']:
MOCHITEST_MANIFESTS += [
'mochitest/gamepad/mochitest.ini',
]
--- a/dom/tv/moz.build
+++ b/dom/tv/moz.build
@@ -37,15 +37,17 @@ XPIDL_SOURCES += [
EXTRA_COMPONENTS += [
'TVSimulatorService.js',
'TVSimulatorService.manifest',
]
XPIDL_MODULE = 'dom_tv'
-MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
+MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
+
+MOCHITEST_CHROME_MANIFESTS += ['test/mochitest/chrome.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
new file mode 100644
--- /dev/null
+++ b/dom/tv/test/mochitest/chrome.ini
@@ -0,0 +1,19 @@
+[DEFAULT]
+support-files =
+ head.js
+ mock_data.json
+
+[test_tv_permitted_app.html]
+[test_tv_get_tuners.html]
+[test_tv_get_sources.html]
+[test_tv_get_channels.html]
+[test_tv_get_channels_during_scanning.html]
+[test_tv_get_programs.html]
+[test_tv_get_current_program.html]
+[test_tv_set_current_source.html]
+[test_tv_set_invalid_current_source.html]
+[test_tv_set_current_channel.html]
+[test_tv_set_current_channel_during_scanning.html]
+[test_tv_set_invalid_current_channel.html]
+[test_tv_scan_channels_stopped.html]
+[test_tv_scan_channels_completed.html]
--- a/dom/tv/test/mochitest/head.js
+++ b/dom/tv/test/mochitest/head.js
@@ -1,18 +1,10 @@
"use strict";
-function setupPrefsAndPermissions(callback) {
- setupPrefs(function() {
- SpecialPowers.pushPermissions([
- {"type":"tv", "allow":1, "context":document}
- ], callback);
- });
-}
-
function setupPrefs(callback) {
let xhr = new XMLHttpRequest;
let data;
xhr.open("GET", "./mock_data.json", false);
xhr.send(null);
if (xhr.status == 200) {
data = xhr.responseText;
@@ -26,19 +18,17 @@ function setupPrefs(callback) {
["dom.tv.enabled", true],
["dom.ignore_webidl_scope_checks", true],
["dom.testing.tv_mock_data", data]
]}, function() {
callback();
});
}
-function removePrefsAndPermissions(callback) {
- SpecialPowers.popPrefEnv(function() {
- SpecialPowers.popPermissions(callback);
- });
+function removePrefs(callback) {
+ SpecialPowers.popPrefEnv(callback);
}
function prepareTest(callback) {
- removePrefsAndPermissions(function() {
- setupPrefsAndPermissions(callback);
+ removePrefs(function() {
+ setupPrefs(callback);
});
}
--- a/dom/tv/test/mochitest/mochitest.ini
+++ b/dom/tv/test/mochitest/mochitest.ini
@@ -1,20 +1,6 @@
[DEFAULT]
support-files =
head.js
mock_data.json
[test_tv_non_permitted_app.html]
-[test_tv_permitted_app.html]
-[test_tv_get_tuners.html]
-[test_tv_get_sources.html]
-[test_tv_get_channels.html]
-[test_tv_get_channels_during_scanning.html]
-[test_tv_get_programs.html]
-[test_tv_get_current_program.html]
-[test_tv_set_current_source.html]
-[test_tv_set_invalid_current_source.html]
-[test_tv_set_current_channel.html]
-[test_tv_set_current_channel_during_scanning.html]
-[test_tv_set_invalid_current_channel.html]
-[test_tv_scan_channels_stopped.html]
-[test_tv_scan_channels_completed.html]
--- a/dom/tv/test/mochitest/test_tv_get_channels.html
+++ b/dom/tv/test/mochitest/test_tv_get_channels.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test GetChannels for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_get_channels_during_scanning.html
+++ b/dom/tv/test/mochitest/test_tv_get_channels_during_scanning.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test an error case for GetChannels during scanning for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_get_current_program.html
+++ b/dom/tv/test/mochitest/test_tv_get_current_program.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test GetCurrentProgram for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_get_programs.html
+++ b/dom/tv/test/mochitest/test_tv_get_programs.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test GetPrograms for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_get_sources.html
+++ b/dom/tv/test/mochitest/test_tv_get_sources.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test GetSources for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_get_tuners.html
+++ b/dom/tv/test/mochitest/test_tv_get_tuners.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test GetTuners for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_permitted_app.html
+++ b/dom/tv/test/mochitest/test_tv_permitted_app.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test Permitted Application for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_scan_channels_completed.html
+++ b/dom/tv/test/mochitest/test_tv_scan_channels_completed.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test channel scanning complete for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_scan_channels_stopped.html
+++ b/dom/tv/test/mochitest/test_tv_scan_channels_stopped.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test StartScanning and StopScanning for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_set_current_channel.html
+++ b/dom/tv/test/mochitest/test_tv_set_current_channel.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test SetCurrentChannel for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_set_current_channel_during_scanning.html
+++ b/dom/tv/test/mochitest/test_tv_set_current_channel_during_scanning.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test an error case for SetCurrentChannel during scanning for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_set_current_source.html
+++ b/dom/tv/test/mochitest/test_tv_set_current_source.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test SetCurrentSource for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_set_invalid_current_channel.html
+++ b/dom/tv/test/mochitest/test_tv_set_invalid_current_channel.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test an error case for SetCurrentChannel for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/tv/test/mochitest/test_tv_set_invalid_current_source.html
+++ b/dom/tv/test/mochitest/test_tv_set_invalid_current_source.html
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test an error case for SetCurrentSource for TV API</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
--- a/dom/webidl/AVInputPort.webidl
+++ b/dom/webidl/AVInputPort.webidl
@@ -1,9 +1,9 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
interface AVInputPort : InputPort {
};
--- a/dom/webidl/AlarmsManager.webidl
+++ b/dom/webidl/AlarmsManager.webidl
@@ -3,17 +3,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* https://wiki.mozilla.org/WebAPI/AlarmAPI
*/
[NavigatorProperty="mozAlarms",
JSImplementation="@mozilla.org/alarmsManager;1",
- CheckAnyPermissions="alarms",
- Pref="dom.mozAlarms.enabled"]
+ Pref="dom.mozAlarms.enabled",
+ ChromeOnly]
interface AlarmsManager {
DOMRequest getAll();
[UnsafeInPrerendering]
DOMRequest add(any date, DOMString respectTimezone, optional any data);
[UnsafeInPrerendering]
void remove(unsigned long id);
};
--- a/dom/webidl/Apps.webidl
+++ b/dom/webidl/Apps.webidl
@@ -17,19 +17,19 @@ dictionary LanguageDesc {
enum LocaleResourceType {
"binary",
"json",
"text"
};
[NoInterfaceObject, NavigatorProperty="mozApps",
- JSImplementation="@mozilla.org/webapps;1"]
+ JSImplementation="@mozilla.org/webapps;1",
+ ChromeOnly]
interface DOMApplicationsRegistry {
- [CheckAnyPermissions="webapps-manage homescreen-webapps-manage"]
readonly attribute DOMApplicationsManager mgmt;
DOMRequest install(DOMString url, optional InstallParameters params);
DOMRequest installPackage(DOMString url, optional InstallParameters params);
DOMRequest getSelf();
DOMRequest getInstalled();
DOMRequest checkInstalled(DOMString manifestUrl);
// Language pack API.
@@ -100,31 +100,26 @@ interface DOMApplication : EventTarget {
// Returns the localized value of a property, using either the manifest or
// a langpack if one is available.
Promise<DOMString> getLocalizedValue(DOMString property,
DOMString locale,
optional DOMString entryPoint);
};
[JSImplementation="@mozilla.org/webapps/manager;1",
- ChromeOnly,
- CheckAnyPermissions="webapps-manage homescreen-webapps-manage"]
+ ChromeOnly]
interface DOMApplicationsManager : EventTarget {
DOMRequest getAll();
- [CheckAnyPermissions="webapps-manage"]
void applyDownload(DOMApplication app);
DOMRequest uninstall(DOMApplication app);
- [CheckAnyPermissions="webapps-manage"]
Promise<DOMApplication> import(Blob blob);
- [CheckAnyPermissions="webapps-manage"]
Promise<any> extractManifest(Blob blob);
- [CheckAnyPermissions="webapps-manage"]
void setEnabled(DOMApplication app, boolean state);
Promise<Blob> getIcon(DOMApplication app, DOMString iconID,
optional DOMString entryPoint);
attribute EventHandler oninstall;
attribute EventHandler onuninstall;
attribute EventHandler onenabledstatechange;
};
--- a/dom/webidl/AudioChannelManager.webidl
+++ b/dom/webidl/AudioChannelManager.webidl
@@ -27,11 +27,11 @@ interface AudioChannelManager : EventTar
/**
* Indicates which audio channel is used to adjust volume when pressing HW
* volume keys.
*/
attribute DOMString volumeControlChannel;
[Pure, Cached, Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="system-app-only-audio-channels-in-app"]
+ ChromeOnly]
readonly attribute sequence<BrowserElementAudioChannel> allowedAudioChannels;
};
--- a/dom/webidl/BeforeAfterKeyboardEvent.webidl
+++ b/dom/webidl/BeforeAfterKeyboardEvent.webidl
@@ -1,18 +1,18 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString typeArg,
optional BeforeAfterKeyboardEventInit eventInitDict),
- CheckAnyPermissions="embed-apps before-after-keyboard-event",
- Pref="dom.beforeAfterKeyboardEvent.enabled"]
+ Pref="dom.beforeAfterKeyboardEvent.enabled",
+ ChromeOnly]
interface BeforeAfterKeyboardEvent : KeyboardEvent
{
// The valid value of embeddedCancelled is:
// - "mozbrowserbeforekeydown": null
// - "mozbrowserbeforekeyup": null
// - "mozbrowserafterkeydown": true/false
// - "mozbrowserafterkeyup": true/false
readonly attribute boolean? embeddedCancelled;
--- a/dom/webidl/BluetoothAdapter.webidl
+++ b/dom/webidl/BluetoothAdapter.webidl
@@ -27,27 +27,25 @@ dictionary MediaPlayStatus
// current track length (ms)
long long duration = -1;
// playing time (ms)
long long position = -1;
// one of 'STOPPED'/'PLAYING'/'PAUSED'/'FWD_SEEK'/'REV_SEEK'/'ERROR'
DOMString playStatus = "";
};
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothAdapter : EventTarget {
readonly attribute BluetoothAdapterState state;
- [AvailableIn=CertifiedApps]
readonly attribute DOMString address;
readonly attribute DOMString name;
readonly attribute boolean discoverable;
readonly attribute boolean discovering;
readonly attribute BluetoothGattServer? gattServer;
- [AvailableIn=CertifiedApps]
readonly attribute BluetoothPairingListener? pairingReqs;
// Fired when attribute(s) of BluetoothAdapter changed
attribute EventHandler onattributechanged;
// Fired when a remote device gets paired with the adapter
attribute EventHandler ondevicepaired;
@@ -104,22 +102,22 @@ interface BluetoothAdapter : EventTarget
/**
* Enable/Disable a local bluetooth adapter by asynchronus methods and return
* its result through a Promise.
*
* Several onattributechanged events would be triggered during processing the
* request, and the last one indicates adapter.state becomes enabled/disabled.
*/
- [NewObject, AvailableIn=CertifiedApps]
+ [NewObject]
Promise<void> enable();
- [NewObject, AvailableIn=CertifiedApps]
+ [NewObject]
Promise<void> disable();
- [NewObject, AvailableIn=CertifiedApps]
+ [NewObject]
Promise<void> setName(DOMString name);
[NewObject]
Promise<void> setDiscoverable(boolean discoverable);
[NewObject]
Promise<BluetoothDiscoveryHandle> startDiscovery();
[NewObject]
Promise<void> stopDiscovery();
@@ -139,17 +137,17 @@ interface BluetoothAdapter : EventTarget
[NewObject,
Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled"]
Promise<BluetoothDiscoveryHandle> startLeScan(sequence<DOMString> serviceUuids);
[NewObject,
Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled"]
Promise<void> stopLeScan(BluetoothDiscoveryHandle discoveryHandle);
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest getConnectedDevices(unsigned short serviceUuid);
/**
* Connect/Disconnect to a specific service of a target remote device.
* To check the value of service UUIDs, please check "Bluetooth Assigned
* Numbers" / "Service Discovery Protocol" for more information.
*
* Note that service UUID is optional. If it isn't passed when calling
@@ -159,59 +157,59 @@ interface BluetoothAdapter : EventTarget
*
* Reply success if the connection of any profile is successfully
* established/released; reply error if we failed to connect/disconnect all
* of the planned profiles.
*
* @param device Remote device
* @param profile 2-octets service UUID. This is optional.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest connect(BluetoothDevice device, optional unsigned short serviceUuid);
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest disconnect(BluetoothDevice device, optional unsigned short serviceUuid);
// One device can only send one file at a time
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest sendFile(DOMString deviceAddress, Blob blob);
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest stopSendingFile(DOMString deviceAddress);
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest confirmReceivingFile(DOMString deviceAddress, boolean confirmation);
// Connect/Disconnect SCO (audio) connection
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest connectSco();
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest disconnectSco();
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest isScoConnected();
/**
* Additional HFP methods to handle CDMA network.
*
* In GSM network we observe call operations from RIL call state changes;
* however in CDMA network RIL call states do not change under some call
* operations, so we need these additional methods to be informed of these
* operations from dialer.
*
* For more information please refer to bug 912005 and 925638.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest answerWaitingCall();
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest ignoreWaitingCall();
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest toggleCalls();
// AVRCP 1.3 methods
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest sendMediaMetaData(optional MediaMetaData mediaMetaData);
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest sendMediaPlayStatus(optional MediaPlayStatus mediaPlayStatus);
};
enum BluetoothAdapterState
{
"disabled",
"disabling",
"enabled",
--- a/dom/webidl/BluetoothAdapterEvent.webidl
+++ b/dom/webidl/BluetoothAdapterEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type, optional BluetoothAdapterEventInit eventInitDict)]
interface BluetoothAdapterEvent : Event
{
readonly attribute BluetoothAdapter? adapter;
readonly attribute DOMString? address;
};
dictionary BluetoothAdapterEventInit : EventInit
--- a/dom/webidl/BluetoothAttributeEvent.webidl
+++ b/dom/webidl/BluetoothAttributeEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothAttributeEventInit eventInitDict)]
interface BluetoothAttributeEvent : Event
{
[Cached, Constant]
readonly attribute sequence<DOMString> attrs;
};
--- a/dom/webidl/BluetoothClassOfDevice.webidl
+++ b/dom/webidl/BluetoothClassOfDevice.webidl
@@ -1,14 +1,14 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothClassOfDevice
{
/**
* The following constants are defined in Assigned Numbers of bluetooth
* General Access Profile (GAP) spec. For more information see
* https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
*/
--- a/dom/webidl/BluetoothDevice.webidl
+++ b/dom/webidl/BluetoothDevice.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothDevice : EventTarget
{
readonly attribute DOMString address;
readonly attribute BluetoothClassOfDevice cod;
readonly attribute DOMString name;
readonly attribute boolean paired;
readonly attribute BluetoothDeviceType type;
--- a/dom/webidl/BluetoothDeviceEvent.webidl
+++ b/dom/webidl/BluetoothDeviceEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type, optional BluetoothDeviceEventInit eventInitDict)]
interface BluetoothDeviceEvent : Event
{
readonly attribute BluetoothDevice? device;
readonly attribute DOMString? address;
};
dictionary BluetoothDeviceEventInit : EventInit
--- a/dom/webidl/BluetoothDiscoveryHandle.webidl
+++ b/dom/webidl/BluetoothDiscoveryHandle.webidl
@@ -1,9 +1,9 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothDiscoveryHandle : EventTarget {
attribute EventHandler ondevicefound;
};
--- a/dom/webidl/BluetoothGatt.webidl
+++ b/dom/webidl/BluetoothGatt.webidl
@@ -4,17 +4,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* [B2G only GATT client API]
* BluetoothGatt interface is exposed only if
* "dom.bluetooth.webbluetooth.enabled" preference is false.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled"]
interface BluetoothGatt : EventTarget
{
[Cached, Pure]
readonly attribute sequence<BluetoothGattService> services;
readonly attribute BluetoothConnectionState connectionState;
// Fired when the value of any characteristic changed
--- a/dom/webidl/BluetoothGattAttributeEvent.webidl
+++ b/dom/webidl/BluetoothGattAttributeEvent.webidl
@@ -1,17 +1,17 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type,
optional BluetoothGattAttributeEventInit eventInitDict),
- CheckAnyPermissions="bluetooth"]
+ ChromeOnly]
interface BluetoothGattAttributeEvent : Event
{
readonly attribute DOMString address;
readonly attribute long requestId;
readonly attribute BluetoothGattCharacteristic? characteristic;
readonly attribute BluetoothGattDescriptor? descriptor;
[Throws]
readonly attribute ArrayBuffer? value;
--- a/dom/webidl/BluetoothGattCharacteristic.webidl
+++ b/dom/webidl/BluetoothGattCharacteristic.webidl
@@ -28,17 +28,17 @@ dictionary GattPermissions
boolean writeSignedMITM = false;
};
/**
* BluetoothGattCharacteristic could be in the server role as a characteristic
* provided by a local GATT server, or in the client role as a characteristic
* provided by a remote GATT server.
*/
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothGattCharacteristic
{
readonly attribute BluetoothGattService service;
[Cached, Pure]
readonly attribute sequence<BluetoothGattDescriptor> descriptors;
readonly attribute DOMString uuid;
readonly attribute unsigned short instanceId;
--- a/dom/webidl/BluetoothGattCharacteristicEvent.webidl
+++ b/dom/webidl/BluetoothGattCharacteristicEvent.webidl
@@ -4,17 +4,17 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/**
* [B2G only GATT client API]
* BluetoothGattCharacteristicEvent interface is exposed only if
* "dom.bluetooth.webbluetooth.enabled" preference is false.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled",
Constructor(DOMString type,
optional BluetoothGattCharacteristicEventInit eventInitDict)]
interface BluetoothGattCharacteristicEvent : Event
{
readonly attribute BluetoothGattCharacteristic? characteristic;
};
--- a/dom/webidl/BluetoothGattDescriptor.webidl
+++ b/dom/webidl/BluetoothGattDescriptor.webidl
@@ -4,17 +4,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* BluetoothGattDescriptor could be in the server role as a descriptor provided
* by a local GATT server, or in the client role as a descriptor provided by a
* remote GATT server.
*/
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothGattDescriptor
{
readonly attribute BluetoothGattCharacteristic characteristic;
readonly attribute DOMString uuid;
readonly attribute ArrayBuffer? value;
[Cached, Constant]
readonly attribute GattPermissions permissions;
--- a/dom/webidl/BluetoothGattServer.webidl
+++ b/dom/webidl/BluetoothGattServer.webidl
@@ -61,17 +61,17 @@ dictionary BluetoothAdvertisingData
/**
* A list of Service or Service Class UUIDs.
* Please see Core Specification Supplement (CSS) v6 1.1 for more details.
*/
sequence<DOMString> serviceUuids = [];
};
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothGattServer : EventTarget
{
[Cached, Pure]
readonly attribute sequence<BluetoothGattService> services;
// Fired when a remote device has been connected/disconnected
attribute EventHandler onconnectionstatechanged;
--- a/dom/webidl/BluetoothGattService.webidl
+++ b/dom/webidl/BluetoothGattService.webidl
@@ -4,17 +4,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* BluetoothGattService could be in the server role as a service provided by a
* local GATT server, or in the client role as a service provided by a remote
* GATT server.
*/
-[CheckAnyPermissions="bluetooth", Constructor(BluetoothGattServiceInit init)]
+[ChromeOnly, Constructor(BluetoothGattServiceInit init)]
interface BluetoothGattService
{
[Cached, Pure]
readonly attribute sequence<BluetoothGattCharacteristic> characteristics;
[Cached, Pure]
readonly attribute sequence<BluetoothGattService> includedServices;
readonly attribute boolean isPrimary;
@@ -46,9 +46,9 @@ interface BluetoothGattService
[NewObject]
Promise<void> addIncludedService(BluetoothGattService service);
};
dictionary BluetoothGattServiceInit
{
boolean isPrimary = false;
DOMString uuid = "";
-};
\ No newline at end of file
+};
--- a/dom/webidl/BluetoothLeDeviceEvent.webidl
+++ b/dom/webidl/BluetoothLeDeviceEvent.webidl
@@ -4,17 +4,17 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/**
* [B2G only GATT client API]
* BluetoothLeDeviceEvent interface is exposed only if
* "dom.bluetooth.webbluetooth.enabled" preference is false.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled",
Constructor(DOMString type, optional BluetoothLeDeviceEventInit eventInitDict)]
interface BluetoothLeDeviceEvent : Event
{
readonly attribute BluetoothDevice? device;
readonly attribute short rssi;
[Throws]
readonly attribute ArrayBuffer? scanRecord;
--- a/dom/webidl/BluetoothManager.webidl
+++ b/dom/webidl/BluetoothManager.webidl
@@ -1,14 +1,14 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothManager: EventTarget
{
readonly attribute BluetoothAdapter? defaultAdapter;
// Fired when attribute(s) of BluetoothManager changed
attribute EventHandler onattributechanged;
// Fired when a new adapter is plugged in
--- a/dom/webidl/BluetoothMapFolderListingEvent.webidl
+++ b/dom/webidl/BluetoothMapFolderListingEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothMapFolderListingEventInit eventInitDict)]
interface BluetoothMapFolderListingEvent : Event
{
readonly attribute unsigned long maxListCount;
readonly attribute unsigned long listStartOffset;
readonly attribute BluetoothMapRequestHandle? handle;
--- a/dom/webidl/BluetoothMapGetMessageEvent.webidl
+++ b/dom/webidl/BluetoothMapGetMessageEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothMapGetMessageEventInit eventInitDict)]
interface BluetoothMapGetMessageEvent : Event
{
readonly attribute boolean hasAttachment;
readonly attribute FilterCharset charset;
readonly attribute BluetoothMapRequestHandle? handle;
--- a/dom/webidl/BluetoothMapMessageUpdateEvent.webidl
+++ b/dom/webidl/BluetoothMapMessageUpdateEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothMapMessageUpdateEventInit eventInitDict)]
interface BluetoothMapMessageUpdateEvent : Event
{
readonly attribute unsigned long instanceId;
readonly attribute BluetoothMapRequestHandle? handle;
};
--- a/dom/webidl/BluetoothMapMessagesListingEvent.webidl
+++ b/dom/webidl/BluetoothMapMessagesListingEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothMapMessagesListingEventInit eventInitDict)]
interface BluetoothMapMessagesListingEvent : Event
{
readonly attribute unsigned long maxListCount;
readonly attribute unsigned long listStartOffset;
readonly attribute unsigned long subjectLength;
[Cached, Constant]
--- a/dom/webidl/BluetoothMapRequestHandle.webidl
+++ b/dom/webidl/BluetoothMapRequestHandle.webidl
@@ -1,55 +1,55 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothMapRequestHandle
{
/**
* Reply to Folder-Listing object for MAP request. The Promise will be
* rejected if the MAP request operation fails.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
Promise<void> replyToFolderListing(long masId, DOMString folders);
/**
* Reply the Messages-Listing object to the MAP request. The Promise will
* be rejected if the MAP request operation fails.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
Promise<void> replyToMessagesListing(
long masId,
Blob messageslisting,
boolean newmessage,
DOMString timestamp,
unsigned long size);
/**
* Reply GetMessage object to the MAP request. The Promise will be rejected
* if the MAP request operation fails.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
Promise<void> replyToGetMessage(long masId, Blob bmessage);
/**
* Reply SetMessage object to the MAP request. The Promise will be rejected
* if the MAP request operation fails.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
Promise<void> replyToSetMessageStatus(long masId, boolean status);
/**
* Reply SendMessage request to the MAP request. The Promise will be rejected
* if the MAP request operation fails.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
Promise<void> replyToSendMessage(long masId, DOMString handleId, boolean status);
/**
* Reply Message-Update object to the MAP request. The Promise will be
* rejected if the MAP request operation fails.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
Promise<void> replyToMessageUpdate(long masId, boolean status);
};
--- a/dom/webidl/BluetoothMapSendMessageEvent.webidl
+++ b/dom/webidl/BluetoothMapSendMessageEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothMapSendMessageEventInit eventInitDict)]
interface BluetoothMapSendMessageEvent : Event
{
readonly attribute DOMString recipient;
readonly attribute DOMString messageBody;
readonly attribute unsigned long retry;
--- a/dom/webidl/BluetoothMapSetMessageStatusEvent.webidl
+++ b/dom/webidl/BluetoothMapSetMessageStatusEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothMapSetMessageStatusEventInit eventInitDict)]
interface BluetoothMapSetMessageStatusEvent : Event
{
readonly attribute unsigned long handleId;
readonly attribute StatusIndicators statusIndicator;
readonly attribute boolean statusValue;
--- a/dom/webidl/BluetoothObexAuthEvent.webidl
+++ b/dom/webidl/BluetoothObexAuthEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothObexAuthEventInit eventInitDict)]
interface BluetoothObexAuthEvent : Event
{
readonly attribute DOMString? userId;
readonly attribute BluetoothObexAuthHandle? handle;
};
--- a/dom/webidl/BluetoothObexAuthHandle.webidl
+++ b/dom/webidl/BluetoothObexAuthHandle.webidl
@@ -1,14 +1,14 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothObexAuthHandle
{
/**
* Reply password for obexpasswordreq. The promise will be rejected if the
* operation fails.
*/
[NewObject]
Promise<void> setPassword(DOMString aPassword);
--- a/dom/webidl/BluetoothPairingEvent.webidl
+++ b/dom/webidl/BluetoothPairingEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothPairingEventInit eventInitDict)]
interface BluetoothPairingEvent : Event
{
readonly attribute DOMString deviceName;
readonly attribute BluetoothPairingHandle? handle;
};
--- a/dom/webidl/BluetoothPairingHandle.webidl
+++ b/dom/webidl/BluetoothPairingHandle.webidl
@@ -1,14 +1,14 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothPairingHandle
{
/**
* A 6-digit string ranging from decimal 000000 to 999999.
* This attribute is an empty string for enterpincodereq and
* pairingconsentreq.
*/
readonly attribute DOMString passkey;
--- a/dom/webidl/BluetoothPairingListener.webidl
+++ b/dom/webidl/BluetoothPairingListener.webidl
@@ -1,13 +1,13 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-[AvailableIn=CertifiedApps, CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothPairingListener: EventTarget
{
attribute EventHandler ondisplaypasskeyreq;
attribute EventHandler onenterpincodereq;
attribute EventHandler onpairingconfirmationreq;
attribute EventHandler onpairingconsentreq;
};
--- a/dom/webidl/BluetoothPbapRequestHandle.webidl
+++ b/dom/webidl/BluetoothPbapRequestHandle.webidl
@@ -1,33 +1,33 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
interface BluetoothPbapRequestHandle
{
/**
* Reply vCard object to the PBAP request. The DOMRequest will get onerror
* callback if the PBAP request type is not 'pullvcardentryreq' or operation
* fails.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest replyTovCardPulling(Blob vcardObject);
/**
* Reply vCard object to the PBAP request. The DOMRequest will get onerror
* callback if the PBAP request type is not 'pullphonebookreq' or operation
* fails.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest replyToPhonebookPulling(Blob vcardObject,
unsigned long long phonebookSize);
/**
* Reply vCard object to the PBAP request. The DOMRequest will get onerror
* callback if the PBAP request type is not 'pullvcardlistingreq' or operation
* fails.
*/
- [NewObject, Throws, AvailableIn=CertifiedApps]
+ [NewObject, Throws]
DOMRequest replyTovCardListing(Blob vcardObject,
unsigned long long phonebookSize);
};
--- a/dom/webidl/BluetoothPhonebookPullingEvent.webidl
+++ b/dom/webidl/BluetoothPhonebookPullingEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothPhonebookPullingEventInit eventInitDict)]
interface BluetoothPhonebookPullingEvent : Event
{
readonly attribute DOMString name;
readonly attribute vCardVersion format;
[Cached, Constant]
readonly attribute sequence<vCardProperties> propSelector;
--- a/dom/webidl/BluetoothStatusChangedEvent.webidl
+++ b/dom/webidl/BluetoothStatusChangedEvent.webidl
@@ -1,17 +1,17 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type,
optional BluetoothStatusChangedEventInit eventInitDict),
- CheckAnyPermissions="bluetooth"]
+ ChromeOnly]
interface BluetoothStatusChangedEvent : Event
{
readonly attribute DOMString address;
readonly attribute boolean status;
};
dictionary BluetoothStatusChangedEventInit : EventInit
{
--- a/dom/webidl/BluetoothUUID.webidl
+++ b/dom/webidl/BluetoothUUID.webidl
@@ -8,17 +8,17 @@
*
*/
typedef DOMString UUID;
typedef (DOMString or unsigned long) BluetoothServiceUUID;
typedef (DOMString or unsigned long) BluetoothCharacteristicUUID;
typedef (DOMString or unsigned long) BluetoothDescriptorUUID;
-[Pref="dom.bluetooth.webbluetooth.enable", CheckAnyPermissions="bluetooth"]
+[Pref="dom.bluetooth.webbluetooth.enable", ChromeOnly]
interface BluetoothUUID
{
[Throws]
static UUID getService(BluetoothServiceUUID name);
[Throws]
static UUID getCharacteristic(BluetoothCharacteristicUUID name);
[Throws]
static UUID getDescriptor(BluetoothDescriptorUUID name);
--- a/dom/webidl/BluetoothVCardListingEvent.webidl
+++ b/dom/webidl/BluetoothVCardListingEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothVCardListingEventInit eventInitDict)]
interface BluetoothVCardListingEvent : Event
{
readonly attribute DOMString name;
readonly attribute vCardOrderType order;
readonly attribute DOMString searchValue;
readonly attribute vCardSearchKeyType searchKey;
--- a/dom/webidl/BluetoothVCardPullingEvent.webidl
+++ b/dom/webidl/BluetoothVCardPullingEvent.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
Constructor(DOMString type,
optional BluetoothVCardPullingEventInit eventInitDict)]
interface BluetoothVCardPullingEvent : Event
{
readonly attribute DOMString name;
readonly attribute vCardVersion format;
[Cached, Constant]
readonly attribute sequence<vCardProperties> propSelector;
--- a/dom/webidl/BrowserElement.webidl
+++ b/dom/webidl/BrowserElement.webidl
@@ -25,159 +25,159 @@ interface BrowserElement {
BrowserElement implements BrowserElementCommon;
BrowserElement implements BrowserElementPrivileged;
[NoInterfaceObject]
interface BrowserElementCommon {
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser embed-widgets"]
+ ChromeOnly]
void setVisible(boolean visible);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser embed-widgets"]
+ ChromeOnly]
DOMRequest getVisible();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser embed-widgets"]
+ ChromeOnly]
void setActive(boolean active);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser embed-widgets"]
+ ChromeOnly]
boolean getActive();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser embed-widgets"]
+ ChromeOnly]
void addNextPaintListener(BrowserElementNextPaintEventCallback listener);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser embed-widgets"]
+ ChromeOnly]
void removeNextPaintListener(BrowserElementNextPaintEventCallback listener);
};
[NoInterfaceObject]
interface BrowserElementPrivileged {
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void sendMouseEvent(DOMString type,
unsigned long x,
unsigned long y,
unsigned long button,
unsigned long clickCount,
unsigned long modifiers);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
Func="TouchEvent::PrefEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void sendTouchEvent(DOMString type,
sequence<unsigned long> identifiers,
sequence<long> x,
sequence<long> y,
sequence<unsigned long> rx,
sequence<unsigned long> ry,
sequence<float> rotationAngles,
sequence<float> forces,
unsigned long count,
unsigned long modifiers);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void goBack();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void goForward();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void reload(optional boolean hardReload = false);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void stop();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
DOMRequest download(DOMString url,
optional BrowserElementDownloadOptions options);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
DOMRequest purgeHistory();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
DOMRequest getScreenshot([EnforceRange] unsigned long width,
[EnforceRange] unsigned long height,
optional DOMString mimeType="");
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void zoom(float zoom);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
DOMRequest getCanGoBack();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
DOMRequest getCanGoForward();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
DOMRequest getContentDimensions();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAllPermissions="browser input-manage"]
+ ChromeOnly]
DOMRequest setInputMethodActive(boolean isActive);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAllPermissions="browser nfc-manager"]
+ ChromeOnly]
void setNFCFocus(boolean isFocus);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void findAll(DOMString searchString, BrowserFindCaseSensitivity caseSensitivity);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void findNext(BrowserFindDirection direction);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void clearMatch();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAllPermissions="browser browser:universalxss"]
+ ChromeOnly]
DOMRequest executeScript(DOMString script,
optional BrowserElementExecuteScriptOptions options);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAllPermissions="browser"]
+ ChromeOnly]
DOMRequest getWebManifest();
};
--- a/dom/webidl/BrowserElementAudioChannel.webidl
+++ b/dom/webidl/BrowserElementAudioChannel.webidl
@@ -1,16 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
interface BrowserElementAudioChannel : EventTarget {
readonly attribute AudioChannel name;
// This event is dispatched when this audiochannel is actually in used by the
// app or one of the sub-iframes.
attribute EventHandler onactivestatechanged;
[Throws]
@@ -27,51 +27,51 @@ interface BrowserElementAudioChannel : E
[Throws]
DOMRequest isActive();
};
partial interface BrowserElementPrivileged {
[Pure, Cached, Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
readonly attribute sequence<BrowserElementAudioChannel> allowedAudioChannels;
/**
* Mutes all audio in this browser.
*/
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void mute();
/**
* Unmutes all audio in this browser.
*/
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void unmute();
/**
* Obtains whether or not the browser is muted.
*/
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
DOMRequest getMuted();
/**
* Sets the volume for the browser.
*/
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
void setVolume(float volume);
/**
* Gets the volume for the browser.
*/
[Throws,
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
DOMRequest getVolume();
};
--- a/dom/webidl/BrowserElementProxy.webidl
+++ b/dom/webidl/BrowserElementProxy.webidl
@@ -3,13 +3,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor,
JSImplementation="@mozilla.org/dom/browser-element-proxy;1",
NavigatorProperty="mozBrowserElementProxy",
Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser:embedded-system-app"]
+ ChromeOnly]
interface BrowserElementProxy : EventTarget {
};
BrowserElementProxy implements BrowserElementCommon;
BrowserElementProxy implements BrowserElementPrivileged;
--- a/dom/webidl/ChromeNotifications.webidl
+++ b/dom/webidl/ChromeNotifications.webidl
@@ -1,14 +1,14 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[JSImplementation="@mozilla.org/mozChromeNotifications;1",
NavigatorProperty="mozChromeNotifications",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface ChromeNotifications {
void mozResendAllNotifications(ResendCallback resendCallback);
};
callback ResendCallback = void (long count);
--- a/dom/webidl/Contacts.webidl
+++ b/dom/webidl/Contacts.webidl
@@ -54,17 +54,17 @@ dictionary ContactProperties {
sequence<DOMString>? org;
sequence<DOMString>? jobTitle;
sequence<DOMString>? note;
sequence<DOMString>? key;
};
[Constructor(optional ContactProperties properties),
JSImplementation="@mozilla.org/contact;1",
- CheckAnyPermissions="contacts-read contacts-write contacts-create"]
+ ChromeOnly]
interface mozContact {
attribute DOMString id;
readonly attribute Date? published;
readonly attribute Date? updated;
attribute Date? bday;
attribute Date? anniversary;
@@ -113,17 +113,17 @@ dictionary ContactFindOptions : ContactF
DOMString filterValue; // e.g. "Tom"
DOMString filterOp; // e.g. "startsWith"
any filterBy; // e.g. ["givenName", "nickname"]
unsigned long filterLimit = 0;
};
[NoInterfaceObject, NavigatorProperty="mozContacts",
JSImplementation="@mozilla.org/contactManager;1",
- CheckAnyPermissions="contacts-read contacts-write contacts-create"]
+ ChromeOnly]
interface ContactManager : EventTarget {
DOMRequest find(optional ContactFindOptions options);
DOMCursor getAll(optional ContactFindSortOptions options);
DOMRequest clear();
DOMRequest save(mozContact contact);
DOMRequest remove((mozContact or DOMString) contactOrId);
DOMRequest getRevision();
DOMRequest getCount();
--- a/dom/webidl/DOMMobileMessageError.webidl
+++ b/dom/webidl/DOMMobileMessageError.webidl
@@ -1,12 +1,11 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface DOMMobileMessageError : DOMError {
readonly attribute (SmsMessage or MmsMessage) data;
};
--- a/dom/webidl/DisplayPortInputPort.webidl
+++ b/dom/webidl/DisplayPortInputPort.webidl
@@ -1,9 +1,9 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
interface DisplayPortInputPort : InputPort {
};
--- a/dom/webidl/DownloadEvent.webidl
+++ b/dom/webidl/DownloadEvent.webidl
@@ -1,17 +1,17 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional DownloadEventInit eventInitDict),
Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
interface DownloadEvent : Event
{
readonly attribute DOMDownload? download;
};
dictionary DownloadEventInit : EventInit
{
DOMDownload? download = null;
--- a/dom/webidl/Downloads.webidl
+++ b/dom/webidl/Downloads.webidl
@@ -16,17 +16,17 @@ enum DownloadState {
"succeeded",
"finalized"
};
[NoInterfaceObject,
NavigatorProperty="mozDownloadManager",
JSImplementation="@mozilla.org/downloads/manager;1",
Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
interface DOMDownloadManager : EventTarget {
// This promise returns an array of downloads with all the current
// download objects.
Promise<sequence<DOMDownload>> getDownloads();
// Removes one download from the downloads set. Returns a promise resolved
// with the finalized download.
[UnsafeInPrerendering]
@@ -51,26 +51,25 @@ interface DOMDownloadManager : EventTarg
//
// Applications must currently be certified to use this, but it could be
// widened at a later time.
//
// Note that "download" is not actually optional, but WebIDL requires that it
// be marked as such because it is not followed by a required argument. The
// promise will be rejected if the dictionary is omitted or the specified
// file does not exist on disk.
- [AvailableIn=CertifiedApps]
Promise<DOMDownload> adoptDownload(optional AdoptDownloadDict download);
// Fires when a new download starts.
attribute EventHandler ondownloadstart;
};
[JSImplementation="@mozilla.org/downloads/download;1",
Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
interface DOMDownload : EventTarget {
// The full size of the resource.
readonly attribute long long totalBytes;
// The number of bytes that we have currently downloaded.
readonly attribute long long currentBytes;
// The url of the resource.
--- a/dom/webidl/HDMIInputPort.webidl
+++ b/dom/webidl/HDMIInputPort.webidl
@@ -1,9 +1,9 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
interface HDMIInputPort : InputPort {
};
--- a/dom/webidl/IccCardLockError.webidl
+++ b/dom/webidl/IccCardLockError.webidl
@@ -1,12 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString errorName, short retryCount),
Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface IccCardLockError : DOMError {
readonly attribute short retryCount;
};
--- a/dom/webidl/IccChangeEvent.webidl
+++ b/dom/webidl/IccChangeEvent.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
Constructor(DOMString type, optional IccChangeEventInit eventInitDict)]
interface IccChangeEvent : Event
{
readonly attribute DOMString iccId;
};
dictionary IccChangeEventInit : EventInit
{
--- a/dom/webidl/InputMethod.webidl
+++ b/dom/webidl/InputMethod.webidl
@@ -11,17 +11,17 @@
* the remote input element.
* The API also contains a few Gaia System app only methods
* (marked with "input-manage" permission) for Gaia System app to interact with
* some types of inputs and to regulate the input apps.
*/
[JSImplementation="@mozilla.org/b2g-inputmethod;1",
NavigatorProperty="mozInputMethod",
Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input input-manage"]
+ ChromeOnly]
interface MozInputMethod : EventTarget {
/**
* Activate or decactive current API instance.
* Gaia System app call this method via BrowserElement#setInputMethodActive.
*/
[ChromeOnly]
void setActive(boolean isActive);
@@ -34,206 +34,187 @@ interface MozInputMethod : EventTarget {
* Fired when the input context changes, include changes from and to null.
* The new InputContext instance will be available in the event
* object under |inputcontext| property. When it changes to null it
* means the app (the user of this API) no longer has the control of
* the original focused input field.
* Note that if the app saves the original context, it might get
* void; implementation decides when to void the input context.
*/
- [CheckAnyPermissions="input"]
attribute EventHandler oninputcontextchange;
/**
* An "input context" is mapped to a text field that the app is
* allow to mutate. This attribute should be null when there is no
* text field currently focused.
*/
- [CheckAnyPermissions="input"]
readonly attribute MozInputContext? inputcontext;
/**
* Add a dynamically declared input.
*
* The id must not be the same with any statically declared input in the app
* manifest. If an input of the same id is already declared, the info of that
* input will be updated.
*/
- [CheckAnyPermissions="input"]
Promise<void> addInput(DOMString inputId,
MozInputMethodInputManifest inputManifest);
/**
* Remove a dynamically declared input.
*
* The id must not be the same with any statically declared input in the app
* manifest. Silently resolves if the input is not previously declared;
* rejects if attempt to remove a statically declared input.
*/
- [CheckAnyPermissions="input"]
Promise<void> removeInput(DOMString id);
/**
* Remove focus from the current input, usable by Gaia System app, globally,
* regardless of the current focus state.
*/
- [CheckAnyPermissions="input-manage"]
void removeFocus();
/**
* The following are internal methods for Firefox OS System app only,
* for handling the "option" group inputs.
*/
/**
* Set the value on the currently focused element. This has to be used
* for special situations where the value had to be chosen amongst a
* list (type=month) or a widget (type=date, time, etc.).
* If the value passed in parameter isn't valid (in the term of HTML5
* Forms Validation), the value will simply be ignored by the element.
*/
- [CheckAnyPermissions="input-manage"]
void setValue(DOMString value);
/**
* Select the <select> option specified by index.
* If this method is called on a <select> that support multiple
* selection, then the option specified by index will be added to
* the selection.
* If this method is called for a select that does not support multiple
* selection the previous element will be unselected.
*/
- [CheckAnyPermissions="input-manage"]
void setSelectedOption(long index);
/**
* Select the <select> options specified by indexes. All other options
* will be deselected.
* If this method is called for a <select> that does not support multiple
* selection, then the last index specified in indexes will be selected.
*/
- [CheckAnyPermissions="input-manage"]
void setSelectedOptions(sequence<long> indexes);
};
/**
* InputMethodManager contains a few of the global methods for the input app.
*/
[JSImplementation="@mozilla.org/b2g-imm;1",
Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input input-manage"]
+ ChromeOnly]
interface MozInputMethodManager : EventTarget {
/**
* Ask the OS to show a list of available inputs for users to switch from.
* OS should sliently ignore this request if the app is currently not the
* active one.
*/
- [CheckAllPermissions="input"]
void showAll();
/**
* Ask the OS to switch away from the current active input app.
* OS should sliently ignore this request if the app is currently not the
* active one.
*/
- [CheckAllPermissions="input"]
void next();
/**
* If this method returns true, it is recommended that the input app provides
* a shortcut that would invoke the next() method above, for easy switching
* between inputs -- i.e. show a "global" button on screen if the input app
* implements an on-screen virtual keyboard.
*
* The returning value is depend on the inputType of the current input context.
*/
- [CheckAllPermissions="input"]
boolean supportsSwitching();
/**
* Ask the OS to remove the input focus, will cause the lost of input context.
* OS should sliently ignore this request if the app is currently not the
* active one.
*/
- [CheckAllPermissions="input"]
void hide();
/**
* Update Gecko with information on the input types which supportsSwitching()
* should return ture.
*
* @param types Array of input types in which supportsSwitching() should
* return true.
*/
- [CheckAllPermissions="input-manage"]
void setSupportsSwitchingTypes(sequence<MozInputMethodInputContextInputTypes> types);
/**
* CustomEvent dispatches to System when there is an input to handle.
* If the API consumer failed to handle and call preventDefault(),
* there will be a message printed on the console.
*
* evt.detail is defined by MozInputContextFocusEventDetail.
*/
- [CheckAnyPermissions="input-manage"]
attribute EventHandler oninputcontextfocus;
/**
* Event dispatches to System when there is no longer an input to handle.
* If the API consumer failed to handle and call preventDefault(),
* there will be a message printed on the console.
*/
- [CheckAnyPermissions="input-manage"]
attribute EventHandler oninputcontextblur;
/**
* Event dispatches to System when there is a showAll() call.
* If the API consumer failed to handle and call preventDefault(),
* there will be a message printed on the console.
*/
- [CheckAnyPermissions="input-manage"]
attribute EventHandler onshowallrequest;
/**
* Event dispatches to System when there is a next() call.
* If the API consumer failed to handle and call preventDefault(),
* there will be a message printed on the console.
*/
- [CheckAnyPermissions="input-manage"]
attribute EventHandler onnextrequest;
/**
* Event dispatches to System when there is a addInput() call.
* The API consumer must call preventDefault() to indicate the event is
* consumed, otherwise the request is not considered handled even if
* waitUntil() was called.
*
* evt.detail is defined by MozInputRegistryEventDetail.
*/
- [CheckAnyPermissions="input-manage"]
attribute EventHandler onaddinputrequest;
/**
* Event dispatches to System when there is a removeInput() call.
* The API consumer must call preventDefault() to indicate the event is
* consumed, otherwise the request is not considered handled even if
* waitUntil() was called.
*
* evt.detail is defined by MozInputRegistryEventDetail.
*/
- [CheckAnyPermissions="input-manage"]
attribute EventHandler onremoveinputrequest;
};
/**
* Detail of the inputcontextfocus event.
*/
[JSImplementation="@mozilla.org/b2g-imm-focus;1",
Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input-manage"]
+ ChromeOnly]
interface MozInputContextFocusEventDetail {
/**
* The type of the focused input.
*/
readonly attribute MozInputMethodInputContextTypes type;
/**
* The input type of the focused input.
*/
@@ -281,17 +262,17 @@ dictionary MozInputMethodChoiceDict {
long? optionIndex;
};
/**
* detail of addinputrequest or removeinputrequest event.
*/
[JSImplementation="@mozilla.org/b2g-imm-input-registry;1",
Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input-manage"]
+ ChromeOnly]
interface MozInputRegistryEventDetail {
/**
* Manifest URL of the requesting app.
*/
readonly attribute DOMString manifestURL;
/**
* ID of the input
*/
@@ -315,17 +296,17 @@ interface MozInputRegistryEventDetail {
* input field. It also hosts the methods available to the keyboard app to
* mutate the input field represented. An "input context" gets void when the
* app is no longer allowed to interact with the text field,
* e.g., the text field does no longer exist, the app is being switched to
* background, and etc.
*/
[JSImplementation="@mozilla.org/b2g-inputcontext;1",
Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input"]
+ ChromeOnly]
interface MozInputContext: EventTarget {
/**
* Type of the InputContext. See MozInputMethodInputContextTypes
*/
readonly attribute MozInputMethodInputContextTypes? type;
/**
* InputType of the InputContext. See MozInputMethodInputContextInputTypes.
@@ -536,26 +517,26 @@ interface MozInputContext: EventTarget {
* This interface will be added into inputcontext and used to receive the
* events from the hardware keyboard.
* Example:
* mozInputMethod.inputcontext.hardwareinput.addEventListener('keyup', this);
* mozInputMethod.inputcontext.hardwareinput.removeEventListener('keyup', this);
*/
[JSImplementation="@mozilla.org/b2g-hardwareinput;1",
Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input"]
+ ChromeOnly]
interface MozHardwareInput: EventTarget {
};
/**
* Detail of the selectionchange event.
*/
[JSImplementation="@mozilla.org/b2g-imm-selectionchange;1",
Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input"]
+ ChromeOnly]
interface MozInputContextSelectionChangeEventDetail {
/**
* Indicate whether or not the change is due to our own action from,
* for example, sendKey() call.
*
* Note: this property is untrustworthy because it would still be true even
* if script in the page changed the text synchronously upon responding to
* events trigger by the call.
@@ -569,17 +550,17 @@ interface MozInputContextSelectionChange
readonly attribute long selectionEnd;
};
/**
* Detail of the surroundingtextchange event.
*/
[JSImplementation="@mozilla.org/b2g-imm-surroundingtextchange;1",
Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input"]
+ ChromeOnly]
interface MozInputContextSurroundingTextChangeEventDetail {
/**
* Indicate whether or not the change is due to our own action from,
* for example, sendKey() call.
*
* Note: this property is untrustworthy because it would still be true even
* if script in the page changed the text synchronously upon responding to
* events trigger by the call.
--- a/dom/webidl/InputPort.webidl
+++ b/dom/webidl/InputPort.webidl
@@ -1,16 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Reference https://wiki.mozilla.org/Input_Port_API#Basic_Port_Interface
*/
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
interface InputPort : EventTarget {
readonly attribute DOMString id;
readonly attribute MediaStream stream;
readonly attribute boolean connected;
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
};
--- a/dom/webidl/InputPortManager.webidl
+++ b/dom/webidl/InputPortManager.webidl
@@ -1,13 +1,13 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Reference https://wiki.mozilla.org/Input_Port_API#InputPortManager
*/
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
interface InputPortManager {
[Throws]
Promise<sequence<InputPort>> getInputPorts();
};
--- a/dom/webidl/MMICall.webidl
+++ b/dom/webidl/MMICall.webidl
@@ -1,13 +1,12 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.telephony.enabled",
- CheckAnyPermissions="telephony",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MMICall {
[Throws]
readonly attribute Promise<MozMMIResult> result;
};
--- a/dom/webidl/MmsMessage.webidl
+++ b/dom/webidl/MmsMessage.webidl
@@ -10,18 +10,17 @@ dictionary MmsDeliveryInfo {
DOMTimeStamp deliveryTimestamp = 0; // 0 if not available (e.g.,
// |delivery| = "received" or not yet delivered).
DOMString? readStatus = null;
DOMTimeStamp readTimestamp = 0; // 0 if not available (e.g.,
// |delivery| = "received" or not yet read).
};
[Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MmsMessage {
/**
* |type| is always "mms".
*/
readonly attribute DOMString type;
/**
* The id of the message record in the database.
--- a/dom/webidl/MobileMessageThread.webidl
+++ b/dom/webidl/MobileMessageThread.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MobileMessageThread {
/**
* Unique identity of the thread.
*/
readonly attribute unsigned long long id;
/**
* Last (MMS) message subject.
--- a/dom/webidl/MozCellBroadcast.webidl
+++ b/dom/webidl/MozCellBroadcast.webidl
@@ -4,17 +4,16 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Cell Broadcast short message service (CBS) permits a number of
* unacknowledged general CBS messages to be broadcast to all receivers within
* a particular region.
*/
[Pref="dom.cellbroadcast.enabled",
- CheckAnyPermissions="cellbroadcast",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozCellBroadcast : EventTarget
{
/**
* Cell Broadcast messages received.
*/
attribute EventHandler onreceived;
};
--- a/dom/webidl/MozCellBroadcastEvent.webidl
+++ b/dom/webidl/MozCellBroadcastEvent.webidl
@@ -1,18 +1,17 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional MozCellBroadcastEventInit eventInitDict),
Pref="dom.cellbroadcast.enabled",
- CheckAnyPermissions="cellbroadcast",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozCellBroadcastEvent : Event
{
readonly attribute MozCellBroadcastMessage? message;
};
dictionary MozCellBroadcastEventInit : EventInit
{
MozCellBroadcastMessage? message = null;
--- a/dom/webidl/MozCellBroadcastMessage.webidl
+++ b/dom/webidl/MozCellBroadcastMessage.webidl
@@ -7,18 +7,17 @@
enum CellBroadcastGsmGeographicalScope {"cell-immediate", "plmn",
"location-area", "cell"};
enum CellBroadcastMessageClass {"class-0", "class-1", "class-2",
"class-3", "user-1", "user-2", "normal"};
enum CellBroadcastEtwsWarningType {"earthquake", "tsunami",
"earthquake-tsunami", "test", "other"};
[Pref="dom.cellbroadcast.enabled",
- CheckAnyPermissions="cellbroadcast",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozCellBroadcastMessage
{
/**
* The Service Id in the device where the message is received from.
*/
readonly attribute unsigned long serviceId;
/**
@@ -70,18 +69,17 @@ interface MozCellBroadcastMessage
/**
* Service Category.
*/
readonly attribute unsigned short? cdmaServiceCategory;
};
[Pref="dom.cellbroadcast.enabled",
- CheckAnyPermissions="cellbroadcast",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozCellBroadcastEtwsInfo
{
/**
* Warning type. Possible values are "earthquake", "tsunami",
* "earthquake-tsunami", "test" and "other".
*/
readonly attribute CellBroadcastEtwsWarningType? warningType;
--- a/dom/webidl/MozContactChangeEvent.webidl
+++ b/dom/webidl/MozContactChangeEvent.webidl
@@ -1,16 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional MozContactChangeEventInit eventInitDict),
- CheckAnyPermissions="contacts-read contacts-write contacts-create"]
+ ChromeOnly]
interface MozContactChangeEvent : Event
{
readonly attribute DOMString? contactID;
readonly attribute DOMString? reason;
};
dictionary MozContactChangeEventInit : EventInit
{
--- a/dom/webidl/MozIcc.webidl
+++ b/dom/webidl/MozIcc.webidl
@@ -135,18 +135,17 @@ dictionary IccCardLockStatus
};
dictionary IccCardLockRetryCount
{
long retryCount; // The number of remaining retries. -1 if unkown.
};
[Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozIcc : EventTarget
{
// Integrated Circuit Card Information.
/**
* Information stored in the device's ICC.
*
* Once the ICC becomes undetectable, iccinfochange event will be notified.
--- a/dom/webidl/MozIccInfo.webidl
+++ b/dom/webidl/MozIccInfo.webidl
@@ -1,17 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
enum IccType {"sim", "usim", "csim", "ruim"};
[Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozIccInfo {
/**
* Integrated Circuit Card Type.
*/
readonly attribute IccType? iccType;
/**
* Integrated Circuit Card Identifier.
@@ -40,29 +39,27 @@ interface MozIccInfo {
/**
* Service provider name must be a part of displayed carrier name.
*/
readonly attribute boolean isDisplaySpnRequired;
};
[Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozGsmIccInfo : MozIccInfo {
/**
* Mobile Station ISDN Number (MSISDN) of the subscriber, aka
* his phone number.
*/
readonly attribute DOMString? msisdn;
};
[Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozCdmaIccInfo : MozIccInfo {
/**
* Mobile Directory Number (MDN) of the subscriber, aka his phone number.
*/
readonly attribute DOMString? mdn;
/**
* Preferred Roaming List (PRL) version of the subscriber.
--- a/dom/webidl/MozIccManager.webidl
+++ b/dom/webidl/MozIccManager.webidl
@@ -1,16 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozIccManager : EventTarget
{
/**
* STK menu presentation types.
*/
const unsigned short STK_MENU_TYPE_NOT_SPECIFIED = 0x00;
const unsigned short STK_MENU_TYPE_DATA_VALUES = 0x01;
const unsigned short STK_MENU_TYPE_NAVIGATION_OPTIONS = 0x03;
--- a/dom/webidl/MozIsoDepTech.webidl
+++ b/dom/webidl/MozIsoDepTech.webidl
@@ -1,13 +1,13 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-[Func="Navigator::HasNFCSupport", AvailableIn="PrivilegedApps",
+[Func="Navigator::HasNFCSupport", ChromeOnly,
ChromeConstructor(MozNFCTag tag)]
interface MozIsoDepTech {
/**
* Send raw ISO-DEP command to tag and receive the response.
*/
[Throws]
Promise<Uint8Array> transceive(Uint8Array command);
};
--- a/dom/webidl/MozMessageDeletedEvent.webidl
+++ b/dom/webidl/MozMessageDeletedEvent.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
Constructor(DOMString type, optional MozMessageDeletedEventInit eventInitDict)]
interface MozMessageDeletedEvent : Event
{
// Array of deleted message ids.
[Cached, Constant] readonly attribute sequence<long>? deletedMessageIds;
// Array of deleted thread ids.
[Cached, Constant] readonly attribute sequence<unsigned long long>? deletedThreadIds;
};
--- a/dom/webidl/MozMmsEvent.webidl
+++ b/dom/webidl/MozMmsEvent.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
Constructor(DOMString type, optional MozMmsEventInit eventInitDict)]
interface MozMmsEvent : Event
{
readonly attribute MmsMessage? message;
};
dictionary MozMmsEventInit : EventInit
{
--- a/dom/webidl/MozMobileConnection.webidl
+++ b/dom/webidl/MozMobileConnection.webidl
@@ -68,104 +68,97 @@ interface MozMobileConnection : EventTar
const long CLIR_DEFAULT = 0;
const long CLIR_INVOCATION = 1;
const long CLIR_SUPPRESSION = 2;
/**
* These two fields can be accessed by privileged applications with the
* 'mobilenetwork' permission.
*/
- [CheckAnyPermissions="mobilenetwork"]
readonly attribute DOMString lastKnownNetwork;
- [CheckAnyPermissions="mobilenetwork"]
readonly attribute DOMString lastKnownHomeNetwork;
/**
* Information about the voice connection.
*/
- [CheckAnyPermissions="mobileconnection"]
readonly attribute MozMobileConnectionInfo voice;
/**
* Information about the data connection.
*/
- [CheckAnyPermissions="mobileconnection"]
readonly attribute MozMobileConnectionInfo data;
/**
* Integrated Circuit Card Identifier of the SIM this mobile connection
* corresponds to.
*/
- [CheckAnyPermissions="mobileconnection"]
readonly attribute DOMString? iccId;
/**
* The selection mode of the voice and data networks.
*/
- [CheckAnyPermissions="mobileconnection"]
readonly attribute MobileNetworkSelectionMode? networkSelectionMode;
/**
* The current radio state.
*/
- [CheckAnyPermissions="mobileconnection"]
readonly attribute MobileRadioState? radioState;
/**
* Array of network types that are supported by this radio.
*/
- [Cached, Pure, CheckAnyPermissions="mobileconnection"]
+ [Cached, Pure]
readonly attribute sequence<MobileNetworkType> supportedNetworkTypes;
/**
* Search for available networks.
*
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called. And the request's
* result will be an array of MozMobileNetworkInfo.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported', or
* 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest getNetworks();
/**
* Manually selects the passed in network, overriding the radio's current
* selection.
*
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called.
* Note: If the network was actually changed by this request,
* the 'voicechange' and 'datachange' events will also be fired.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest selectNetwork(MozMobileNetworkInfo network);
/**
* Tell the radio to automatically select a network.
*
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called.
* Note: If the network was actually changed by this request, the
* 'voicechange' and 'datachange' events will also be fired.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest selectNetworkAutomatically();
/**
* Set preferred network type.
*
* @param type
* PreferredNetworkType indicates the desired preferred network type.
*
@@ -173,17 +166,17 @@ interface MozMobileConnection : EventTar
*
* If successful, the request's onsuccess will be called.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'ModeNotSupported', 'IllegalSIMorME', or
* 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest setPreferredNetworkType(MobilePreferredNetworkType type);
/**
* Query current preferred network type.
*
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called. And the request's
@@ -191,50 +184,50 @@ interface MozMobileConnection : EventTar
* The value will be either 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto',
* 'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo', 'lte/cdma/evdo',
* 'lte/wcdma/gsm', 'lte/wcdma/gsm/cdma/evdo', 'lte' or 'lte/wcdma'.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest getPreferredNetworkType();
/**
* Set roaming preference.
*
* @param mode
* RoamingPreferenceMode indicates the desired roaming preference.
*
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest setRoamingPreference(MobileRoamingMode mode);
/**
* Query current roaming preference.
*
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called. And the request's
* result will be a string indicating the current roaming preference.
* The value will be either 'home', 'affiliated', or 'any'.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest getRoamingPreference();
/**
* Set voice privacy preference.
*
* @param enabled
* Boolean indicates the preferred voice privacy mode used in voice
* scrambling in CDMA networks. 'True' means the enhanced voice security
@@ -243,32 +236,32 @@ interface MozMobileConnection : EventTar
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest setVoicePrivacyMode(boolean enabled);
/**
* Query current voice privacy mode.
*
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called. And the request's
* result will be a boolean indicating the current voice privacy mode.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest getVoicePrivacyMode();
/**
* Configures call forward options.
*
* @param options
* An object containing the call forward rule to set.
* @see MozCallForwardingOptions for the detail of options.
@@ -276,17 +269,17 @@ interface MozMobileConnection : EventTar
* @return a DOMRequest
*
* If successful, the request's onsuccess will be called.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest setCallForwardingOption(optional MozCallForwardingOptions options);
/**
* Queries current call forward options.
*
* @param reason
* Indicates the reason the call is being forwarded. It shall be one of
* the MozMobileConnection.CALL_FORWARD_REASON_* values.
@@ -296,17 +289,17 @@ interface MozMobileConnection : EventTar
* If successful, the request's onsuccess will be called. And the request's
* result will be an array of MozCallForwardingOptions.
* @see MozCallForwardingOptions for the detail of result.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest getCallForwardingOption(unsigned short reason);
/**
* Configures call barring options.
*
* @param options
* An object containing the call barring rule to set.
* @see MozCallBarringOptions for the detail of options.
@@ -314,17 +307,17 @@ interface MozMobileConnection : EventTar
* @return a DOMRequest
*
* If successful, the request's onsuccess will be called.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest setCallBarringOption(optional MozCallBarringOptions options);
/**
* Queries current call barring status.
*
* @param options
* An object containing the call barring rule to query. No need to
* specify 'enabled' property.
@@ -336,17 +329,17 @@ interface MozMobileConnection : EventTar
* result will be an object of MozCallBarringOptions with correct 'enabled'
* property indicating the status of this rule.
* @see MozCallBarringOptions for the detail of result.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest getCallBarringOption(optional MozCallBarringOptions options);
/**
* Change call barring facility password.
*
* @param options
* An object containing information about pin and newPin, and,
* this object must have both "pin" and "newPin" attributes
@@ -361,49 +354,49 @@ interface MozMobileConnection : EventTar
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest changeCallBarringPassword(optional MozCallBarringOptions options);
/**
* Configures call waiting options.
*
* @param enabled
* Boolean indicates the desired call waiting status.
*
* @return a DOMRequest.
*
* If successful, the request's onsuccess will be called.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest setCallWaitingOption(boolean enabled);
/**
* Queries current call waiting options.
*
* @return a DOMRequest
*
* If successful, the request's onsuccess will be called. And the request's
* result will be a boolean indicating the call waiting status.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest getCallWaitingOption();
/**
* Enables or disables the presentation of the calling line identity (CLI) to
* the called party when originating a call.
*
* @param mode
* It shall be one of the MozMobileConnection.CLIR_* values.
@@ -411,47 +404,47 @@ interface MozMobileConnection : EventTar
* @return a DOMRequest
*
* If successful, the request's onsuccess will be called.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest setCallingLineIdRestriction(unsigned short mode);
/**
* Queries current CLIR status.
*
* @return a DOMRequest
*
* If successful, the request's onsuccess will be called. And the request's
* result will be an object containing containing CLIR 'n' and 'm' parameter.
* @see MozClirStatus for the detail of result.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest getCallingLineIdRestriction();
/**
* Exit emergency callback mode.
*
* @return a DOMRequest
*
* If successful, the request's onsuccess will be called.
*
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest exitEmergencyCbMode();
/**
* Set radio enabled/disabled.
*
* @param enabled
* True to enable the radio.
*
@@ -462,17 +455,17 @@ interface MozMobileConnection : EventTar
* Otherwise, the request's onerror will be called, and the request's error
* will be either 'InvalidStateError', 'RadioNotAvailable',
* 'IllegalSIMorME', or 'GenericFailure'.
*
* Note: Request is not available when radioState is null, 'enabling', or
* 'disabling'. Calling the function in above conditions will receive
* 'InvalidStateError' error.
*/
- [Throws, CheckAnyPermissions="mobileconnection"]
+ [Throws]
DOMRequest setRadioEnabled(boolean enabled);
/**
* The 'voicechange' event is notified whenever the voice connection object
* changes.
*/
attribute EventHandler onvoicechange;
--- a/dom/webidl/MozMobileMessageManager.webidl
+++ b/dom/webidl/MozMobileMessageManager.webidl
@@ -107,18 +107,17 @@ dictionary TypeOfAddress {
* SMSC address.
*/
dictionary SmscAddress {
DOMString address;
TypeOfAddress typeOfAddress;
};
[Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozMobileMessageManager : EventTarget
{
[Throws]
DOMRequest getSegmentInfoForText(DOMString text);
/**
* Send SMS.
*
--- a/dom/webidl/MozNFC.webidl
+++ b/dom/webidl/MozNFC.webidl
@@ -30,68 +30,66 @@ enum NfcErrorMessage {
interface MozNFCManager {
/**
* API to check if the given application's manifest
* URL is registered with the Chrome Process or not.
*
* Returns success if given manifestUrl is registered for 'onpeerready',
* otherwise error
*/
- [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+ [ChromeOnly]
Promise<boolean> checkP2PRegistration(DOMString manifestUrl);
/**
* Notify that user has accepted to share nfc message on P2P UI
*/
- [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+ [ChromeOnly]
void notifyUserAcceptedP2P(DOMString manifestUrl);
/**
* Notify the status of sendFile operation
*/
- [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+ [ChromeOnly]
void notifySendFileStatus(octet status, DOMString requestId);
/**
* Power on the NFC hardware and start polling for NFC tags or devices.
*/
- [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+ [ChromeOnly]
Promise<void> startPoll();
/**
* Stop polling for NFC tags or devices. i.e. enter low power mode.
*/
- [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+ [ChromeOnly]
Promise<void> stopPoll();
/**
* Power off the NFC hardware.
*/
- [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+ [ChromeOnly]
Promise<void> powerOff();
};
[JSImplementation="@mozilla.org/nfc/manager;1",
NavigatorProperty="mozNfc",
Func="Navigator::HasNFCSupport",
- CheckAnyPermissions="nfc nfc-share",
- AvailableIn="PrivilegedApps",
+ ChromeOnly,
UnsafeInPrerendering]
interface MozNFC : EventTarget {
/**
* Indicate if NFC is enabled.
*/
readonly attribute boolean enabled;
/**
* This event will be fired when another NFCPeer is detected, and user confirms
* to share data to the NFCPeer object by calling mozNFC.notifyUserAcceptedP2P.
* The event will be type of NFCPeerEvent.
*/
- [CheckAnyPermissions="nfc-share", AvailableIn=CertifiedApps]
attribute EventHandler onpeerready;
/**
* This event will be fired when a NFCPeer is detected. The application has to
* be running on the foreground (decided by System app) to receive this event.
*
* The default action of this event is to dispatch the event in System app
* again, and System app will run the default UX behavior (like vibration).
--- a/dom/webidl/MozNFCPeer.webidl
+++ b/dom/webidl/MozNFCPeer.webidl
@@ -3,33 +3,33 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Part of this IDL file is from:
* http://w3c.github.io/nfc/proposals/common/nfc.html#idl-def-NFCPeer
*
* Copyright © 2013 Deutsche Telekom, Inc.
*/
-[JSImplementation="@mozilla.org/nfc/peer;1", AvailableIn="PrivilegedApps"]
+[JSImplementation="@mozilla.org/nfc/peer;1", ChromeOnly]
interface MozNFCPeer {
/**
* Indicate if this peer is already lost.
*/
readonly attribute boolean isLost;
/**
* Send NDEF data to peer device.
*/
[Throws]
Promise<void> sendNDEF(sequence<MozNDEFRecord> records);
/**
* Send file to peer device.
*/
- [Throws, CheckAnyPermissions="nfc-share", AvailableIn="CertifiedApps"]
+ [Throws]
Promise<void> sendFile(Blob blob);
};
// Mozilla Only
partial interface MozNFCPeer {
[ChromeOnly]
attribute DOMString session;
--- a/dom/webidl/MozNFCPeerEvent.webidl
+++ b/dom/webidl/MozNFCPeerEvent.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional MozNFCPeerEventInit eventInitDict),
- Func="Navigator::HasNFCSupport", CheckAnyPermissions="nfc nfc-share",
- AvailableIn="PrivilegedApps"]
+ Func="Navigator::HasNFCSupport", ChromeOnly]
interface MozNFCPeerEvent : Event
{
/**
* The detected NFCPeer.
*/
readonly attribute MozNFCPeer? peer;
};
--- a/dom/webidl/MozNFCTag.webidl
+++ b/dom/webidl/MozNFCTag.webidl
@@ -33,17 +33,17 @@ enum NFCTagType {
"Type2",
"Type3",
"Type4",
"MIFARE-Classic"
};
typedef (MozIsoDepTech or MozNfcATech) MozTagTech;
-[JSImplementation="@mozilla.org/nfc/tag;1", AvailableIn="PrivilegedApps"]
+[JSImplementation="@mozilla.org/nfc/tag;1", ChromeOnly]
interface MozNFCTag {
/**
* The supported technologies of this tag, null if unknown.
*/
[Cached, Pure] readonly attribute sequence<NFCTechType>? techList;
/**
* The identifier of this tag.
--- a/dom/webidl/MozNFCTagEvent.webidl
+++ b/dom/webidl/MozNFCTagEvent.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional MozNFCTagEventInit eventInitDict),
- Func="Navigator::HasNFCSupport", CheckAnyPermissions="nfc",
- AvailableIn="PrivilegedApps"]
+ Func="Navigator::HasNFCSupport", ChromeOnly]
interface MozNFCTagEvent : Event
{
/**
* The detected NFCTag.
*/
readonly attribute MozNFCTag? tag;
/**
--- a/dom/webidl/MozNetworkStats.webidl
+++ b/dom/webidl/MozNetworkStats.webidl
@@ -28,17 +28,16 @@ dictionary NetworkStatsGetOptions
dictionary NetworkStatsAlarmOptions
{
Date startTime;
Date data;
};
[JSImplementation="@mozilla.org/networkstats;1",
ChromeOnly,
- CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStats {
/**
* App manifest URL of an application for specifying the per-app stats of the
* specified app.
*/
readonly attribute DOMString appManifestURL;
--- a/dom/webidl/MozNetworkStatsAlarm.webidl
+++ b/dom/webidl/MozNetworkStatsAlarm.webidl
@@ -1,14 +1,13 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[JSImplementation="@mozilla.org/networkstatsalarm;1",
ChromeOnly,
- CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsAlarm {
readonly attribute unsigned long alarmId;
readonly attribute MozNetworkStatsInterface network;
readonly attribute long long threshold;
readonly attribute any data;
};
--- a/dom/webidl/MozNetworkStatsData.webidl
+++ b/dom/webidl/MozNetworkStatsData.webidl
@@ -1,13 +1,12 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[JSImplementation="@mozilla.org/networkStatsdata;1",
ChromeOnly,
- CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsData {
readonly attribute unsigned long rxBytes; // Received bytes.
readonly attribute unsigned long txBytes; // Sent bytes.
readonly attribute Date date; // Date.
};
--- a/dom/webidl/MozNetworkStatsInterface.webidl
+++ b/dom/webidl/MozNetworkStatsInterface.webidl
@@ -7,17 +7,17 @@ dictionary NetworkInterface {
DOMString id;
};
/**
* Represents a data interface for which the manager is recording statistics.
*/
[Constructor(optional NetworkInterface networkinterface),
JSImplementation="@mozilla.org/networkstatsinterface;1",
- CheckAnyPermissions="networkstats-manage",
+ ChromeOnly,
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsInterface {
readonly attribute long type;
/**
* Id value is '0' for wifi or the iccid for mobile (SIM).
*/
readonly attribute DOMString id;
--- a/dom/webidl/MozNetworkStatsManager.webidl
+++ b/dom/webidl/MozNetworkStatsManager.webidl
@@ -1,17 +1,17 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[NavigatorProperty="mozNetworkStats",
JSImplementation="@mozilla.org/networkStatsManager;1",
- CheckAnyPermissions="networkstats-manage",
+ ChromeOnly,
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsManager {
/**
* Constants for known interface types.
*/
const long WIFI = 0;
const long MOBILE = 1;
--- a/dom/webidl/MozNfcATech.webidl
+++ b/dom/webidl/MozNfcATech.webidl
@@ -1,13 +1,13 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-[Func="Navigator::HasNFCSupport", AvailableIn="PrivilegedApps",
+[Func="Navigator::HasNFCSupport", ChromeOnly,
ChromeConstructor(MozNFCTag tag)]
interface MozNfcATech {
/**
* Send raw NFC-A command to tag and receive the response.
*/
[Throws]
Promise<Uint8Array> transceive(Uint8Array command);
};
--- a/dom/webidl/MozPowerManager.webidl
+++ b/dom/webidl/MozPowerManager.webidl
@@ -16,17 +16,17 @@ enum FactoryResetReason {
"normal",
"wipe",
"root"
};
/**
* This interface implements navigator.mozPower
*/
-[CheckAnyPermissions="power"]
+[ChromeOnly]
interface MozPowerManager
{
[Throws]
void powerOff();
[Throws]
void reboot();
void factoryReset(optional FactoryResetReason reason = "normal");
--- a/dom/webidl/MozSettingsEvent.webidl
+++ b/dom/webidl/MozSettingsEvent.webidl
@@ -1,16 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional MozSettingsEventInit eventInitDict),
- CheckAnyPermissions="settings-api-read settings-api-write"]
+ ChromeOnly]
interface MozSettingsEvent : Event
{
readonly attribute DOMString? settingName;
readonly attribute any settingValue;
};
dictionary MozSettingsEventInit : EventInit
{
--- a/dom/webidl/MozSettingsTransactionEvent.webidl
+++ b/dom/webidl/MozSettingsTransactionEvent.webidl
@@ -1,16 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional MozSettingsTransactionEventInit eventInitDict),
- CheckAnyPermissions="settings-api-read settings-api-write"]
+ ChromeOnly]
interface MozSettingsTransactionEvent : Event
{
readonly attribute DOMString? error;
};
dictionary MozSettingsTransactionEventInit : EventInit
{
DOMString error = "";
--- a/dom/webidl/MozSmsEvent.webidl
+++ b/dom/webidl/MozSmsEvent.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
Constructor(DOMString type, optional MozSmsEventInit eventInitDict)]
interface MozSmsEvent : Event
{
readonly attribute SmsMessage? message;
};
dictionary MozSmsEventInit : EventInit
{
--- a/dom/webidl/MozStkCommandEvent.webidl
+++ b/dom/webidl/MozStkCommandEvent.webidl
@@ -50,18 +50,17 @@ dictionary MozStkIconContainer
*
* Array of icons, basically of a same image, that may differ in size,
* resolution or coding scheme. The first icon should be the default one.
*/
sequence<MozStkIcon> icons;
};
[Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
Constructor(DOMString type, optional MozStkCommandEventInit eventInitDict)]
interface MozStkCommandEvent : Event
{
readonly attribute any command;
};
dictionary MozStkCommandEventInit : EventInit
{
--- a/dom/webidl/MozTetheringManager.webidl
+++ b/dom/webidl/MozTetheringManager.webidl
@@ -27,17 +27,17 @@ dictionary TetheringConfiguration {
DOMString endIp;
DOMString dns1;
DOMString dns2;
WifiTetheringConfig wifiConfig;
};
[JSImplementation="@mozilla.org/tetheringmanager;1",
NavigatorProperty="mozTetheringManager",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozTetheringManager {
/**
* Enable/Disable tethering.
* @param enabled True to enable tethering, False to disable tethering.
* @param type Tethering type to enable/disable.
* @param config Configuration should have following fields when enable is True:
* - ip ip address.
* - prefix mask length.
--- a/dom/webidl/MozVoicemail.webidl
+++ b/dom/webidl/MozVoicemail.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
/* vim: set ts=2 et sw=2 tw=40: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[Pref="dom.voicemail.enabled",
- CheckAnyPermissions="voicemail",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozVoicemail : EventTarget
{
/**
* The current voicemail status of a specified service, or null when the
* status is unknown.
*/
[Throws]
MozVoicemailStatus getStatus(optional unsigned long serviceId);
--- a/dom/webidl/MozVoicemailEvent.webidl
+++ b/dom/webidl/MozVoicemailEvent.webidl
@@ -1,18 +1,17 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional MozVoicemailEventInit eventInitDict),
Pref="dom.voicemail.enabled",
- CheckAnyPermissions="voicemail",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozVoicemailEvent : Event
{
readonly attribute MozVoicemailStatus? status;
};
dictionary MozVoicemailEventInit : EventInit
{
MozVoicemailStatus? status = null;
--- a/dom/webidl/MozVoicemailStatus.webidl
+++ b/dom/webidl/MozVoicemailStatus.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
/* vim: set ts=2 et sw=2 tw=40: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[Pref="dom.voicemail.enabled",
- CheckAnyPermissions="voicemail",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface MozVoicemailStatus
{
readonly attribute unsigned long serviceId;
/**
* Whether or not there are messages waiting in the voicemail box
*/
readonly attribute boolean hasMessages;
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -89,20 +89,20 @@ interface NavigatorContentUtils {
[NoInterfaceObject]
interface NavigatorStorageUtils {
// NOT IMPLEMENTED
//void yieldForStorageUpdates();
};
[NoInterfaceObject]
interface NavigatorFeatures {
- [CheckAnyPermissions="feature-detection", Throws]
+ [ChromeOnly, Throws]
Promise<any> getFeature(DOMString name);
- [CheckAnyPermissions="feature-detection", Throws]
+ [ChromeOnly, Throws]
Promise<any> hasFeature(DOMString name);
};
partial interface Navigator {
[Throws]
readonly attribute Permissions permissions;
};
@@ -201,33 +201,33 @@ partial interface Navigator {
// WebKit/Blink supports this (hardcoded ""); Trident/Presto do not.
readonly attribute DOMString vendorSub;
// WebKit/Blink supports this (hardcoded "20030107"); Trident/Presto don't
readonly attribute DOMString productSub;
// WebKit/Blink/Trident/Presto support this.
readonly attribute boolean cookieEnabled;
[Throws, Constant, Cached]
readonly attribute DOMString buildID;
- [Throws, CheckAnyPermissions="power", UnsafeInPrerendering]
+ [Throws, ChromeOnly, UnsafeInPrerendering]
readonly attribute MozPowerManager mozPower;
// WebKit/Blink/Trident/Presto support this.
[Throws]
boolean javaEnabled();
/**
* Navigator requests to add an idle observer to the existing window.
*/
- [Throws, CheckAnyPermissions="idle"]
+ [Throws, ChromeOnly]
void addIdleObserver(MozIdleObserver aIdleObserver);
/**
* Navigator requests to remove an idle observer from the existing window.
*/
- [Throws, CheckAnyPermissions="idle"]
+ [Throws, ChromeOnly]
void removeIdleObserver(MozIdleObserver aIdleObserver);
/**
* Request a wake lock for a resource.
*
* A page holds a wake lock to request that a resource not be turned
* off (or otherwise made unavailable).
*
@@ -275,17 +275,17 @@ partial interface Navigator {
// nsIDOMNavigatorDesktopNotification
partial interface Navigator {
[Throws, Pref="notification.feature.enabled", UnsafeInPrerendering]
readonly attribute DesktopNotificationCenter mozNotification;
};
#ifdef MOZ_WEBSMS_BACKEND
partial interface Navigator {
- [CheckAnyPermissions="sms", Pref="dom.sms.enabled", AvailableIn="CertifiedApps"]
+ [ChromeOnly, Pref="dom.sms.enabled"]
readonly attribute MozMobileMessageManager? mozMobileMessage;
};
#endif
// NetworkInformation
partial interface Navigator {
[Throws, Pref="dom.netinfo.enabled"]
readonly attribute NetworkInformation connection;
@@ -294,40 +294,40 @@ partial interface Navigator {
// nsIDOMNavigatorCamera
partial interface Navigator {
[Throws, Func="Navigator::HasCameraSupport", UnsafeInPrerendering]
readonly attribute CameraManager mozCameras;
};
#ifdef MOZ_B2G_RIL
partial interface Navigator {
- [Throws, Pref="dom.mobileconnection.enabled", CheckAnyPermissions="mobileconnection mobilenetwork", UnsafeInPrerendering]
+ [Throws, Pref="dom.mobileconnection.enabled", ChromeOnly, UnsafeInPrerendering]
readonly attribute MozMobileConnectionArray mozMobileConnections;
};
partial interface Navigator {
- [Throws, Pref="dom.cellbroadcast.enabled", CheckAnyPermissions="cellbroadcast",
- AvailableIn="CertifiedApps", UnsafeInPrerendering]
+ [Throws, Pref="dom.cellbroadcast.enabled", ChromeOnly,
+ UnsafeInPrerendering]
readonly attribute MozCellBroadcast mozCellBroadcast;
};
partial interface Navigator {
- [Throws, Pref="dom.voicemail.enabled", CheckAnyPermissions="voicemail",
- AvailableIn="CertifiedApps", UnsafeInPrerendering]
+ [Throws, Pref="dom.voicemail.enabled", ChromeOnly,
+ UnsafeInPrerendering]
readonly attribute MozVoicemail mozVoicemail;
};
partial interface Navigator {
- [Throws, Pref="dom.icc.enabled", CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps", UnsafeInPrerendering]
+ [Throws, Pref="dom.icc.enabled", ChromeOnly,
+ UnsafeInPrerendering]
readonly attribute MozIccManager? mozIccManager;
};
partial interface Navigator {
- [Throws, Pref="dom.telephony.enabled", CheckAnyPermissions="telephony", UnsafeInPrerendering]
+ [Throws, Pref="dom.telephony.enabled", ChromeOnly, UnsafeInPrerendering]
readonly attribute Telephony? mozTelephony;
};
#endif // MOZ_B2G_RIL
#ifdef MOZ_GAMEPAD
// https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
partial interface Navigator {
[Throws, Pref="dom.gamepad.enabled"]
@@ -341,32 +341,32 @@ partial interface Navigator {
partial interface Navigator {
[Throws, Pref="dom.vr.enabled"]
Promise<sequence<VRDevice>> getVRDevices();
};
#ifdef MOZ_B2G_BT
partial interface Navigator {
- [Throws, CheckAnyPermissions="bluetooth", UnsafeInPrerendering]
+ [Throws, ChromeOnly, UnsafeInPrerendering]
readonly attribute BluetoothManager mozBluetooth;
};
#endif // MOZ_B2G_BT
#ifdef MOZ_B2G_FM
partial interface Navigator {
- [Throws, CheckAnyPermissions="fmradio", UnsafeInPrerendering]
+ [Throws, ChromeOnly, UnsafeInPrerendering]
readonly attribute FMRadio mozFMRadio;
};
#endif // MOZ_B2G_FM
#ifdef MOZ_TIME_MANAGER
// nsIDOMMozNavigatorTime
partial interface Navigator {
- [Throws, CheckAnyPermissions="time", UnsafeInPrerendering]
+ [Throws, ChromeOnly, UnsafeInPrerendering]
readonly attribute MozTimeManager mozTime;
};
#endif // MOZ_TIME_MANAGER
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
// nsIMozNavigatorAudioChannelManager
partial interface Navigator {
[Throws]
@@ -416,32 +416,32 @@ partial interface Navigator {
partial interface Navigator {
[Throws, Pref="beacon.enabled"]
boolean sendBeacon(DOMString url,
optional (ArrayBufferView or Blob or DOMString or FormData)? data = null);
};
partial interface Navigator {
- [Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+ [Pref="dom.tv.enabled", ChromeOnly]
readonly attribute TVManager? tv;
};
partial interface Navigator {
- [Throws, Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+ [Throws, Pref="dom.inputport.enabled", ChromeOnly]
readonly attribute InputPortManager inputPortManager;
};
partial interface Navigator {
[Throws, Pref="dom.presentation.enabled", Func="Navigator::HasPresentationSupport", SameObject]
readonly attribute Presentation? presentation;
};
partial interface Navigator {
- [NewObject, Pref="dom.mozTCPSocket.enabled", CheckAnyPermissions="tcp-socket"]
+ [NewObject, Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist"]
readonly attribute LegacyMozTCPSocket mozTCPSocket;
};
#ifdef MOZ_EME
partial interface Navigator {
[Pref="media.eme.apiVisible", NewObject]
Promise<MediaKeySystemAccess>
requestMediaKeySystemAccess(DOMString keySystem,
--- a/dom/webidl/PermissionSettings.webidl
+++ b/dom/webidl/PermissionSettings.webidl
@@ -1,14 +1,14 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain at http://mozilla.org/MPL/2.0/. */
[JSImplementation="@mozilla.org/permissionSettings;1",
- CheckAnyPermissions="permissions",
+ ChromeOnly,
Pref="dom.mozPermissionSettings.enabled",
NavigatorProperty="mozPermissionSettings"]
interface PermissionSettings
{
DOMString get(DOMString permission, DOMString manifestURI, DOMString origin, boolean browserFlag);
void set(DOMString permission, DOMString value, DOMString manifestURI, DOMString origin, boolean browserFlag);
--- a/dom/webidl/PhoneNumberService.webidl
+++ b/dom/webidl/PhoneNumberService.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[JSImplementation="@mozilla.org/phoneNumberService;1",
NavigatorProperty="mozPhoneNumberService",
- CheckAnyPermissions="phonenumberservice"]
+ ChromeOnly]
interface PhoneNumberService {
DOMRequest fuzzyMatch([TreatNullAs=EmptyString] optional DOMString number1 = "",
[TreatNullAs=EmptyString] optional DOMString number2= "");
DOMString normalize(DOMString number);
};
--- a/dom/webidl/PresentationDeviceInfoManager.webidl
+++ b/dom/webidl/PresentationDeviceInfoManager.webidl
@@ -8,17 +8,17 @@ dictionary PresentationDeviceInfo {
DOMString id;
DOMString name;
DOMString type;
};
[NavigatorProperty="mozPresentationDeviceInfo",
JSImplementation="@mozilla.org/presentation-device/deviceInfo;1",
Pref="dom.presentation.enabled",
- CheckAnyPermissions="presentation-device-manage"]
+ ChromeOnly]
interface PresentationDeviceInfoManager : EventTarget {
// notify if any device updated.
attribute EventHandler ondevicechange;
// retrieve all available device infos
Promise<sequence<PresentationDeviceInfo>> getAll();
// Force all registered device provider to update device information.
--- a/dom/webidl/PresentationRequest.webidl
+++ b/dom/webidl/PresentationRequest.webidl
@@ -56,11 +56,11 @@ interface PresentationRequest : EventTar
* "connected".
*
* The promise may be rejected duo to one of the following reasons:
* - "OperationError": Unexpected error occurs.
* - "NotFoundError": No available device.
* - "NetworkError": Failed to establish the control channel or data channel.
* - "TimeoutError": Presenting page takes too long to load.
*/
- [CheckAnyPermissions="presentation-device-manage", Throws]
+ [ChromeOnly, Throws]
Promise<PresentationConnection> startWithDevice(DOMString deviceId);
};
--- a/dom/webidl/ResourceStats.webidl
+++ b/dom/webidl/ResourceStats.webidl
@@ -1,38 +1,35 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/networkStatsData;1"]
interface NetworkStatsData
{
readonly attribute unsigned long long receivedBytes;
readonly attribute unsigned long long sentBytes;
readonly attribute DOMTimeStamp timestamp; // timestamp of the record
};
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/powerStatsData;1"]
interface PowerStatsData
{
readonly attribute unsigned long long consumedPower; // unit: mW
readonly attribute DOMTimeStamp timestamp; // timestamp of the record
};
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/resourceStats;1"]
interface ResourceStats
{
/**
* Type of statistics/
*/
readonly attribute ResourceType type;
--- a/dom/webidl/ResourceStatsManager.webidl
+++ b/dom/webidl/ResourceStatsManager.webidl
@@ -65,19 +65,18 @@ dictionary ResourceStatsAlarmOptions
*
* |data| is used to reflect in the alarm object when the alarm is triggered.
* |data| should be copied using the structured clone algorithm.
*/
[EnforceRange] DOMTimeStamp startTime; // time in milliseconds since Epoch
any data;
};
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/resourceStatsAlarm;1"]
interface ResourceStatsAlarm
{
/**
* ID of the alarm
*/
readonly attribute unsigned long alarmId;
@@ -107,20 +106,19 @@ interface ResourceStatsAlarm
readonly attribute unsigned long long threshold;
/**
* |data| is used to reflect in the alarm object when the alarm is triggered.
*/
readonly attribute any data;
};
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
Pref="dom.resource_stats.enabled",
Constructor(ResourceType type),
- AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/resourceStatsManager;1"]
interface ResourceStatsManager
{
/**
* Query resource statistics.
*
* |statsOptions| specifies the detail of statistics of interest.
*
--- a/dom/webidl/SecureElement.webidl
+++ b/dom/webidl/SecureElement.webidl
@@ -32,18 +32,17 @@ dictionary SECommand {
required octet p1; // First Octet of Parameters Byte
required octet p2; // Second Octet of Parameters Byte
sequence<octet>? data = null; // Sequence of octets
short le = -1; // The length of the expected
// response data or -1 if none is expected
};
[Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
JSImplementation="@mozilla.org/secureelement/reader;1"]
interface SEReader {
// 'true' if a secure element is present
readonly attribute boolean isSEPresent;
// Type of SecureElement
readonly attribute SEType type;
@@ -61,18 +60,17 @@ interface SEReader {
* Closes all sessions associated with this Reader and its associated channels.
*
*/
[Throws]
Promise<void> closeAll();
};
[Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
JSImplementation="@mozilla.org/secureelement/session;1"]
interface SESession {
// 'reader' that provides this session
readonly attribute SEReader reader;
// Status of current session
readonly attribute boolean isClosed;
@@ -97,18 +95,17 @@ interface SESession {
* Close all active channels associated with this session.
*
*/
[Throws]
Promise<void> closeAll();
};
[Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
JSImplementation="@mozilla.org/secureelement/channel;1"]
interface SEChannel {
// 'session' obj this channel is bound to
readonly attribute SESession session;
// response to openBasicChannel / openLogicalChannel operation
[Constant, Cached] readonly attribute Uint8Array? openResponse;
@@ -137,18 +134,17 @@ interface SEChannel {
* Closes the active channel.
*
*/
[Throws]
Promise<void> close();
};
[Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
JSImplementation="@mozilla.org/secureelement/response;1"]
interface SEResponse {
// Response received on this 'channel' object.
[Constant] readonly attribute SEChannel channel;
// First octet of response's status word
[Constant] readonly attribute octet sw1;
--- a/dom/webidl/SecureElementManager.webidl
+++ b/dom/webidl/SecureElementManager.webidl
@@ -1,17 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Copyright © 2014 Deutsche Telekom, Inc. */
[Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
JSImplementation="@mozilla.org/secureelement/manager;1",
NavigatorProperty="seManager",
NoInterfaceObject]
interface SEManager {
/**
* Retrieves all the readers available on the device.
*
--- a/dom/webidl/SettingsManager.webidl
+++ b/dom/webidl/SettingsManager.webidl
@@ -26,17 +26,17 @@ dictionary SettingChange {
DOMString settingValue;
};
callback SettingChangeCallback = void (SettingChange setting);
[JSImplementation="@mozilla.org/settingsManager;1",
NavigatorProperty="mozSettings",
Pref="dom.mozSettings.enabled",
- CheckAnyPermissions="settings-api-read settings-api-write"]
+ ChromeOnly]
interface SettingsManager : EventTarget {
SettingsLock createLock();
void addObserver(DOMString name, SettingChangeCallback callback);
void removeObserver(DOMString name, SettingChangeCallback callback);
attribute EventHandler onsettingchange;
};
--- a/dom/webidl/SimplePushManager.webidl
+++ b/dom/webidl/SimplePushManager.webidl
@@ -1,15 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[NavigatorProperty="push",
JSImplementation="@mozilla.org/push/PushManager;1",
- CheckAnyPermissions="push",
+ ChromeOnly,
Pref="services.push.enabled"]
interface SimplePushManager {
DOMRequest register();
DOMRequest unregister(DOMString pushEndpoint);
DOMRequest registrations();
};
--- a/dom/webidl/SmsMessage.webidl
+++ b/dom/webidl/SmsMessage.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
interface SmsMessage {
/**
* |type| is always "sms".
*/
readonly attribute DOMString type;
/**
* The id of the message record in the database.
--- a/dom/webidl/SystemUpdate.webidl
+++ b/dom/webidl/SystemUpdate.webidl
@@ -11,17 +11,17 @@ dictionary SystemUpdatePackageInfo {
DOMString type = "";
DOMString version = "";
DOMString description = "";
DOMTimeStamp buildDate = 0;
unsigned long long size = 0;
};
[JSImplementation="@mozilla.org/system-update-provider;1",
- CheckAnyPermissions="system-update",
+ ChromeOnly,
Pref="dom.system_update.enabled"]
interface SystemUpdateProvider : EventTarget {
readonly attribute DOMString name;
readonly attribute DOMString uuid;
attribute EventHandler onupdateavailable;
attribute EventHandler onprogress;
attribute EventHandler onupdateready;
@@ -32,17 +32,17 @@ interface SystemUpdateProvider : EventTa
void stopDownload();
void applyUpdate();
boolean setParameter(DOMString name, DOMString value);
DOMString getParameter(DOMString name);
};
[NavigatorProperty="updateManager",
JSImplementation="@mozilla.org/system-update-manager;1",
- CheckAnyPermissions="system-update",
+ ChromeOnly,
Pref="dom.system_update.enabled"]
interface SystemUpdateManager {
Promise<sequence<SystemUpdateProviderInfo>> getProviders();
Promise<SystemUpdateProvider> setActiveProvider(DOMString uuid);
Promise<SystemUpdateProvider> getActiveProvider();
};
--- a/dom/webidl/TCPSocketErrorEvent.webidl
+++ b/dom/webidl/TCPSocketErrorEvent.webidl
@@ -4,18 +4,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Dispatched as part of the "error" event in the following situations:
* - if there's an error detected when the TCPSocket closes
* - if there's an internal error while sending data
* - if there's an error connecting to the host
*/
-[Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
- Constructor(DOMString type, optional TCPSocketErrorEventInit eventInitDict),
+[Constructor(DOMString type, optional TCPSocketErrorEventInit eventInitDict),
+ Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)]
interface TCPSocketErrorEvent : Event {
readonly attribute DOMString name;
readonly attribute DOMString message;
};
dictionary TCPSocketErrorEventInit : EventInit
{
--- a/dom/webidl/TVChannel.webidl
+++ b/dom/webidl/TVChannel.webidl
@@ -13,17 +13,17 @@ enum TVChannelType {
"data"
};
dictionary TVGetProgramsOptions {
unsigned long long startTime;
unsigned long long duration;
};
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
interface TVChannel : EventTarget {
[Throws]
Promise<sequence<TVProgram>> getPrograms(optional TVGetProgramsOptions options);
[Throws]
Promise<TVProgram> getCurrentProgram();
readonly attribute DOMString networkId;
--- a/dom/webidl/TVCurrentChannelChangedEvent.webidl
+++ b/dom/webidl/TVCurrentChannelChangedEvent.webidl
@@ -7,14 +7,13 @@
* http://seanyhlin.github.io/TV-Manager-API/
*/
dictionary TVCurrentChannelChangedEventInit : EventInit {
TVChannel? channel = null;
};
[Pref="dom.tv.enabled",
- CheckAnyPermissions="tv",
- AvailableIn=CertifiedApps,
+ ChromeOnly,
Constructor(DOMString type, optional TVCurrentChannelChangedEventInit eventInitDict)]
interface TVCurrentChannelChangedEvent : Event {
readonly attribute TVChannel? channel;
};
--- a/dom/webidl/TVCurrentSourceChangedEvent.webidl
+++ b/dom/webidl/TVCurrentSourceChangedEvent.webidl
@@ -7,14 +7,13 @@
* http://seanyhlin.github.io/TV-Manager-API/
*/
dictionary TVCurrentSourceChangedEventInit : EventInit {
TVSource? source = null;
};
[Pref="dom.tv.enabled",
- CheckAnyPermissions="tv",
- AvailableIn=CertifiedApps,
+ ChromeOnly,
Constructor(DOMString type, optional TVCurrentSourceChangedEventInit eventInitDict)]
interface TVCurrentSourceChangedEvent : Event {
readonly attribute TVSource? source;
};
--- a/dom/webidl/TVEITBroadcastedEvent.webidl
+++ b/dom/webidl/TVEITBroadcastedEvent.webidl
@@ -7,14 +7,13 @@
* http://seanyhlin.github.io/TV-Manager-API/
*/
dictionary TVEITBroadcastedEventInit : EventInit {
sequence<TVProgram> programs = [];
};
[Pref="dom.tv.enabled",
- CheckAnyPermissions="tv",
- AvailableIn=CertifiedApps,
+ ChromeOnly,
Constructor(DOMString type, optional TVEITBroadcastedEventInit eventInitDict)]
interface TVEITBroadcastedEvent : Event {
[Pure, Cached] readonly attribute sequence<TVProgram> programs;
};
--- a/dom/webidl/TVManager.webidl
+++ b/dom/webidl/TVManager.webidl
@@ -2,13 +2,13 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://seanyhlin.github.io/TV-Manager-API/
*/
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
interface TVManager : EventTarget {
[Throws]
Promise<sequence<TVTuner>> getTuners();
};
--- a/dom/webidl/TVProgram.webidl
+++ b/dom/webidl/TVProgram.webidl
@@ -2,17 +2,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://seanyhlin.github.io/TV-Manager-API/
*/
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
interface TVProgram {
sequence<DOMString> getAudioLanguages();
sequence<DOMString> getSubtitleLanguages();
readonly attribute DOMString eventId;
readonly attribute TVChannel channel;
--- a/dom/webidl/TVScanningStateChangedEvent.webidl
+++ b/dom/webidl/TVScanningStateChangedEvent.webidl
@@ -15,15 +15,14 @@ enum TVScanningState {
};
dictionary TVScanningStateChangedEventInit : EventInit {
TVScanningState state = "cleared";
TVChannel? channel = null;
};
[Pref="dom.tv.enabled",
- CheckAnyPermissions="tv",
- AvailableIn=CertifiedApps,
+ ChromeOnly,
Constructor(DOMString type, optional TVScanningStateChangedEventInit eventInitDict)]
interface TVScanningStateChangedEvent : Event {
readonly attribute TVScanningState state;
readonly attribute TVChannel? channel;
};
--- a/dom/webidl/TVSource.webidl
+++ b/dom/webidl/TVSource.webidl
@@ -28,17 +28,17 @@ enum TVSourceType {
"t-dmb",
"s-dmb"
};
dictionary TVStartScanningOptions {
boolean isRescanned;
};
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
interface TVSource : EventTarget {
[Throws]
Promise<sequence<TVChannel>> getChannels();
[Throws]
Promise<void> setCurrentChannel(DOMString channelNumber);
[Throws]
--- a/dom/webidl/TVTuner.webidl
+++ b/dom/webidl/TVTuner.webidl
@@ -2,17 +2,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://seanyhlin.github.io/TV-Manager-API/
*/
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
interface TVTuner : EventTarget {
[Throws]
sequence<TVSourceType> getSupportedSourceTypes();
[Throws]
Promise<sequence<TVSource>> getSources();
[Throws]
--- a/dom/webidl/Telephony.webidl
+++ b/dom/webidl/Telephony.webidl
@@ -46,18 +46,17 @@ interface Telephony : EventTarget {
[Throws]
void startTone(DOMString tone, optional unsigned long serviceId);
[Throws]
void stopTone(optional unsigned long serviceId);
// Calling this method, the app will be treated as owner of the telephony
// calls from the AudioChannel policy.
- [Throws,
- CheckAllPermissions="audio-channel-telephony"]
+ [Throws]
void ownAudioChannel();
[Throws]
attribute boolean muted;
[Throws]
attribute boolean speakerEnabled;
--- a/dom/webidl/UDPMessageEvent.webidl
+++ b/dom/webidl/UDPMessageEvent.webidl
@@ -5,17 +5,17 @@
*
* The origin of this IDL file is
* http://www.w3.org/TR/raw-sockets/#interface-udpmessageevent
*/
//Bug 1056444: This interface should be removed after UDPSocket.input/UDPSocket.output are ready.
[Constructor(DOMString type, optional UDPMessageEventInit eventInitDict),
Pref="dom.udpsocket.enabled",
- CheckAnyPermissions="udp-socket"]
+ ChromeOnly]
interface UDPMessageEvent : Event {
readonly attribute DOMString remoteAddress;
readonly attribute unsigned short remotePort;
readonly attribute any data;
};
dictionary UDPMessageEventInit : EventInit {
DOMString remoteAddress = "";
--- a/dom/webidl/UDPSocket.webidl
+++ b/dom/webidl/UDPSocket.webidl
@@ -14,17 +14,17 @@ dictionary UDPOptions {
DOMString remoteAddress;
unsigned short remotePort;
boolean addressReuse = true;
boolean loopback = false;
};
[Constructor (optional UDPOptions options),
Pref="dom.udpsocket.enabled",
- CheckAnyPermissions="udp-socket"]
+ ChromeOnly]
interface UDPSocket : EventTarget {
readonly attribute DOMString? localAddress;
readonly attribute unsigned short? localPort;
readonly attribute DOMString? remoteAddress;
readonly attribute unsigned short? remotePort;
readonly attribute boolean addressReuse;
readonly attribute boolean loopback;
readonly attribute SocketReadyState readyState;
--- a/dom/webidl/USSDReceivedEvent.webidl
+++ b/dom/webidl/USSDReceivedEvent.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.telephony.enabled",
- CheckAnyPermissions="telephony",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
Constructor(DOMString type, optional USSDReceivedEventInit eventInitDict)]
interface USSDReceivedEvent : Event
{
readonly attribute unsigned long serviceId;
readonly attribute DOMString? message;
readonly attribute USSDSession? session; // null if session is ended.
};
--- a/dom/webidl/USSDSession.webidl
+++ b/dom/webidl/USSDSession.webidl
@@ -1,17 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.telephony.enabled",
- CheckAnyPermissions="telephony",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
Constructor(unsigned long serviceId)]
interface USSDSession {
[NewObject]
Promise<void> send(DOMString ussd);
[NewObject]
Promise<void> cancel();
};
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -1872,18 +1872,16 @@ WorkerLoadInfo::WorkerLoadInfo()
: mWindowID(UINT64_MAX)
, mServiceWorkerID(0)
, mReferrerPolicy(net::RP_Default)
, mFromWindow(false)
, mEvalAllowed(false)
, mReportCSPViolations(false)
, mXHRParamsAllowed(false)
, mPrincipalIsSystem(false)
- , mIsInPrivilegedApp(false)
- , mIsInCertifiedApp(false)
, mStorageAllowed(false)
, mPrivateBrowsing(true)
, mServiceWorkersTestingInWindow(false)
{
MOZ_COUNT_CTOR(WorkerLoadInfo);
}
WorkerLoadInfo::~WorkerLoadInfo()
@@ -1932,18 +1930,16 @@ WorkerLoadInfo::StealFrom(WorkerLoadInfo
mWindowID = aOther.mWindowID;
mServiceWorkerID = aOther.mServiceWorkerID;
mReferrerPolicy = aOther.mReferrerPolicy;
mFromWindow = aOther.mFromWindow;
mEvalAllowed = aOther.mEvalAllowed;
mReportCSPViolations = aOther.mReportCSPViolations;
mXHRParamsAllowed = aOther.mXHRParamsAllowed;
mPrincipalIsSystem = aOther.mPrincipalIsSystem;
- mIsInPrivilegedApp = aOther.mIsInPrivilegedApp;
- mIsInCertifiedApp = aOther.mIsInCertifiedApp;
mStorageAllowed = aOther.mStorageAllowed;
mPrivateBrowsing = aOther.mPrivateBrowsing;
mServiceWorkersTestingInWindow = aOther.mServiceWorkersTestingInWindow;
}
template <class Derived>
class WorkerPrivateParent<Derived>::EventTarget final
: public nsIEventTarget
@@ -3551,21 +3547,16 @@ WorkerPrivateParent<Derived>::SetPrincip
nsILoadGroup* aLoadGroup)
{
AssertIsOnMainThread();
MOZ_ASSERT(NS_LoadGroupMatchesPrincipal(aLoadGroup, aPrincipal));
MOZ_ASSERT(!mLoadInfo.mPrincipalInfo);
mLoadInfo.mPrincipal = aPrincipal;
mLoadInfo.mPrincipalIsSystem = nsContentUtils::IsSystemPrincipal(aPrincipal);
- uint16_t appStatus = aPrincipal->GetAppStatus();
- mLoadInfo.mIsInPrivilegedApp =
- (appStatus == nsIPrincipal::APP_STATUS_CERTIFIED ||
- appStatus == nsIPrincipal::APP_STATUS_PRIVILEGED);
- mLoadInfo.mIsInCertifiedApp = (appStatus == nsIPrincipal::APP_STATUS_CERTIFIED);
aPrincipal->GetCsp(getter_AddRefs(mLoadInfo.mCSP));
if (mLoadInfo.mCSP) {
mLoadInfo.mCSP->GetAllowsEval(&mLoadInfo.mReportCSPViolations,
&mLoadInfo.mEvalAllowed);
// Set ReferrerPolicy
bool hasReferrerPolicy = false;
@@ -4388,21 +4379,16 @@ WorkerPrivate::GetLoadInfo(JSContext* aC
uint32_t perm;
rv = permMgr->TestPermissionFromPrincipal(loadInfo.mPrincipal, "systemXHR",
&perm);
NS_ENSURE_SUCCESS(rv, rv);
loadInfo.mXHRParamsAllowed = perm == nsIPermissionManager::ALLOW_ACTION;
- uint16_t appStatus = loadInfo.mPrincipal->GetAppStatus();
- loadInfo.mIsInPrivilegedApp =
- (appStatus == nsIPrincipal::APP_STATUS_CERTIFIED ||
- appStatus == nsIPrincipal::APP_STATUS_PRIVILEGED);
- loadInfo.mIsInCertifiedApp = (appStatus == nsIPrincipal::APP_STATUS_CERTIFIED);
loadInfo.mFromWindow = true;
loadInfo.mWindowID = globalWindow->WindowID();
nsContentUtils::StorageAccess access =
nsContentUtils::StorageAllowedForWindow(globalWindow);
loadInfo.mStorageAllowed = access > nsContentUtils::StorageAccess::eDeny;
loadInfo.mPrivateBrowsing = nsContentUtils::IsInPrivateBrowsing(document);
} else {
// Not a window
--- a/dom/workers/WorkerPrivate.h
+++ b/dom/workers/WorkerPrivate.h
@@ -598,28 +598,16 @@ public:
SetPrincipal(nsIPrincipal* aPrincipal, nsILoadGroup* aLoadGroup);
bool
UsesSystemPrincipal() const
{
return mLoadInfo.mPrincipalIsSystem;
}
- bool
- IsInPrivilegedApp() const
- {
- return mLoadInfo.mIsInPrivilegedApp;
- }
-
- bool
- IsInCertifiedApp() const
- {
- return mLoadInfo.mIsInCertifiedApp;
- }
-
const PrincipalInfo&
GetPrincipalInfo() const
{
return *mLoadInfo.mPrincipalInfo;
}
already_AddRefed<nsIChannel>
ForgetWorkerChannel()
--- a/dom/workers/WorkerScope.cpp
+++ b/dom/workers/WorkerScope.cpp
@@ -465,32 +465,29 @@ DedicatedWorkerGlobalScope::WrapGlobalOb
JS::CompartmentOptions options;
mWorkerPrivate->CopyJSCompartmentOptions(options);
const bool usesSystemPrincipal = mWorkerPrivate->UsesSystemPrincipal();
// Note that xpc::ShouldDiscardSystemSource() and
// xpc::ExtraWarningsForSystemJS() read prefs that are cached on the main
// thread. This is benignly racey.
- const bool discardSource = (usesSystemPrincipal ||
- mWorkerPrivate->IsInPrivilegedApp()) &&
+ const bool discardSource = usesSystemPrincipal &&
xpc::ShouldDiscardSystemSource();
const bool extraWarnings = usesSystemPrincipal &&
xpc::ExtraWarningsForSystemJS();
JS::CompartmentBehaviors& behaviors = options.behaviors();
behaviors.setDiscardSource(discardSource)
.extraWarningsOverride().set(extraWarnings);
- const bool inCertifiedApp = mWorkerPrivate->IsInCertifiedApp();
const bool sharedMemoryEnabled = xpc::SharedMemoryEnabled();
JS::CompartmentCreationOptions& creationOptions = options.creationOptions();
- creationOptions.setSharedMemoryAndAtomicsEnabled(sharedMemoryEnabled)
- .setExperimentalDateTimeFormatFormatToPartsEnabled(inCertifiedApp);
+ creationOptions.setSharedMemoryAndAtomicsEnabled(sharedMemoryEnabled);
return DedicatedWorkerGlobalScopeBinding::Wrap(aCx, this, this,
options,
GetWorkerPrincipal(),
true, aReflector);
}
void
--- a/dom/workers/Workers.h
+++ b/dom/workers/Workers.h
@@ -263,18 +263,16 @@ struct WorkerLoadInfo
uint64_t mServiceWorkerID;
net::ReferrerPolicy mReferrerPolicy;
bool mFromWindow;
bool mEvalAllowed;
bool mReportCSPViolations;
bool mXHRParamsAllowed;
bool mPrincipalIsSystem;
- bool mIsInPrivilegedApp;
- bool mIsInCertifiedApp;
bool mStorageAllowed;
bool mPrivateBrowsing;
bool mServiceWorkersTestingInWindow;
WorkerLoadInfo();
~WorkerLoadInfo();
void StealFrom(WorkerLoadInfo& aOther);