mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 2996cc51cb0d (bug 1000305)
This commit is contained in:
parent
f323259db7
commit
9b1c3fc188
@ -1,19 +1,13 @@
|
||||
{
|
||||
"name": "My W3C Web App",
|
||||
"short_name": "My App",
|
||||
"icons": {
|
||||
"15": "/tests/dom/apps/tests/icon15.png",
|
||||
"48": "/tests/dom/apps/tests/icon48.png"
|
||||
},
|
||||
"start_url": "/index.html",
|
||||
"display": "standalone",
|
||||
"entry_points": {
|
||||
"ep1": {
|
||||
"name": "This is an entry point",
|
||||
"icons": {
|
||||
"15": "/tests/dom/apps/tests/icon15alternate.png",
|
||||
"48": "/tests/dom/apps/tests/icon48.png"
|
||||
}
|
||||
"icons": [
|
||||
{
|
||||
"src": "/favicon.ico",
|
||||
"sizes": "64x64",
|
||||
"type": "image/png"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"start_url": "/index.html",
|
||||
"display": "standalone"
|
||||
}
|
@ -17,13 +17,6 @@ var gAppName = "appname";
|
||||
var gDevName = "devname";
|
||||
var gDevUrl = "http://dev.url";
|
||||
|
||||
var gIconData =
|
||||
"iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABGdBTUEAANbY1E9YMgAAABl0RVh0" +
|
||||
"U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAA5UExURbVCQs6UlM6EhJwhIa0hIc5zc5wQ" +
|
||||
"EL1SUu/W1rVjY6UQELUAAOfGxue1tZwAAIwAAP///3sAAK0AAOytg2MAAABmSURBVHjabIkLEsJA" +
|
||||
"CEOz249aIUDvf1ihVWe208ADQvDeh8I+6s7zSw0wJ6vPA5z7o+u8LbrUD4SXnkln5XSHJnAhDWau" +
|
||||
"tia1jeXlz7SeeRy5TC6wkBaWhLZoL4RF9Q/EqKv/CDAAFpEM3avxBREAAAAASUVORK5CYII=";
|
||||
|
||||
function handleRequest(request, response) {
|
||||
var query = getQuery(request);
|
||||
|
||||
@ -94,9 +87,6 @@ function handleRequest(request, response) {
|
||||
appName, devName, devUrl);
|
||||
addZipEntry(zipWriter, app, "index.html");
|
||||
|
||||
var iconString = atob(gIconData);
|
||||
addZipEntry(zipWriter, iconString, "icon.png");
|
||||
|
||||
zipWriter.close();
|
||||
}
|
||||
|
||||
|
@ -12,9 +12,6 @@
|
||||
"downloads": {}
|
||||
},
|
||||
"launch_path": "tests/dom/apps/tests/file_packaged_app.sjs",
|
||||
"icons": {
|
||||
"15": "icon.png"
|
||||
},
|
||||
"developer": {
|
||||
"name": "DEVELOPERTOKEN",
|
||||
"url": "DEVELOPERURLTOKEN"
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 281 B |
Binary file not shown.
Before Width: | Height: | Size: 224 B |
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB |
@ -28,9 +28,6 @@ support-files =
|
||||
test_packaged_app_common.js
|
||||
marketplace/*
|
||||
pkg_install_iframe.html
|
||||
icon15.png
|
||||
icon15alternate.png
|
||||
icon48.png
|
||||
|
||||
[test_app_addons.html]
|
||||
skip-if = os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
|
||||
|
@ -76,15 +76,6 @@ function checkInstalledApp(aMiniManifestURL,
|
||||
};
|
||||
}
|
||||
|
||||
var gIconData =
|
||||
"iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABGdBTUEAANbY1E9YMgAAABl0RVh0" +
|
||||
"U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAA5UExURbVCQs6UlM6EhJwhIa0hIc5zc5wQ" +
|
||||
"EL1SUu/W1rVjY6UQELUAAOfGxue1tZwAAIwAAP///3sAAK0AAOytg2MAAABmSURBVHjabIkLEsJA" +
|
||||
"CEOz249aIUDvf1ihVWe208ADQvDeh8I+6s7zSw0wJ6vPA5z7o+u8LbrUD4SXnkln5XSHJnAhDWau" +
|
||||
"tia1jeXlz7SeeRy5TC6wkBaWhLZoL4RF9Q/EqKv/CDAAFpEM3avxBREAAAAASUVORK5CYII=";
|
||||
|
||||
var gIconSize = 15;
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.requestFlakyTimeout("untriaged");
|
||||
|
||||
@ -204,7 +195,6 @@ var steps = [
|
||||
info("== TEST == Install packaged app");
|
||||
var miniManifestURL = PackagedTestHelper.gSJS +
|
||||
"?getManifest=true";
|
||||
|
||||
navigator.mozApps.mgmt.oninstall = function(evt) {
|
||||
info("Got oninstall event");
|
||||
PackagedTestHelper.gApp = evt.application;
|
||||
@ -241,25 +231,6 @@ var steps = [
|
||||
function() {
|
||||
PackagedTestHelper.setAppVersion(3, PackagedTestHelper.next, false, true);
|
||||
},
|
||||
function() {
|
||||
info("== TEST == Get icon");
|
||||
var app = PackagedTestHelper.gApp;
|
||||
|
||||
navigator.mozApps.mgmt.getIcon(app, gIconSize).then((blob) => {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onloadend = function() {
|
||||
var success = btoa(reader.result) == gIconData;
|
||||
ok(success, "== TEST == Icon matches expected icon");
|
||||
PackagedTestHelper.next();
|
||||
}
|
||||
|
||||
reader.readAsBinaryString(blob);
|
||||
}, (err) => {
|
||||
ok(false, "Can't get icon: " + err);
|
||||
PackagedTestHelper.finish();
|
||||
});
|
||||
},
|
||||
function() {
|
||||
info("== TEST == Install packaged app with a cancel/resume");
|
||||
var miniManifestURL = PackagedTestHelper.gSJS +
|
||||
|
@ -19,19 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id={1075716}
|
||||
<pre id="test">
|
||||
<script class="testbody" type="application/javascript;version=1.7">
|
||||
|
||||
var gIconData =
|
||||
"iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABGdBTUEAANbY1E9YMgAAABl0RVh0" +
|
||||
"U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAA5UExURbVCQs6UlM6EhJwhIa0hIc5zc5wQ" +
|
||||
"EL1SUu/W1rVjY6UQELUAAOfGxue1tZwAAIwAAP///3sAAK0AAOytg2MAAABmSURBVHjabIkLEsJA" +
|
||||
"CEOz249aIUDvf1ihVWe208ADQvDeh8I+6s7zSw0wJ6vPA5z7o+u8LbrUD4SXnkln5XSHJnAhDWau" +
|
||||
"tia1jeXlz7SeeRy5TC6wkBaWhLZoL4RF9Q/EqKv/CDAAFpEM3avxBREAAAAASUVORK5CYII=";
|
||||
|
||||
var gAlternateIconData =
|
||||
"iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAIAAAC0tAIdAAAAp0lEQVQoFWNklZ3AQDRgIlolSOFQ" +
|
||||
"Vc0C8eWvR/nI3n1544a4hgZEZG9nm+dUbggbxZcLfFxv79wGlAAqBbKBCMhWcnCCKAWSULOBLKC6" +
|
||||
"W9ePPM+/VHnjJYQNUfTnwzu4aoTZLAJCQNHPvz8BSQgbogiFDdcHMePD779AEWTzIAqAHrt/8gTU" +
|
||||
"JUDWs/sPgEoFWJnhbKA6oJOA4kDGwRnTHl88zzho0gkAc2hLRzn46hoAAAAASUVORK5CYII=";
|
||||
|
||||
var gGenerator = runTest();
|
||||
|
||||
function go() {
|
||||
@ -58,20 +45,6 @@ function cbError(aEvent) {
|
||||
finish();
|
||||
}
|
||||
|
||||
function iconTest(app, iconSize, entryPoint, testFunction) {
|
||||
navigator.mozApps.mgmt.getIcon(app, iconSize, entryPoint).then((blob) => {
|
||||
var reader = new FileReader();
|
||||
reader.onloadend = function() {
|
||||
testFunction(reader.result);
|
||||
continueTest();
|
||||
}
|
||||
reader.readAsBinaryString(blob);
|
||||
}, (err) => {
|
||||
ok(false, "Couldn't get icon.");
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
/**
|
||||
@ -104,30 +77,6 @@ function runTest() {
|
||||
ok(app, "App is non-null");
|
||||
is(app.manifestURL, manifestURL, "App manifest url is correct.");
|
||||
|
||||
info("Fetching 15x15 icon");
|
||||
iconTest(app, 15, undefined, (iconData) => {
|
||||
is(btoa(iconData), gIconData, "Fetches 15x15 icon successfully.")
|
||||
});
|
||||
yield undefined;
|
||||
|
||||
info("Fetching 48x48 icon");
|
||||
iconTest(app, 48, "ep1", (iconData) => {
|
||||
ok(iconData.length == 4762, "Fetches 48x48 icon successfully.")
|
||||
});
|
||||
yield undefined;
|
||||
|
||||
info("Fetching 30x30 icon");
|
||||
iconTest(app, 30, undefined, (iconData) => {
|
||||
is(btoa(iconData), gIconData, "Fetches 15x15 icon as best fit for 30x30.")
|
||||
});
|
||||
yield undefined;
|
||||
|
||||
info("Fetching entry-point icon");
|
||||
iconTest(app, 15, "ep1", (iconData) => {
|
||||
is(btoa(iconData), gAlternateIconData, "Entry-point Icon fetched successfully.")
|
||||
});
|
||||
yield undefined;
|
||||
|
||||
request = navigator.mozApps.mgmt.uninstall(app);
|
||||
request.onerror = cbError;
|
||||
request.onsuccess = continueTest;
|
||||
|
@ -40,7 +40,6 @@ var mgmtProps = {
|
||||
dispatchEvent: "function",
|
||||
getEventHandler: "function",
|
||||
getAll: "function",
|
||||
getIcon: "function",
|
||||
getNotInstalled: "function",
|
||||
uninstall: "function",
|
||||
oninstall: "object",
|
||||
|
@ -2741,8 +2741,6 @@ ServerHandler.prototype =
|
||||
var sis = new ScriptableInputStream(fis);
|
||||
var s = Cu.Sandbox(gGlobalObject);
|
||||
s.importFunction(dump, "dump");
|
||||
s.importFunction(atob, "atob");
|
||||
s.importFunction(btoa, "btoa");
|
||||
|
||||
// Define a basic key-value state-preservation API across requests, with
|
||||
// keys initially corresponding to the empty string.
|
||||
|
Loading…
Reference in New Issue
Block a user