Bug 1242899 - consolidate mozApps tests into dom/apps/tests/ dir; r=marco

This commit is contained in:
Myk Melez 2016-01-31 15:04:46 -08:00
parent 9dc9d35b54
commit d52460d2e6
56 changed files with 46 additions and 56 deletions

View File

@ -1,14 +1,27 @@
[DEFAULT]
skip-if = buildapp == 'b2g' || os == 'android'
support-files =
apps/*
asmjs/*
common.js
cross_origin.html
file_bug_945152.html
file_bug_945152.sjs
head.js
install_and_redirect_helper.xul
[test_apps_service.xul]
[test_bug_765063.xul]
[test_bug_771294.xul]
[test_bug_945152.html]
skip-if = os != 'linux'
[test_cross_origin.xul]
[test_getNotInstalled.xul]
[test_install_app.xul]
[test_install_errors.xul]
[test_install_utf8.xul]
[test_launch_paths.xul]
[test_list_api.xul]
[test_manifest_helper.xul]
[test_operator_app_install.js]
[test_operator_app_install.xul]

View File

@ -1,7 +1,7 @@
SimpleTest.waitForExplicitFinish();
SpecialPowers.setAllAppsLaunchable(true);
var fileTestOnCurrentOrigin = 'http://example.org/tests/dom/tests/mochitest/webapps/file_bug_779982.html';
var fileTestOnCurrentOrigin = 'http://example.org/tests/dom/apps/tests/file_bug_779982.html';
var gData = [
// APP 1

View File

@ -5,7 +5,7 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script>
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/basic.webapp";
navigator.mozApps.install(url, null);
document.location = "about:blank";
</script>

View File

@ -10,6 +10,8 @@ support-files =
common.js
file_app.sjs
file_app.template.html
file_bug_779982.html
file_bug_779982.js
file_script.template.js
file_cached_app.template.appcache
file_cached_app.template.webapp
@ -43,6 +45,8 @@ skip-if = buildapp != 'mulet' # we need MOZ_B2G defined and the test to run in t
[test_app_enabled.html]
[test_app_update.html]
skip-if = os == "android" || toolkit == "gonk" || e10s # embed-apps doesn't work in mochitest app
[test_bug_779982.html]
skip-if = e10s || buildapp == 'b2g' || toolkit == 'android' #Bug 793211
[test_bug_795164.html]
[test_bug_1168300.html]
skip-if = toolkit == "gonk" || e10s # see bug 1175784

View File

@ -50,6 +50,6 @@ confirmNextPopup();
<!-- Load a page that initiates an app installation and then immediately
- redirects to a page at a different origin. We can't do this directly
- inside this test page, because that would cause the test to hang. -->
<iframe src="http://test/chrome/dom/tests/mochitest/webapps/install_and_redirect_helper.xul"/>
<iframe src="http://test/chrome/dom/apps/tests/install_and_redirect_helper.xul"/>
</window>

View File

@ -40,6 +40,6 @@ addEventListener("DOMContentLoaded", () => {
<!-- Load a page that initiates an app installation and then immediately
- redirects to a page at a different origin. We can't do this directly
- inside this test page, because that would cause the test to hang. -->
<iframe id="iframe" src="http://test/chrome/dom/tests/mochitest/webapps/install_and_redirect_helper.xul"/>
<iframe id="iframe" src="http://test/chrome/dom/apps/tests/install_and_redirect_helper.xul"/>
</window>

View File

@ -20,8 +20,8 @@
<script>
var url1 = "http://test1.example.com/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
var url2 = "http://test2.example.com/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
var url1 = "http://test1.example.com/chrome/dom/apps/tests/apps/basic.webapp";
var url2 = "http://test2.example.com/chrome/dom/apps/tests/apps/basic.webapp";
// References to the apps we install, so we can uninstall them afterward.
// Note that app2 is set by the helper page, which throws "TypeError: can't
@ -58,7 +58,7 @@ function installAppFromOwnOrigin(next) {
*/
function installAppFromOtherOrigin(next) {
document.getElementById("iframe").setAttribute("src",
"http://test2.example.com/chrome/dom/tests/mochitest/webapps/cross_origin.html");
"http://test2.example.com/chrome/dom/apps/tests/cross_origin.html");
window.addEventListener("message", function onMessage(event) {
if (event.data == "next") {

View File

@ -39,7 +39,7 @@ Cu.import("resource://gre/modules/Webapps.jsm");
// since then we can make this test install its own personal webapp from any
// origin.
//
let url = "http://example.com/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
let url = "http://example.com/chrome/dom/apps/tests/apps/basic.webapp";
let app, notInstalled, _isLaunchable;

View File

@ -21,7 +21,7 @@
<script>
<![CDATA[
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/basic.webapp";
var app;
var steps = [

View File

@ -49,7 +49,7 @@ function noArgs(next) {
}
function parseError(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/json_syntax_error.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/json_syntax_error.webapp";
navigator.mozApps.install(url, null).onerror = function onInstallError() {
is(this.error.name, "MANIFEST_PARSE_ERROR", "manifest with syntax error");
@ -58,7 +58,7 @@ function parseError(next) {
}
function invalidManifest(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/missing_required_field.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/missing_required_field.webapp";
navigator.mozApps.install(url, null).onerror = function onInstallError() {
is(this.error.name, "INVALID_MANIFEST", "manifest missing required field");
@ -67,7 +67,7 @@ function invalidManifest(next) {
}
function permissionDenied(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/no_delegated_install.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/no_delegated_install.webapp";
confirmNextPopup();
var request = navigator.mozApps.install(url, null);
@ -87,7 +87,7 @@ function permissionDenied(next) {
}
function invalidContent(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/bad_content_type.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/bad_content_type.webapp";
var request = navigator.mozApps.install(url, null);
@ -106,7 +106,7 @@ function invalidContent(next) {
}
function invalidLaunchPath(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/invalid_launch_path.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/invalid_launch_path.webapp";
navigator.mozApps.install(url, null).onerror = function onInstallError() {
is(this.error.name, "INVALID_MANIFEST", "Invalid Manifest");
@ -115,7 +115,7 @@ function invalidLaunchPath(next) {
}
function invalidLaunchPath2(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/invalid_launch_path2.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/invalid_launch_path2.webapp";
navigator.mozApps.install(url, null).onerror = function onInstallError() {
is(this.error.name, "INVALID_MANIFEST", "Invalid Manifest");
@ -124,7 +124,7 @@ function invalidLaunchPath2(next) {
}
function invalidEntryPoint(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/invalid_entry_point.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/invalid_entry_point.webapp";
navigator.mozApps.install(url, null).onerror = function onInstallError() {
is(this.error.name, "INVALID_MANIFEST", "manifest missing required field");
@ -133,7 +133,7 @@ function invalidEntryPoint(next) {
}
function invalidLocaleEntryPoint(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/invalid_locale_entry_point.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/invalid_locale_entry_point.webapp";
navigator.mozApps.install(url, null).onerror = function onInstallError() {
is(this.error.name, "INVALID_MANIFEST", "manifest missing required field");
@ -142,7 +142,7 @@ function invalidLocaleEntryPoint(next) {
}
function invalidActivityHref(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/invalid_activity_href.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/invalid_activity_href.webapp";
navigator.mozApps.install(url, null).onerror = function onInstallError() {
is(this.error.name, "INVALID_MANIFEST", "Manifest has non-relative URI for activity href");
@ -151,7 +151,7 @@ function invalidActivityHref(next) {
}
function invalidActivityHref2(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/invalid_activity_href2.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/invalid_activity_href2.webapp";
navigator.mozApps.install(url, null).onerror = function onInstallError() {
is(this.error.name, "INVALID_MANIFEST", "Manifest has data: URI for activity href");
@ -160,7 +160,7 @@ function invalidActivityHref2(next) {
}
function invalidMessage(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/invalid_message.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/invalid_message.webapp";
navigator.mozApps.install(url, null).onerror = function onInstallError() {
is(this.error.name, "INVALID_MANIFEST", "Manifest has absolute message href");
@ -197,7 +197,7 @@ function fileURL(next) {
}
function originNotAllowed(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/installs_allowed_from_example.com.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/installs_allowed_from_example.com.webapp";
var request = navigator.mozApps.install(url, null);
@ -216,7 +216,7 @@ function originNotAllowed(next) {
}
function originAllowed(next) {
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/installs_allowed_from_chrome_mochitests.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/installs_allowed_from_chrome_mochitests.webapp";
confirmNextPopup();
var request = navigator.mozApps.install(url, null);

View File

@ -20,7 +20,7 @@
SimpleTest.waitForExplicitFinish();
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/utf8.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/utf8.webapp";
confirmNextPopup();
navigator.mozApps.install(url, null).onsuccess = function onInstall() {

View File

@ -21,7 +21,7 @@
<script>
<![CDATA[
var url = "http://test/chrome/dom/tests/mochitest/webapps/apps/launch_paths.webapp";
var url = "http://test/chrome/dom/apps/tests/apps/launch_paths.webapp";
var app;
var steps = [

View File

@ -17,7 +17,7 @@
const csp = SpecialPowers.Cc["@mozilla.org/cspcontext;1"]
.createInstance(SpecialPowers.Ci.nsIContentSecurityPolicy);
const gManifestURL = "http://www.example.com/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
const gManifestURL = "http://www.example.com/chrome/dom/apps/tests/apps/basic.webapp";
SimpleTest.waitForExplicitFinish();
var app;

View File

@ -76,7 +76,7 @@ SimpleTest.registerCleanupFunction(() => {
});
// URL of the manifest of the app we want to install.
const gManifestURL = "http://www.example.com/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
const gManifestURL = "http://www.example.com/chrome/dom/apps/tests/apps/basic.webapp";
// ID of the installed app.
var gTestAppId = 0;
// Cookies currently in the system.

View File

@ -80,7 +80,7 @@ SimpleTest.registerCleanupFunction(() => {
SpecialPowers.setAllAppsLaunchable(true);
// URL of the manifest of the app we want to install.
const gManifestURL = "http://www.example.com/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
const gManifestURL = "http://www.example.com/chrome/dom/apps/tests/apps/basic.webapp";
// ID of the installed app.
var gTestAppId = 0;
// Cookies currently in the system.

View File

@ -1,17 +0,0 @@
[DEFAULT]
skip-if = buildapp == 'b2g' || os == 'android'
support-files =
cross_origin.html
head.js
install_and_redirect_helper.xul
apps/*
[test_bug_765063.xul]
[test_bug_771294.xul]
[test_cross_origin.xul]
[test_getNotInstalled.xul]
[test_install_app.xul]
[test_install_errors.xul]
[test_install_utf8.xul]
[test_launch_paths.xul]
[test_list_api.xul]

View File

@ -1,8 +0,0 @@
[DEFAULT]
skip-if = e10s
support-files =
file_bug_779982.html
file_bug_779982.js
[test_bug_779982.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' #Bug 793211

View File

@ -26,7 +26,6 @@ MOCHITEST_MANIFESTS += [
'mochitest/pointerlock/mochitest.ini',
'mochitest/sessionstorage/mochitest.ini',
'mochitest/storageevent/mochitest.ini',
'mochitest/webapps/mochitest.ini',
'mochitest/webcomponents/mochitest.ini',
'mochitest/whatwg/mochitest.ini',
]
@ -37,7 +36,6 @@ MOCHITEST_CHROME_MANIFESTS += [
'mochitest/general/chrome.ini',
'mochitest/localstorage/chrome.ini',
'mochitest/sessionstorage/chrome.ini',
'mochitest/webapps/chrome.ini',
'mochitest/whatwg/chrome.ini',
]

View File

@ -125,7 +125,7 @@ SimpleTest.registerCleanupFunction(() =>
Ci.nsIPermissionManager.ALLOW_ACTION)
);
var gManifestURL = "http://www.example.com/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
var gManifestURL = "http://www.example.com/chrome/dom/apps/tests/apps/basic.webapp";
var gTestAppId = 0;
var gCurrentCookiesCount = 0;

View File

@ -58,7 +58,7 @@ SimpleTest.registerCleanupFunction(() =>
Ci.nsIPermissionManager.ALLOW_ACTION)
);
var gManifestURL = "http://www.example.com/chrome/dom/tests/mochitest/webapps/apps/basic.webapp";
var gManifestURL = "http://www.example.com/chrome/dom/apps/tests/apps/basic.webapp";
function onInstall() {
var testAppId = appsService.getAppLocalIdByManifestURL(gManifestURL);