Backed out changeset 2996cc51cb0d (bug 1000305)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 19 Dec 2014 10:47:41 +0100
changeset 220570 82281e62437900a64af1749ffe8afcd73fe29f7b
parent 220569 6bd00fa70b0055899404b1607121488b19f6032a
child 220571 84b9872f54c7271f9c05212bff86332b3413c458
push id27990
push userryanvm@gmail.com
push dateFri, 19 Dec 2014 20:08:22 +0000
treeherdermozilla-central@8880b5632e2b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1000305
milestone37.0a1
backs out2996cc51cb0dcae8c4c42d9bb761f86085b97d84
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 2996cc51cb0d (bug 1000305)
dom/apps/tests/file_manifest.json
dom/apps/tests/file_packaged_app.sjs
dom/apps/tests/file_packaged_app.template.webapp
dom/apps/tests/icon15.png
dom/apps/tests/icon15alternate.png
dom/apps/tests/icon48.png
dom/apps/tests/mochitest.ini
dom/apps/tests/test_packaged_app_install.html
dom/apps/tests/test_web_app_install.html
dom/tests/mochitest/webapps/test_list_api.xul
netwerk/test/httpserver/httpd.js
--- a/dom/apps/tests/file_manifest.json
+++ b/dom/apps/tests/file_manifest.json
@@ -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"
-  },
+  "icons": [
+    {
+      "src": "/favicon.ico",
+      "sizes": "64x64",
+      "type": "image/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"
-      }
-    }
-  }
-}
+  "display": "standalone"
+}
\ No newline at end of file
--- a/dom/apps/tests/file_packaged_app.sjs
+++ b/dom/apps/tests/file_packaged_app.sjs
@@ -12,23 +12,16 @@ Cu.import("resource://gre/modules/NetUti
 
 var gBasePath = "tests/dom/apps/tests/";
 var gMiniManifestTemplate = "file_packaged_app.template.webapp";
 var gAppTemplate = "file_packaged_app.template.html";
 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);
 
   var packageSize = ("packageSize" in query) ? query.packageSize : 0;
   var appName = ("appName" in query) ? query.appName : gAppName;
   var devName = ("devName" in query) ? query.devName : gDevName;
   var devUrl = ("devUrl" in query) ? query.devUrl : gDevUrl;
   // allowCancel just means deliver the file slowly so we have time to cancel it
@@ -89,19 +82,16 @@ function handleRequest(request, response
         addZipEntry(zipWriter, manifest, "manifest.webapp");
       }
 
       var appTemplate = gBasePath + gAppTemplate;
       var app = makeResource(appTemplate, version, packagePath, packageSize,
                              appName, devName, devUrl);
       addZipEntry(zipWriter, app, "index.html");
 
-      var iconString = atob(gIconData);
-      addZipEntry(zipWriter, iconString, "icon.png");
-
       zipWriter.close();
     }
 
     response.setHeader("Content-Type", "text/html", false);
     response.write("OK");
     return;
   }
 
--- a/dom/apps/tests/file_packaged_app.template.webapp
+++ b/dom/apps/tests/file_packaged_app.template.webapp
@@ -7,18 +7,15 @@
   "permissions": {
      "geolocation": {},
      "audio-capture": {},
      "video-capture": {},
      "test-permission": {"access": "readonly"},
      "downloads": {}
    },
   "launch_path": "tests/dom/apps/tests/file_packaged_app.sjs",
-  "icons": {
-    "15": "icon.png"
-  },
   "developer": {
     "name": "DEVELOPERTOKEN",
     "url": "DEVELOPERURLTOKEN"
   },
   "default_locale": "en-US",
   "role": "ROLETOKEN"
 }
deleted file mode 100644
index f752986b7e13a7a2f6eba78c031245d6d5619883..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index a85552b240fbde0ace475e0727267e611f8bb8ec..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c4307fc8418436bb6b2fd3a6afc702c2db28aa77..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/dom/apps/tests/mochitest.ini
+++ b/dom/apps/tests/mochitest.ini
@@ -23,19 +23,16 @@ support-files =
   file_widget_app.template.html
   file_test_widget.js
   signed_app.sjs
   signed_app_template.webapp
   signed/*
   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
 [test_app_enabled.html]
 [test_app_update.html]
 skip-if = os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
 [test_bug_795164.html]
 [test_import_export.html]
--- a/dom/apps/tests/test_packaged_app_install.html
+++ b/dom/apps/tests/test_packaged_app_install.html
@@ -71,25 +71,16 @@ function checkInstalledApp(aMiniManifest
       PackagedTestHelper.finish();
     }
 
     PackagedTestHelper.checkAppState(evt.application, aVersion, aExpectedApp,
                                      aLaunchable, false, aCb);
   };
 }
 
-var gIconData =
-"iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABGdBTUEAANbY1E9YMgAAABl0RVh0" +
-"U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAA5UExURbVCQs6UlM6EhJwhIa0hIc5zc5wQ" +
-"EL1SUu/W1rVjY6UQELUAAOfGxue1tZwAAIwAAP///3sAAK0AAOytg2MAAABmSURBVHjabIkLEsJA" +
-"CEOz249aIUDvf1ihVWe208ADQvDeh8I+6s7zSw0wJ6vPA5z7o+u8LbrUD4SXnkln5XSHJnAhDWau" +
-"tia1jeXlz7SeeRy5TC6wkBaWhLZoL4RF9Q/EqKv/CDAAFpEM3avxBREAAAAASUVORK5CYII=";
-
-var gIconSize = 15;
-
 SimpleTest.waitForExplicitFinish();
 SimpleTest.requestFlakyTimeout("untriaged");
 
 var steps = [
   function() {
     // Set up
     SpecialPowers.setAllAppsLaunchable(true);
     SpecialPowers.addPermission("webapps-manage", true, document);
@@ -199,17 +190,16 @@ var steps = [
   },
   function() {
     PackagedTestHelper.setAppVersion(2, PackagedTestHelper.next);
   },
   function() {
     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;
       PackagedTestHelper.gApp.ondownloaderror = function() {
         ok(false, "Download error " +
                   PackagedTestHelper.gApp.downloadError.name);
         PackagedTestHelper.finish();
       };
@@ -237,35 +227,16 @@ var steps = [
     request.onsuccess = function() {
       info("Application installed");
     };
   },
   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 +
                           "?getManifest=true&allowCancel";
     navigator.mozApps.mgmt.oninstall = function(evt) {
       info("Got oninstall event");
       PackagedTestHelper.gApp = evt.application;
 
       PackagedTestHelper.gApp.onprogress = function() {
--- a/dom/apps/tests/test_web_app_install.html
+++ b/dom/apps/tests/test_web_app_install.html
@@ -14,29 +14,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id={1075716}">Mozilla Bug {1075716}</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>
 <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() {
   SpecialPowers.pushPermissions(
     [{ "type": "webapps-manage", "allow": 1, "context": document }],
     function() { gGenerator.next() });
 }
 
@@ -53,30 +40,16 @@ function finish() {
 }
 
 function cbError(aEvent) {
   ok(false, "Error callback invoked " +
             aEvent.target.error.name + " " + aEvent.target.error.message);
   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();
 
 /**
   * Install a web app from a manifest with application/manifest+json MIME type.
   */
 function runTest() {
   SpecialPowers.setAllAppsLaunchable(true);
 
@@ -99,40 +72,16 @@ function runTest() {
   request.onerror = cbError;
   request.onsuccess = continueTest;
   yield undefined;
 
   var app = request.result;
   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;
   yield undefined;
   is(request.result, manifestURL, "App uninstalled.");
 
   request = navigator.mozApps.mgmt.getAll();
   request.onerror = cbError;
--- a/dom/tests/mochitest/webapps/test_list_api.xul
+++ b/dom/tests/mochitest/webapps/test_list_api.xul
@@ -35,17 +35,16 @@ for (var p in props) {
 }
 
 var mgmtProps = {
   addEventListener: "function",
   applyDownload: "function",
   dispatchEvent: "function",
   getEventHandler: "function",
   getAll: "function",
-  getIcon: "function",
   getNotInstalled: "function",
   uninstall: "function",
   oninstall: "object",
   onuninstall: "object",
   onenabledstatechange: "object",
   ownerGlobal: "object",
   removeEventListener: "function",
   setEventHandler: "function",
--- a/netwerk/test/httpserver/httpd.js
+++ b/netwerk/test/httpserver/httpd.js
@@ -2736,18 +2736,16 @@ ServerHandler.prototype =
       var fis = new FileInputStream(file, PR_RDONLY, PERMS_READONLY,
                                     Ci.nsIFileInputStream.CLOSE_ON_EOF);
 
       try
       {
         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.
         var self = this;
         var path = metadata.path;
         s.importFunction(function getState(k)
         {
           return self._getState(path, k);