diff --git a/caps/tests/mochitest/mochitest.ini b/caps/tests/mochitest/mochitest.ini index 866553ea26..666a735ae7 100644 --- a/caps/tests/mochitest/mochitest.ini +++ b/caps/tests/mochitest/mochitest.ini @@ -4,7 +4,6 @@ support-files = file_disableScript.html !/js/xpconnect/tests/mochitest/file_empty.html -[test_app_principal_equality.html] [test_bug246699.html] [test_bug292789.html] [test_bug423375.html] diff --git a/caps/tests/mochitest/test_app_principal_equality.html b/caps/tests/mochitest/test_app_principal_equality.html deleted file mode 100644 index f59f1f7893..0000000000 --- a/caps/tests/mochitest/test_app_principal_equality.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - Test app principal's equality - - - - -Mozilla Bug 777467 -

- - -
-
-
- - diff --git a/dom/browser-element/mochitest/browserElement_SetInputMethodActive.js b/dom/browser-element/mochitest/browserElement_SetInputMethodActive.js index 2b94f5cda4..57160137d3 100644 --- a/dom/browser-element/mochitest/browserElement_SetInputMethodActive.js +++ b/dom/browser-element/mochitest/browserElement_SetInputMethodActive.js @@ -8,27 +8,6 @@ SimpleTest.waitForExplicitFinish(); browserElementTestHelpers.setEnabledPref(true); -// 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 = - currentAppId !== SpecialPowers.Ci.nsIScriptSecurityManager.NO_APP_ID; -// We will also need the manifest URL and set it on iframes. -var currentAppManifestURL; - -if (inApp) { - let appsService = SpecialPowers.Cc["@mozilla.org/AppsService;1"] - .getService(SpecialPowers.Ci.nsIAppsService); - - currentAppManifestURL = appsService.getManifestURLByLocalId(currentAppId); -}; - -info('appId=' + currentAppId); -info('manifestURL=' + currentAppManifestURL); - function setup() { let appInfo = SpecialPowers.Cc['@mozilla.org/xre/app-info;1'] .getService(SpecialPowers.Ci.nsIXULAppInfo); @@ -73,9 +52,6 @@ function createFrames() { 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.addEventListener('mozbrowserloadend', countLoadend); frame.src = 'file_empty.html#' + i; document.body.appendChild(frame); @@ -88,20 +64,10 @@ function setPermissions() { allow: true, context: { url: SimpleTest.getTestFileURL('/file_empty.html'), - originAttributes: { - appId: currentAppId, - inIsolatedMozBrowser: true - } + originAttributes: {} } }]; - if (inApp) { - // The current document would also need to be given access for IPC to - // recognize our permission (why)? - permissions.push({ - type: 'input', allow: true, context: document }); - } - SpecialPowers.pushPermissions(permissions, SimpleTest.waitForFocus.bind(SimpleTest, startTest)); } diff --git a/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html b/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html index c37a642e2d..de3aab37e9 100644 --- a/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html +++ b/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html @@ -20,7 +20,6 @@ // set 'remote' to true here will make the the iframe remote in _inproc_ // test and in-process in _oop_ test. iframe.setAttribute('remote', 'true'); - iframe.setAttribute('mozapp', 'http://example.org/manifest.webapp'); iframe.addEventListener('mozbrowserloadend', function(e) { ok("mute" in iframe, "iframe.mute exists"); diff --git a/dom/indexedDB/test/file_app_isolation.html b/dom/indexedDB/test/file_app_isolation.html deleted file mode 100644 index 0ff74e6897..0000000000 --- a/dom/indexedDB/test/file_app_isolation.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - foobar! - - - diff --git a/dom/indexedDB/test/file_app_isolation.js b/dom/indexedDB/test/file_app_isolation.js deleted file mode 100644 index d6ed3fab44..0000000000 --- a/dom/indexedDB/test/file_app_isolation.js +++ /dev/null @@ -1,161 +0,0 @@ -SimpleTest.waitForExplicitFinish(); - -var fileTestOnCurrentOrigin = (location.protocol + '//' + location.host + location.pathname) - .replace('test_', 'file_') - .replace('_inproc', '').replace('_oop', ''); - -var previousPrefs = { - mozBrowserFramesEnabled: undefined, - oop_by_default: undefined, -}; - -try { - previousPrefs.mozBrowserFramesEnabled = SpecialPowers.getBoolPref('dom.mozBrowserFramesEnabled'); -} catch(e) -{ -} - -try { - previousPrefs.oop_by_default = SpecialPowers.getBoolPref('dom.ipc.browser_frames.oop_by_default'); -} catch(e) { -} - -SpecialPowers.setBoolPref('dom.mozBrowserFramesEnabled', true); -SpecialPowers.setBoolPref("dom.ipc.browser_frames.oop_by_default", location.pathname.indexOf('_inproc') == -1); - -SpecialPowers.addPermission("browser", true, window.document); - -var gData = [ - // APP 1 - { - app: 'http://example.org/manifest.webapp', - action: 'read-no', - src: fileTestOnCurrentOrigin, - }, - { - app: 'http://example.org/manifest.webapp', - action: 'write', - src: fileTestOnCurrentOrigin, - }, - { - app: 'http://example.org/manifest.webapp', - action: 'read-yes', - src: fileTestOnCurrentOrigin, - }, - // APP 2 - { - app: 'https://example.com/manifest.webapp', - action: 'read-no', - src: fileTestOnCurrentOrigin, - }, - { - app: 'https://example.com/manifest.webapp', - action: 'write', - src: fileTestOnCurrentOrigin, - }, - { - app: 'https://example.com/manifest.webapp', - action: 'read-yes', - src: fileTestOnCurrentOrigin, - }, - // Browser - { - browser: true, - action: 'read-no', - src: fileTestOnCurrentOrigin, - }, - { - browser: true, - action: 'write', - src: fileTestOnCurrentOrigin, - }, - { - browser: true, - action: 'read-yes', - src: fileTestOnCurrentOrigin, - }, -]; - -function runTest() { - for (var i in gData) { - var iframe = document.createElement('iframe'); - var data = gData[i]; - - if (data.app) { - iframe.setAttribute('mozbrowser', ''); - iframe.setAttribute('mozapp', data.app); - } else if (data.browser) { - iframe.setAttribute('mozbrowser', ''); - } - - if (data.app || data.browser) { - iframe.addEventListener('mozbrowsershowmodalprompt', function(e) { - is(e.detail.message, 'success', 'test number ' + i); - -// document.getElementById('content').removeChild(iframe); - - i++; - if (i >= gData.length) { - if (previousPrefs.mozBrowserFramesEnabled !== undefined) { - SpecialPowers.setBoolPref('dom.mozBrowserFramesEnabled', previousPrefs.mozBrowserFramesEnabled); - } - if (previousPrefs.oop_by_default !== undefined) { - SpecialPowers.setBoolPref("dom.ipc.browser_frames.oop_by_default", previousPrefs.oop_by_default); - } - - SpecialPowers.removePermission("browser", window.document); - - indexedDB.deleteDatabase('AppIsolationTest').onsuccess = function() { - SimpleTest.finish(); - }; - } else { - gTestRunner.next(); - } - }); - } - - iframe.src = data.src + '?' + data.action; - - document.getElementById('content').appendChild(iframe); - - yield undefined; - } -} - -var gTestRunner = runTest(); - -function startTest() { - var request = window.indexedDB.open('AppIsolationTest'); - var created = false; - - request.onupgradeneeded = function(event) { - created = true; - var db = event.target.result; - var data = [ - { id: "0", name: "foo" }, - ]; - var objectStore = db.createObjectStore("test", { keyPath: "id" }); - for (var i in data) { - objectStore.add(data[i]); - } - } - - request.onsuccess = function(event) { - var db = event.target.result; - is(created, true, "we should have created the db"); - - db.transaction("test").objectStore("test").get("0").onsuccess = function(event) { - is(event.target.result.name, 'foo', 'data have been written'); - db.close(); - - gTestRunner.next(); - }; - } -} - -// TODO: remove unsetting network.disable.ipc.security as part of bug 820712 -SpecialPowers.pushPrefEnv({ - "set": [ - ["network.disable.ipc.security", true], - ] -}, startTest); diff --git a/dom/indexedDB/test/mochitest.ini b/dom/indexedDB/test/mochitest.ini index ca65ea8b60..77b66bf057 100644 --- a/dom/indexedDB/test/mochitest.ini +++ b/dom/indexedDB/test/mochitest.ini @@ -11,8 +11,6 @@ support-files = event_propagation_iframe.html exceptions_in_events_iframe.html file.js - file_app_isolation.html - file_app_isolation.js helpers.js leaving_page_iframe.html service_worker.js @@ -125,12 +123,6 @@ support-files = [test_add_put.html] [test_add_twice_failure.html] [test_advance.html] -[test_app_isolation_inproc.html] -# The app isolation tests are only supposed to run in the main process. -skip-if = e10s -[test_app_isolation_oop.html] -# The app isolation tests are only supposed to run in the main process. -skip-if = e10s [test_autoIncrement.html] [test_autoIncrement_indexes.html] [test_bfcache.html] diff --git a/dom/indexedDB/test/test_app_isolation_inproc.html b/dom/indexedDB/test/test_app_isolation_inproc.html deleted file mode 100644 index 571189877f..0000000000 --- a/dom/indexedDB/test/test_app_isolation_inproc.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Test for IndexedDB app isolation (unique process) - - - - -Mozilla Bug 756645 - -
-
-
- - diff --git a/dom/indexedDB/test/test_app_isolation_oop.html b/dom/indexedDB/test/test_app_isolation_oop.html deleted file mode 100644 index 571189877f..0000000000 --- a/dom/indexedDB/test/test_app_isolation_oop.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Test for IndexedDB app isolation (unique process) - - - - -Mozilla Bug 756645 - -
-
-
- - diff --git a/dom/permission/tests/test_embed-apps.html b/dom/permission/tests/test_embed-apps.html deleted file mode 100644 index 69d4725c79..0000000000 --- a/dom/permission/tests/test_embed-apps.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - Test for Bug 815105 - - - - -Mozilla Bug 815105 -

- -
-
-
-
- - - diff --git a/layout/tools/reftest/reftest.jsm b/layout/tools/reftest/reftest.jsm index cd2e02f27d..c013d3e1b2 100644 --- a/layout/tools/reftest/reftest.jsm +++ b/layout/tools/reftest/reftest.jsm @@ -1,4 +1,4 @@ -/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- / +/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */ /* 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/. */ @@ -291,7 +291,6 @@ this.OnRefTestLoad = function OnRefTestLoad(win) if (gBrowserIsIframe) { gBrowser = gContainingWindow.document.createElementNS(XHTML_NS, "iframe"); gBrowser.setAttribute("mozbrowser", ""); - gBrowser.setAttribute("mozapp", prefs.getCharPref("b2g.system_manifest_url")); } else { gBrowser = gContainingWindow.document.createElementNS(XUL_NS, "xul:browser"); } diff --git a/netwerk/test/unit_ipc/child_app_offline_notifications.js b/netwerk/test/unit_ipc/child_app_offline_notifications.js deleted file mode 100644 index 870c22b397..0000000000 --- a/netwerk/test/unit_ipc/child_app_offline_notifications.js +++ /dev/null @@ -1,43 +0,0 @@ -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -function is_app_offline(appId) { - let ioservice = Cc['@mozilla.org/network/io-service;1']. - getService(Ci.nsIIOService); - return ioservice.isAppOffline(appId); -} - -var events_observed_no = 0; - -// Holds the last observed app-offline event -var info = null; -function observer(aSubject, aTopic, aData) { - events_observed_no++; - info = aSubject.QueryInterface(Ci.nsIAppOfflineInfo); - dump("ChildObserver - subject: {" + aSubject.appId + ", " + aSubject.mode + "} "); -} - -// Add observer for the app-offline notification -function run_test() { - Services.obs.addObserver(observer, "network:app-offline-status-changed", false); -} - -// Chech that the app has the proper offline status -function check_status(appId, status) -{ - do_check_eq(is_app_offline(appId), status == Ci.nsIAppOfflineInfo.OFFLINE); -} - -// Check that the app has the proper offline status -// and that the correct notification has been received -function check_notification_and_status(appId, status) { - do_check_eq(info.appId, appId); - do_check_eq(info.mode, status); - do_check_eq(is_app_offline(appId), status == Ci.nsIAppOfflineInfo.OFFLINE); -} - -// Remove the observer from the child process -function finished() { - Services.obs.removeObserver(observer, "network:app-offline-status-changed"); - do_check_eq(events_observed_no, 2); -} diff --git a/testing/mochitest/manifest.webapp b/testing/mochitest/manifest.webapp index a3c2e2592b..a1c03e257b 100644 --- a/testing/mochitest/manifest.webapp +++ b/testing/mochitest/manifest.webapp @@ -24,7 +24,6 @@ "desktop-notification":{}, "idle":{}, "network-events":{}, - "embed-apps":{}, "audio-channel-content":{}, "audio-channel-alarm":{}, "before-after-keyboard-event":{}