Skip to content

Commit

Permalink
Bug 1238576 - disable mozApps API on desktop/Android; r=ehsan,ochamea…
Browse files Browse the repository at this point in the history
…u,bz,mcmanus,jmaher,marco
  • Loading branch information
mykmelez committed Feb 8, 2016
1 parent 33ea2e8 commit a6aff18
Show file tree
Hide file tree
Showing 33 changed files with 75 additions and 66 deletions.
3 changes: 1 addition & 2 deletions devtools/shared/apps/tests/mochitest.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[DEFAULT]
skip-if = (buildapp != 'b2g' && buildapp != 'mulet')
support-files =
debugger-protocol-helper.js
redirect.sjs

[test_webapps_actor.html]
# The mochitest doesn't work on fennec yet
skip-if = toolkit == 'android'
2 changes: 1 addition & 1 deletion dom/activities/tests/mochi/mochitest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = e10s || os == 'android'
skip-if = (buildapp != 'b2g' && buildapp != 'mulet')
support-files =
common.js
system.webapp
Expand Down
2 changes: 1 addition & 1 deletion dom/apps/tests/chrome.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g' || os == 'android'
skip-if = buildapp != 'mulet'
support-files =
apps/*
asmjs/*
Expand Down
1 change: 1 addition & 0 deletions dom/apps/tests/mochitest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp != 'b2g' && buildapp != 'mulet'
support-files =
addons/application.zip
addons/invalid.webapp
Expand Down
7 changes: 0 additions & 7 deletions dom/base/test/test_navigator_resolve_identity.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
var y = navigator.mozContacts;
is(x, y, "Should have gotten the same mozContacts object again");

// Test Javascript-navigator-property objects
x = navigator.mozApps;
is(typeof x, "object", "Should have a mozApps object");
delete navigator.mozApps;
y = navigator.mozApps;
is(x, y, "Should have gotten the same mozApps object again");

</script>
</head>
<body>
Expand Down
5 changes: 0 additions & 5 deletions dom/base/test/test_navigator_resolve_identity_xrays.xul
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=985827
is(nav.mozContacts, nav.mozContacts,
"Should have gotten the same mozContacts object again");
// Test Javascript-navigator-property objects
is(typeof nav.mozApps, "object", "Should have a mozApps object");
is(nav.mozApps, nav.mozApps,
"Should have gotten the same mozApps object again");
SimpleTest.finish();
});
]]>
Expand Down
8 changes: 4 additions & 4 deletions dom/bindings/test/test_bug707564-chrome.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
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(nav);
isnot(props.indexOf("mozApps"), -1,
"Should enumerate a mozApps property on navigator xray");
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 == "mozApps") {
if (name == "mozContacts") {
found = true;
}
}
ok(found, "Should enumerate a mozApps property on navigator xray via for...in");
ok(found, "Should enumerate a mozContacts property on navigator xray via for...in");

SimpleTest.finish();
}
Expand Down
8 changes: 4 additions & 4 deletions dom/bindings/test/test_bug707564.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@

addLoadEvent(function() {
var props = Object.getOwnPropertyNames(frames[0].navigator);
isnot(props.indexOf("mozApps"), -1,
"Should enumerate a mozApps property on navigator");
isnot(props.indexOf("mozContacts"), -1,
"Should enumerate a mozContacts property on navigator");

// Now enumerate a different navigator object
var found = false;
for (var name in frames[1].navigator) {
if (name == "mozApps") {
if (name == "mozContacts") {
found = true;
}
}
ok(found, "Should enumerate a mozApps property on navigator via for...in");
ok(found, "Should enumerate a mozContacts property on navigator via for...in");
SimpleTest.finish();
});
</script>
Expand Down
4 changes: 2 additions & 2 deletions dom/broadcastchannel/tests/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ support-files =
[test_broadcastchannel_worker.html]
[test_broadcastchannel_worker_alive.html]
[test_broadcastchannel_mozbrowser.html]
skip-if = buildapp == 'b2g'
skip-if = buildapp != 'mulet'
[test_broadcastchannel_mozbrowser2.html]
skip-if = buildapp == 'b2g'
skip-if = buildapp != 'mulet'
[test_bfcache.html]
4 changes: 2 additions & 2 deletions dom/browser-element/mochitest/chrome.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || (buildapp == 'b2g' && (toolkit != 'gonk' || debug))

support-files =
audio.ogg
Expand All @@ -15,4 +15,4 @@ support-files =
[test_browserElement_MultipleAudioChannels.html]
tags = audiochannel
[test_browserElement_NotifyChannel.html]
tags = audiochannel
tags = audiochannel
5 changes: 3 additions & 2 deletions dom/browser-element/mochitest/mochitest-oop.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ skip-if = toolkit=='gonk' || (toolkit == 'gonk' && !debug)
[test_browserElement_oop_Alert.html]
[test_browserElement_oop_AlertInFrame.html]
[test_browserElement_oop_AllowEmbedAppsInNestedOOIframe.html]
skip-if = toolkit=='gonk'
skip-if = toolkit == 'gonk' || buildapp != 'b2g'
[test_browserElement_oop_AppFramePermission.html]
skip-if = (toolkit == 'gonk' && !debug)
skip-if = (toolkit == 'gonk' && !debug) || buildapp != 'b2g'
[test_browserElement_oop_AppWindowNamespace.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_AudioChannelMutedByDefault.html]
Expand All @@ -44,6 +44,7 @@ skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_DOMRequestError.html]
[test_browserElement_oop_DataURI.html]
[test_browserElement_oop_DisallowEmbedAppsInOOP.html]
skip-if = buildapp != 'b2g'
[test_browserElement_oop_DocumentFirstPaint.html]
[test_browserElement_oop_Download.html]
disabled = bug 1022281
Expand Down
8 changes: 4 additions & 4 deletions dom/browser-element/mochitest/mochitest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s
support-files =
audio.ogg
../../../dom/media/test/short-video.ogv
Expand Down Expand Up @@ -166,7 +166,7 @@ tags = audiochannel
skip-if = buildapp == 'b2g'
[test_browserElement_inproc_AlertInFrame.html]
[test_browserElement_inproc_AppFramePermission.html]
skip-if = toolkit == 'android' || buildapp == 'b2g'
skip-if = toolkit == 'android' || buildapp != 'mulet'
[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]
Expand All @@ -192,7 +192,7 @@ 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 = os == "android" || toolkit == 'gonk' # embed-apps doesn't work in the mochitest app
skip-if = os == "android" || toolkit == 'gonk' || buildapp != 'mulet' # embed-apps doesn't work in the mochitest app
[test_browserElement_inproc_DocumentFirstPaint.html]
[test_browserElement_inproc_Download.html]
disabled = bug 1022281
Expand Down Expand Up @@ -232,7 +232,7 @@ skip-if = (toolkit == 'gonk' && !debug)
# 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')
skip-if = toolkit == 'gonk' || buildapp == 'mulet'
[test_browserElement_inproc_PurgeHistory.html]
[test_browserElement_inproc_ReloadPostRequest.html]
[test_browserElement_inproc_RemoveBrowserElement.html]
Expand Down
2 changes: 1 addition & 1 deletion dom/cache/test/mochitest/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ skip-if = e10s && debug && os == 'win'
[test_cache_restart.html]
[test_cache_shrink.html]
[test_cache_clear_on_app_uninstall.html]
skip-if = e10s || buildapp == 'b2g' # bug 1178685
skip-if = buildapp != 'mulet' || e10s # bug 1178685
[test_cache_orphaned_cache.html]
[test_cache_orphaned_body.html]
[test_cache_untrusted.html]
2 changes: 1 addition & 1 deletion dom/datastore/tests/mochitest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = e10s
skip-if = (buildapp != 'b2g' && buildapp != 'mulet')
support-files =
file_app_install.html
file_readonly.html
Expand Down
6 changes: 3 additions & 3 deletions dom/indexedDB/test/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,14 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') # Bug 931116
[test_webapp_clearBrowserData_inproc_inproc.html]
# The clearBrowserData tests are only supposed to run in the main process.
# They currently time out on android.
skip-if = buildapp == 'b2g' || e10s || toolkit == 'android'
skip-if = buildapp != 'mulet'
[test_webapp_clearBrowserData_inproc_oop.html]
# The clearBrowserData tests are only supposed to run in the main process.
# They currently time out on android.
skip-if = buildapp == 'b2g' || e10s || toolkit == 'android'
skip-if = buildapp != 'mulet'
[test_webapp_clearBrowserData_oop_inproc.html]
# The clearBrowserData tests are only supposed to run in the main process.
# They currently time out on android.
skip-if = buildapp == 'b2g' || e10s || toolkit == 'android'
skip-if = buildapp != 'mulet'
[test_serviceworker.html]
skip-if = buildapp == 'b2g'
10 changes: 5 additions & 5 deletions dom/ipc/tests/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,35 @@ skip-if = toolkit == 'cocoa' # disabled due to hangs, see changeset 6852e7c47edf
[test_CrashService_crash.html]
skip-if = !(crashreporter && !e10s && (toolkit == 'gtk2' || toolkit == 'gtk3' || toolkit == 'cocoa' || toolkit == 'windows') && (buildapp != 'b2g' || toolkit == 'gonk') && (buildapp != 'mulet')) # TC: Bug 1144079 - Re-enable Mulet mochitests and reftests taskcluster-specific disables.
[test_permission_for_in_process_app.html]
skip-if = e10s || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
skip-if = e10s || (buildapp != 'b2g' && buildapp != 'mulet') || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files =
test_permission_helper.js
[test_permission_for_oop_app.html]
skip-if = buildapp == 'mulet' || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files =
file_app.sjs
file_app.template.webapp
test_permission_helper.js
test_permission_embed.html
test_permission_framescript.js
[test_permission_for_nested_oop_app.html]
skip-if = os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files =
file_app.sjs
file_app.template.webapp
test_permission_helper.js
test_permission_embed.html
test_permission_framescript.js
[test_permission_for_two_oop_apps.html]
skip-if = buildapp == 'mulet' || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files =
file_app.sjs
file_app.template.webapp
test_permission_helper.js
test_permission_embed.html
test_permission_framescript.js
[test_permission_when_oop_app_crashes.html]
skip-if = buildapp == 'mulet' || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
skip-if = buildapp != 'b2g' || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files =
file_app.sjs
file_app.template.webapp
Expand Down
2 changes: 1 addition & 1 deletion dom/media/test/crashtests/crashtests.list
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ load 1080986.html
load 1122218.html
load 1127188.html
load 1157994.html
load 1158427.html
skip-if(!B2G) load 1158427.html
load 1185176.html
load 1185192.html
load 1228484.html
Expand Down
4 changes: 3 additions & 1 deletion dom/messages/test/chrome.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = (buildapp != "browser") || e10s
skip-if = e10s
support-files =
file_hasPendingMessage.html
invalid_manifest.webapp
Expand All @@ -8,4 +8,6 @@ support-files =
manifest.webapp^headers^

[test_hasPendingMessage.html]
skip-if = buildapp != "browser"
[test_sysmsg_registration.html]
skip-if = buildapp != 'mulet'
1 change: 1 addition & 0 deletions dom/permission/tests/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(https not work
[test_tcp-socket.html]
[test_udp-socket.html]
[test_webapps-manage.html]
skip-if = buildapp != 'b2g' && buildapp != 'mulet'
[test_camera.html]
disabled = disabled until bug 859593 is fixed
[test_keyboard.html]
Expand Down
2 changes: 1 addition & 1 deletion dom/requestsync/tests/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ skip-if = os == "android" || toolkit == "gonk"
[test_basic.html]
skip-if = os == "android" || toolkit == "gonk"
[test_basic_app.html]
skip-if = os == "android" || buildapp == 'b2g' || e10s # mozapps
skip-if = buildapp != 'mulet' || e10s # mozapps
[test_wakeUp.html]
run-if = buildapp == 'b2g' && toolkit == 'gonk'
[test_runNow.html]
Expand Down
1 change: 1 addition & 0 deletions dom/security/test/csp/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ skip-if = buildapp == 'b2g' #no ssl support
[test_ignore_unsafe_inline.html]
[test_self_none_as_hostname_confusion.html]
[test_bug949549.html]
skip-if = buildapp != 'b2g' && buildapp != 'mulet'
[test_path_matching.html]
[test_path_matching_redirect.html]
[test_report_uri_missing_in_report_only_header.html]
Expand Down
2 changes: 1 addition & 1 deletion dom/tests/mochitest/fetch/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ skip-if = buildapp == 'b2g' # Bug 1137683
[test_headers_mainthread.html]
skip-if = (e10s && debug && os == 'win')
[test_fetch_app_protocol.html]
skip-if = (e10s && debug && os == 'win')
skip-if = (buildapp != 'b2g' && buildapp != 'mulet')
[test_fetch_basic.html]
skip-if = (e10s && debug && os == 'win')
[test_fetch_basic_sw_reroute.html]
Expand Down
2 changes: 2 additions & 0 deletions dom/tests/mochitest/localstorage/chrome.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ support-files =
page_blank.html

[test_app_uninstall.html]
skip-if = buildapp != 'mulet'
[test_clear_browser_data.html]
skip-if = buildapp != 'mulet'
[test_localStorageBasePrivateBrowsing_perwindowpb.html]
skip-if = true # bug 1156725
[test_localStorageFromChrome.xhtml]
Expand Down
2 changes: 1 addition & 1 deletion dom/tests/mochitest/localstorage/test_app_uninstall.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
setupStorage(gBrowserStorage.localStorage);
setupStorage(gBrowserStorage.sessionStorage);

navigator.mozApps.mgmt.getNotInstalled().onsuccess = function() {
navigator.mozApps.mgmt.getAll().onsuccess = function() {
for (i in this.result) {
var app = this.result[i];
if (app.manifestURL == gManifestURL) {
Expand Down
2 changes: 1 addition & 1 deletion dom/tests/mochitest/notification/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ support-files =
[test_notification_storage.html]
[test_bug931307.html]
[test_notification_resend.html]
skip-if = e10s # On e10s, faking the app seems to be failing
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
10 changes: 6 additions & 4 deletions dom/webidl/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ WEBIDL_FILES = [
'AnonymousContent.webidl',
'AppInfo.webidl',
'AppNotificationServiceOptions.webidl',
'Apps.webidl',
'APZTestData.webidl',
'ArchiveReader.webidl',
'ArchiveRequest.webidl',
Expand Down Expand Up @@ -673,7 +672,6 @@ WEBIDL_FILES += [
'DeviceStorageChangeEvent.webidl',
'DOMTransactionEvent.webidl',
'HashChangeEvent.webidl',
'MozApplicationEvent.webidl',
'MozSettingsEvent.webidl',
'PageTransitionEvent.webidl',
'PopStateEvent.webidl',
Expand Down Expand Up @@ -796,7 +794,6 @@ GENERATED_EVENTS_WEBIDL_FILES = [
'IccChangeEvent.webidl',
'ImageCaptureErrorEvent.webidl',
'MediaStreamEvent.webidl',
'MozApplicationEvent.webidl',
'MozCellBroadcastEvent.webidl',
'MozClirModeEvent.webidl',
'MozContactChangeEvent.webidl',
Expand Down Expand Up @@ -920,5 +917,10 @@ if CONFIG['MOZ_PAY']:

if CONFIG['MOZ_B2G']:
WEBIDL_FILES += [
'Identity.webidl'
'Apps.webidl',
'Identity.webidl',
'MozApplicationEvent.webidl'
]
GENERATED_EVENTS_WEBIDL_FILES += [
'MozApplicationEvent.webidl'
]
3 changes: 3 additions & 0 deletions extensions/cookie/test/chrome.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ skip-if = buildapp == 'b2g' || os == 'android'
support-files = channel_utils.js

[test_app_uninstall_cookies.html]
skip-if = buildapp != 'mulet'
[test_app_uninstall_permissions.html]
skip-if = buildapp != 'mulet'

[test_permissionmanager_app_isolation.html]
3 changes: 1 addition & 2 deletions extensions/cookie/test/test_app_uninstall_cookies.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@

gCurrentCookiesCount = getCookiesCount() - appCookiesCount;

// Not installed means not installed as native app.
navigator.mozApps.mgmt.getNotInstalled().onsuccess = function() {
navigator.mozApps.mgmt.getAll().onsuccess = function() {
for (i in this.result) {
var app = this.result[i];
if (app.manifestURL == gManifestURL) {
Expand Down
Loading

0 comments on commit a6aff18

Please sign in to comment.