From 76721b946755c62d0910c1c2bc3e4d0b4f958d1c Mon Sep 17 00:00:00 2001 From: Myk Melez Date: Mon, 8 Feb 2016 11:24:22 -0800 Subject: [PATCH] Bug 1238576 - disable mozApps API on desktop/Android; r=ehsan,ochameau,bz,mcmanus,jmaher,marco --- devtools/shared/apps/tests/mochitest.ini | 3 +-- dom/activities/tests/mochi/mochitest.ini | 2 +- dom/apps/tests/chrome.ini | 2 +- dom/apps/tests/mochitest.ini | 1 + .../test/test_navigator_resolve_identity.html | 7 ------- .../test_navigator_resolve_identity_xrays.xul | 5 ----- dom/bindings/test/test_bug707564-chrome.html | 8 ++++---- dom/bindings/test/test_bug707564.html | 8 ++++---- dom/broadcastchannel/tests/mochitest.ini | 4 ++-- dom/browser-element/mochitest/chrome.ini | 4 ++-- dom/browser-element/mochitest/mochitest-oop.ini | 5 +++-- dom/browser-element/mochitest/mochitest.ini | 8 ++++---- dom/cache/test/mochitest/mochitest.ini | 2 +- dom/datastore/tests/mochitest.ini | 2 +- dom/indexedDB/test/mochitest.ini | 6 +++--- dom/ipc/tests/mochitest.ini | 10 +++++----- dom/media/test/crashtests/crashtests.list | 2 +- dom/messages/test/chrome.ini | 4 +++- dom/permission/tests/mochitest.ini | 1 + dom/requestsync/tests/mochitest.ini | 2 +- dom/security/test/csp/mochitest.ini | 1 + dom/tests/mochitest/fetch/mochitest.ini | 2 +- dom/tests/mochitest/localstorage/chrome.ini | 2 ++ .../localstorage/test_app_uninstall.html | 2 +- dom/tests/mochitest/notification/mochitest.ini | 2 +- dom/webidl/moz.build | 10 ++++++---- extensions/cookie/test/chrome.ini | 3 +++ .../cookie/test/test_app_uninstall_cookies.html | 3 +-- .../test/test_app_uninstall_permissions.html | 16 ++++++++++------ js/xpconnect/tests/chrome/test_bug853283.xul | 2 +- netwerk/test/mochitests/mochitest.ini | 1 + .../mochitest/tests/Harness_sanity/mochitest.ini | 5 +++-- toolkit/webapps/tests/chrome.ini | 6 +++++- 33 files changed, 75 insertions(+), 66 deletions(-) diff --git a/devtools/shared/apps/tests/mochitest.ini b/devtools/shared/apps/tests/mochitest.ini index a4c35a147b4..1d9fdeb412d 100644 --- a/devtools/shared/apps/tests/mochitest.ini +++ b/devtools/shared/apps/tests/mochitest.ini @@ -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' diff --git a/dom/activities/tests/mochi/mochitest.ini b/dom/activities/tests/mochi/mochitest.ini index 6b9332fa2f8..affa4454b43 100644 --- a/dom/activities/tests/mochi/mochitest.ini +++ b/dom/activities/tests/mochi/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = e10s || os == 'android' +skip-if = (buildapp != 'b2g' && buildapp != 'mulet') support-files = common.js system.webapp diff --git a/dom/apps/tests/chrome.ini b/dom/apps/tests/chrome.ini index 9f5c41d411e..c04b6e255f9 100644 --- a/dom/apps/tests/chrome.ini +++ b/dom/apps/tests/chrome.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = buildapp == 'b2g' || os == 'android' +skip-if = buildapp != 'mulet' support-files = apps/* asmjs/* diff --git a/dom/apps/tests/mochitest.ini b/dom/apps/tests/mochitest.ini index e89bac61b93..88c5a53b51f 100644 --- a/dom/apps/tests/mochitest.ini +++ b/dom/apps/tests/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp != 'b2g' && buildapp != 'mulet' support-files = addons/application.zip addons/invalid.webapp diff --git a/dom/base/test/test_navigator_resolve_identity.html b/dom/base/test/test_navigator_resolve_identity.html index 3bfeaf1ce2c..882853525a2 100644 --- a/dom/base/test/test_navigator_resolve_identity.html +++ b/dom/base/test/test_navigator_resolve_identity.html @@ -19,13 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=985827 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"); - diff --git a/dom/base/test/test_navigator_resolve_identity_xrays.xul b/dom/base/test/test_navigator_resolve_identity_xrays.xul index d2b733ac306..41ff4591b42 100644 --- a/dom/base/test/test_navigator_resolve_identity_xrays.xul +++ b/dom/base/test/test_navigator_resolve_identity_xrays.xul @@ -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(); }); ]]> diff --git a/dom/bindings/test/test_bug707564-chrome.html b/dom/bindings/test/test_bug707564-chrome.html index cf5f8d78ff8..7e3185a2a9f 100644 --- a/dom/bindings/test/test_bug707564-chrome.html +++ b/dom/bindings/test/test_bug707564-chrome.html @@ -26,19 +26,19 @@ function test() 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(); } diff --git a/dom/bindings/test/test_bug707564.html b/dom/bindings/test/test_bug707564.html index 8b0f9068b0e..fb0929c633f 100644 --- a/dom/bindings/test/test_bug707564.html +++ b/dom/bindings/test/test_bug707564.html @@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=707564 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(); }); diff --git a/dom/broadcastchannel/tests/mochitest.ini b/dom/broadcastchannel/tests/mochitest.ini index 96c39e946f4..77419ee048e 100644 --- a/dom/broadcastchannel/tests/mochitest.ini +++ b/dom/broadcastchannel/tests/mochitest.ini @@ -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] diff --git a/dom/browser-element/mochitest/chrome.ini b/dom/browser-element/mochitest/chrome.ini index 3fad92ec314..d5372822e0b 100644 --- a/dom/browser-element/mochitest/chrome.ini +++ b/dom/browser-element/mochitest/chrome.ini @@ -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 @@ -15,4 +15,4 @@ support-files = [test_browserElement_MultipleAudioChannels.html] tags = audiochannel [test_browserElement_NotifyChannel.html] -tags = audiochannel \ No newline at end of file +tags = audiochannel diff --git a/dom/browser-element/mochitest/mochitest-oop.ini b/dom/browser-element/mochitest/mochitest-oop.ini index da2e110776c..9da72990082 100644 --- a/dom/browser-element/mochitest/mochitest-oop.ini +++ b/dom/browser-element/mochitest/mochitest-oop.ini @@ -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] @@ -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 diff --git a/dom/browser-element/mochitest/mochitest.ini b/dom/browser-element/mochitest/mochitest.ini index c14b2d211e1..44ae5490a8f 100644 --- a/dom/browser-element/mochitest/mochitest.ini +++ b/dom/browser-element/mochitest/mochitest.ini @@ -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 @@ -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] @@ -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 @@ -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] diff --git a/dom/cache/test/mochitest/mochitest.ini b/dom/cache/test/mochitest/mochitest.ini index 82566f2817c..620fd3d8354 100644 --- a/dom/cache/test/mochitest/mochitest.ini +++ b/dom/cache/test/mochitest/mochitest.ini @@ -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] diff --git a/dom/datastore/tests/mochitest.ini b/dom/datastore/tests/mochitest.ini index d403828f5bd..e8ee8effb3a 100644 --- a/dom/datastore/tests/mochitest.ini +++ b/dom/datastore/tests/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = e10s +skip-if = (buildapp != 'b2g' && buildapp != 'mulet') support-files = file_app_install.html file_readonly.html diff --git a/dom/indexedDB/test/mochitest.ini b/dom/indexedDB/test/mochitest.ini index b3ff606cf92..f941a93fc40 100644 --- a/dom/indexedDB/test/mochitest.ini +++ b/dom/indexedDB/test/mochitest.ini @@ -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' diff --git a/dom/ipc/tests/mochitest.ini b/dom/ipc/tests/mochitest.ini index 98d797a2a74..ec2f96f581b 100644 --- a/dom/ipc/tests/mochitest.ini +++ b/dom/ipc/tests/mochitest.ini @@ -22,11 +22,11 @@ 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 @@ -34,7 +34,7 @@ support-files = 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 @@ -42,7 +42,7 @@ support-files = 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 @@ -50,7 +50,7 @@ support-files = 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 diff --git a/dom/media/test/crashtests/crashtests.list b/dom/media/test/crashtests/crashtests.list index 48c3741005f..1c53739be48 100644 --- a/dom/media/test/crashtests/crashtests.list +++ b/dom/media/test/crashtests/crashtests.list @@ -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 diff --git a/dom/messages/test/chrome.ini b/dom/messages/test/chrome.ini index cf8cbd4ad9b..bdcc745bd51 100644 --- a/dom/messages/test/chrome.ini +++ b/dom/messages/test/chrome.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = (buildapp != "browser") || e10s +skip-if = e10s support-files = file_hasPendingMessage.html invalid_manifest.webapp @@ -8,4 +8,6 @@ support-files = manifest.webapp^headers^ [test_hasPendingMessage.html] +skip-if = buildapp != "browser" [test_sysmsg_registration.html] +skip-if = buildapp != 'mulet' diff --git a/dom/permission/tests/mochitest.ini b/dom/permission/tests/mochitest.ini index 75e1ea8b128..1147d870559 100644 --- a/dom/permission/tests/mochitest.ini +++ b/dom/permission/tests/mochitest.ini @@ -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] diff --git a/dom/requestsync/tests/mochitest.ini b/dom/requestsync/tests/mochitest.ini index 96f937990ea..1a3018f365a 100644 --- a/dom/requestsync/tests/mochitest.ini +++ b/dom/requestsync/tests/mochitest.ini @@ -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] diff --git a/dom/security/test/csp/mochitest.ini b/dom/security/test/csp/mochitest.ini index e6b8405b67e..f86bd6a9499 100644 --- a/dom/security/test/csp/mochitest.ini +++ b/dom/security/test/csp/mochitest.ini @@ -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] diff --git a/dom/tests/mochitest/fetch/mochitest.ini b/dom/tests/mochitest/fetch/mochitest.ini index d66390f27f9..cb26c9c1f35 100644 --- a/dom/tests/mochitest/fetch/mochitest.ini +++ b/dom/tests/mochitest/fetch/mochitest.ini @@ -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] diff --git a/dom/tests/mochitest/localstorage/chrome.ini b/dom/tests/mochitest/localstorage/chrome.ini index ff5ea129be3..24cd9889bb8 100644 --- a/dom/tests/mochitest/localstorage/chrome.ini +++ b/dom/tests/mochitest/localstorage/chrome.ini @@ -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] diff --git a/dom/tests/mochitest/localstorage/test_app_uninstall.html b/dom/tests/mochitest/localstorage/test_app_uninstall.html index 7db65bd73a5..ebd52f1e654 100644 --- a/dom/tests/mochitest/localstorage/test_app_uninstall.html +++ b/dom/tests/mochitest/localstorage/test_app_uninstall.html @@ -152,7 +152,7 @@ function browserLoadEvent() { 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) { diff --git a/dom/tests/mochitest/notification/mochitest.ini b/dom/tests/mochitest/notification/mochitest.ini index e568d803d29..1b5a18a25bd 100644 --- a/dom/tests/mochitest/notification/mochitest.ini +++ b/dom/tests/mochitest/notification/mochitest.ini @@ -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 diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build index 92e410cb19a..76dad44d079 100644 --- a/dom/webidl/moz.build +++ b/dom/webidl/moz.build @@ -29,7 +29,6 @@ WEBIDL_FILES = [ 'AnonymousContent.webidl', 'AppInfo.webidl', 'AppNotificationServiceOptions.webidl', - 'Apps.webidl', 'APZTestData.webidl', 'ArchiveReader.webidl', 'ArchiveRequest.webidl', @@ -673,7 +672,6 @@ WEBIDL_FILES += [ 'DeviceStorageChangeEvent.webidl', 'DOMTransactionEvent.webidl', 'HashChangeEvent.webidl', - 'MozApplicationEvent.webidl', 'MozSettingsEvent.webidl', 'PageTransitionEvent.webidl', 'PopStateEvent.webidl', @@ -796,7 +794,6 @@ GENERATED_EVENTS_WEBIDL_FILES = [ 'IccChangeEvent.webidl', 'ImageCaptureErrorEvent.webidl', 'MediaStreamEvent.webidl', - 'MozApplicationEvent.webidl', 'MozCellBroadcastEvent.webidl', 'MozClirModeEvent.webidl', 'MozContactChangeEvent.webidl', @@ -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' ] diff --git a/extensions/cookie/test/chrome.ini b/extensions/cookie/test/chrome.ini index 3f124485bdd..362cb483ef2 100644 --- a/extensions/cookie/test/chrome.ini +++ b/extensions/cookie/test/chrome.ini @@ -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] diff --git a/extensions/cookie/test/test_app_uninstall_cookies.html b/extensions/cookie/test/test_app_uninstall_cookies.html index f442b14fb81..493a6af47fd 100644 --- a/extensions/cookie/test/test_app_uninstall_cookies.html +++ b/extensions/cookie/test/test_app_uninstall_cookies.html @@ -151,8 +151,7 @@ function checkCookie() { 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) { diff --git a/extensions/cookie/test/test_app_uninstall_permissions.html b/extensions/cookie/test/test_app_uninstall_permissions.html index e990d69999f..cbccff8b1d3 100644 --- a/extensions/cookie/test/test_app_uninstall_permissions.html +++ b/extensions/cookie/test/test_app_uninstall_permissions.html @@ -60,12 +60,17 @@ SimpleTest.registerCleanupFunction(() => var gManifestURL = "http://www.example.com/chrome/dom/apps/tests/apps/basic.webapp"; +// Get the permission count before installing the app so we can compare it to +// the permission count after uninstalling the app. +var currentPermissionCount = getPermissionCountForApp(-1); + function onInstall() { var testAppId = appsService.getAppLocalIdByManifestURL(gManifestURL); - is(getPermissionCountForApp(testAppId), 0, "App should have no permission"); - - var currentPermissionCount = getPermissionCountForApp(-1); + // PermissionsManager.installPermissions gets run during the install process, + // and it adds the "indexedDB" permission by default, so the app should have + // that permission. + is(getPermissionCountForApp(testAppId), 1, "App should have 1 permission"); var attrs = {appId: testAppId}; var principal = secMan.createCodebasePrincipal(ioService.newURI("http://www.example.com", null, null), @@ -85,10 +90,9 @@ function onInstall() { attrs); permManager.addFromPrincipal(principal, "foobar", Ci.nsIPermissionManager.ALLOW_ACTION); - is(getPermissionCountForApp(testAppId), 5, "App should have 5 permissions"); + is(getPermissionCountForApp(testAppId), 6, "App should have 6 permissions"); - // 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) { diff --git a/js/xpconnect/tests/chrome/test_bug853283.xul b/js/xpconnect/tests/chrome/test_bug853283.xul index 8275809bd56..ac59ad9a771 100644 --- a/js/xpconnect/tests/chrome/test_bug853283.xul +++ b/js/xpconnect/tests/chrome/test_bug853283.xul @@ -30,7 +30,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=853283 var sb = new Cu.Sandbox(window); sb.iwin = iwin; sb.ok = ok; - Cu.evalInSandbox('try {iwin.navigator.mozApps; ok(true, "Didnt throw"); } catch (e) { ok(false, "Threw: " + e);}', sb); + Cu.evalInSandbox('try {iwin.navigator.mozContacts; ok(true, "Didnt throw"); } catch (e) { ok(false, "Threw: " + e);}', sb); SimpleTest.finish(); } diff --git a/netwerk/test/mochitests/mochitest.ini b/netwerk/test/mochitests/mochitest.ini index d7e984618ee..7747e528db5 100644 --- a/netwerk/test/mochitests/mochitest.ini +++ b/netwerk/test/mochitests/mochitest.ini @@ -34,6 +34,7 @@ skip-if = e10s || buildapp != 'browser' [test_signed_to_signed_web_packaged_app.html] skip-if = e10s || buildapp != 'browser' || os != 'linux' [test_web_packaged_app.html] +skip-if = buildapp != 'mulet' [test_loadinfo_redirectchain.html] skip-if = buildapp == 'b2g' #no ssl support [test_idn_redirect.html] diff --git a/testing/mochitest/tests/Harness_sanity/mochitest.ini b/testing/mochitest/tests/Harness_sanity/mochitest.ini index a450123deff..d6811353a62 100644 --- a/testing/mochitest/tests/Harness_sanity/mochitest.ini +++ b/testing/mochitest/tests/Harness_sanity/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = buildapp == 'mulet' || buildapp == 'b2g' +skip-if = buildapp == 'b2g' [test_TestsRunningAfterSimpleTestFinish.html] skip-if = true #depends on fix for bug 1048446 [test_add_task.html] @@ -19,6 +19,7 @@ support-files = file_SpecialPowersFrame1.html support-files = specialPowers_framescript.js [test_SpecialPowersPushAppPermissions.html] +skip-if = buildapp != 'mulet' support-files = file_app.sjs file_app.template.webapp @@ -33,7 +34,7 @@ skip-if = toolkit == 'android' || e10s #No test app installed [test_sanity_cleanup.html] [test_sanity_cleanup2.html] [test_sanityEventUtils.html] -skip-if = toolkit == 'android' #bug 688052 +skip-if = buildapp == 'mulet' || toolkit == 'android' #bug 688052 [test_sanitySimpletest.html] skip-if = toolkit == 'android' #bug 688052 [test_sanity_manifest.html] diff --git a/toolkit/webapps/tests/chrome.ini b/toolkit/webapps/tests/chrome.ini index f2c5a7002bf..a87a9bd72b9 100644 --- a/toolkit/webapps/tests/chrome.ini +++ b/toolkit/webapps/tests/chrome.ini @@ -1,5 +1,9 @@ [DEFAULT] -skip-if = buildapp == 'mulet' || buildapp == 'b2g' || os == 'android' || os == "mac" && os_version == "10.6" # see bug 993690 +# Disable these tests because this code depends on mozApps, which is no longer +# enabled on the platforms this code supports (desktop, Android), so this code +# is no longer used on any platform (and will be removed by bug 1245199). +#skip-if = buildapp == 'mulet' || buildapp == 'b2g' || os == 'android' || os == "mac" && os_version == "10.6" # see bug 993690 +skip-if = true support-files = head.js app.sjs