Bug 934274 - [app manager] changed invalidLaunchPath to accessFailedLaunchPath and edited the text. r=jryans
authorcptanu <cpt.at.work@gmail.com>
Tue, 05 Nov 2013 09:16:47 -0500
changeset 153595 7a2feb9904f02d82d55171ac3c21e43b9b32b2b2
parent 153594 f66a6b1b0580df64908e09b827442a09629673b1
child 153596 c80b984d7c5c8018473c0f172868844a2b27db14
push id25595
push userryanvm@gmail.com
push dateTue, 05 Nov 2013 20:19:27 +0000
treeherdermozilla-central@2ada3a06d5e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs934274
milestone28.0a1
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
Bug 934274 - [app manager] changed invalidLaunchPath to accessFailedLaunchPath and edited the text. r=jryans
browser/devtools/app-manager/app-validator.js
browser/devtools/app-manager/test/test_app_validator.html
browser/locales/en-US/chrome/browser/devtools/app-manager.properties
--- a/browser/devtools/app-manager/app-validator.js
+++ b/browser/devtools/app-manager/app-validator.js
@@ -144,44 +144,44 @@ AppValidator.prototype.validateLaunchPat
     path = "." + ( manifest.launch_path || "/index.html" );
   } else if (this.project.type == "hosted") {
     path = manifest.launch_path || "/";
   }
   let indexURL;
   try {
     indexURL = Services.io.newURI(path, null, Services.io.newURI(origin, null, null)).spec;
   } catch(e) {
-    this.error(strings.formatStringFromName("validator.invalidLaunchPath", [origin + path], 1));
+    this.error(strings.formatStringFromName("validator.accessFailedLaunchPath", [origin + path], 1));
     deferred.resolve();
     return deferred.promise;
   }
 
   let req = new XMLHttpRequest();
   try {
     req.open("HEAD", indexURL, true);
   } catch(e) {
-    this.error(strings.formatStringFromName("validator.invalidLaunchPath", [indexURL], 1));
+    this.error(strings.formatStringFromName("validator.accessFailedLaunchPath", [indexURL], 1));
     deferred.resolve();
     return deferred.promise;
   }
   req.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE | Ci.nsIRequest.INHIBIT_CACHING;
   req.onload = () => {
     if (req.status >= 400)
-      this.error(strings.formatStringFromName("validator.invalidLaunchPathBadHttpCode", [indexURL, req.status], 2));
+      this.error(strings.formatStringFromName("validator.accessFailedLaunchPathBadHttpCode", [indexURL, req.status], 2));
     deferred.resolve();
   };
   req.onerror = () => {
-    this.error(strings.formatStringFromName("validator.invalidLaunchPath", [indexURL], 1));
+    this.error(strings.formatStringFromName("validator.accessFailedLaunchPath", [indexURL], 1));
     deferred.resolve();
   };
 
   try {
     req.send(null);
   } catch(e) {
-    this.error(strings.formatStringFromName("validator.invalidLaunchPath", [indexURL], 1));
+    this.error(strings.formatStringFromName("validator.accessFailedLaunchPath", [indexURL], 1));
     deferred.resolve();
   }
 
   return deferred.promise;
 }
 
 AppValidator.prototype.validateType = function (manifest) {
   let appType = manifest.type || "web";
--- a/browser/devtools/app-manager/test/test_app_validator.html
+++ b/browser/devtools/app-manager/test/test_app_validator.html
@@ -94,30 +94,30 @@
           });
       },
 
       // Test a launch path that returns a 404
       function () {
         let validator = createHosted("wrong-launch-path");
         validator.validate().then(() => {
             is(validator.errors.length, 1, "app with non-existant launch path got an error");
-            is(validator.errors[0], strings.formatStringFromName("validator.invalidLaunchPathBadHttpCode", [origin + "wrong-path.html", 404], 2),
+            is(validator.errors[0], strings.formatStringFromName("validator.accessFailedLaunchPathBadHttpCode", [origin + "wrong-path.html", 404], 2),
                "with the right error message");
             is(validator.warnings.length, 0, "but no warning");
             next();
           });
       },
       function () {
         let validator = createPackaged("wrong-launch-path");
         validator.validate().then(() => {
             is(validator.errors.length, 1, "app with wrong path got an error");
             let file = nsFile(validator.project.location);
             file.append("wrong-path.html");
             let url = Services.io.newFileURI(file);
-            is(validator.errors[0], strings.formatStringFromName("validator.invalidLaunchPath", [url.spec], 1),
+            is(validator.errors[0], strings.formatStringFromName("validator.accessFailedLaunchPath", [url.spec], 1),
                "with the expected message");
             is(validator.warnings.length, 0, "but no warning");
 
             next();
           });
       },
 
       // Test when using a non-absolute path for launch_path
--- a/browser/locales/en-US/chrome/browser/devtools/app-manager.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/app-manager.properties
@@ -29,13 +29,13 @@ validator.invalidProjectType=Unknown pro
 # don't translate 'icons' and 'name'.
 validator.missNameManifestProperty=Missing mandatory 'name' in Manifest.
 validator.missIconsManifestProperty=Missing 'icons' in Manifest.
 validator.missIconMarketplace=app submission to the Marketplace needs at least a 128px icon
 validator.invalidAppType=Unknown app type: '%S'.
 validator.invalidHostedPriviledges=Hosted App can't be type '%S'.
 validator.noCertifiedSupport='certified' apps are not fully supported on the App manager.
 validator.nonAbsoluteLaunchPath=Launch path has to be an absolute path starting with '/': '%S'
-validator.invalidLaunchPath=Unable to access to app starting document '%S'
-# LOCALIZATION NOTE (validator.invalidLaunchPathBadHttpCode): %1$S is the URI of
+validator.accessFailedLaunchPath=Unable to access the app starting document '%S'
+# LOCALIZATION NOTE (validator.accessFailedLaunchPathBadHttpCode): %1$S is the URI of
 # the launch document, %2$S is the http error code.
-validator.invalidLaunchPathBadHttpCode=Unable to access to app starting document '%1$S', got HTTP code %2$S
+validator.accessFailedLaunchPathBadHttpCode=Unable to access the app starting document '%1$S', got HTTP code %2$S