cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhigg...@apache.org
Subject webworks commit: CB-4570 Removing unnecessary <content> check for config since index.html is in the default
Date Thu, 31 Oct 2013 13:23:59 GMT
Updated Branches:
  refs/heads/master 43638d6ad -> 3ac0593b2


CB-4570 Removing unnecessary <content> check for config since index.html is in the default

Reviewed by Bryan Higgins <bhiggins@blackberry.com>
Tested by Tracy Li <tli@blackberry.com>


Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/3ac0593b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/3ac0593b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/3ac0593b

Branch: refs/heads/master
Commit: 3ac0593b2ecaabd304d16bfbbe930e9a87ad4d05
Parents: 43638d6
Author: Jeffrey Heifetz <jheifetz@blackberry.com>
Authored: Fri Aug 9 13:01:06 2013 -0400
Committer: Bryan Higgins <bhiggins@blackberry.com>
Committed: Thu Oct 31 09:23:34 2013 -0400

----------------------------------------------------------------------
 .../bin/templates/project/cordova/lib/config-parser.js   |  3 ---
 .../bin/templates/project/cordova/lib/localize.js        |  3 ---
 .../bin/test/cordova/unit/spec/lib/config-parser.js      | 11 -----------
 blackberry10/framework/lib/config/default.js             |  2 +-
 4 files changed, 1 insertion(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/3ac0593b/blackberry10/bin/templates/project/cordova/lib/config-parser.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/config-parser.js b/blackberry10/bin/templates/project/cordova/lib/config-parser.js
index e887103..e0545d5 100644
--- a/blackberry10/bin/templates/project/cordova/lib/config-parser.js
+++ b/blackberry10/bin/templates/project/cordova/lib/config-parser.js
@@ -429,9 +429,6 @@ function validateConfig(widgetConfig) {
 
     check(widgetConfig.author, localize.translate("EXCEPTION_INVALID_AUTHOR")).notNull();
     check(widgetConfig.id, localize.translate("EXCEPTION_INVALID_ID")).notNull().notEmpty();
-    check(widgetConfig.content, localize.translate("EXCEPTION_INVALID_CONTENT"))
-        .notNull()
-        .notEmpty();
 
     validateSplashScreensIcon(widgetConfig, "rim:splash");
 

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/3ac0593b/blackberry10/bin/templates/project/cordova/lib/localize.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/localize.js b/blackberry10/bin/templates/project/cordova/lib/localize.js
index 38cf7a9..95ce869 100755
--- a/blackberry10/bin/templates/project/cordova/lib/localize.js
+++ b/blackberry10/bin/templates/project/cordova/lib/localize.js
@@ -70,9 +70,6 @@ var Localize = require("localize"),
         "EXCEPTION_INVALID_ID": {
             "en": "Please enter an application id"
         },
-        "EXCEPTION_INVALID_CONTENT": {
-            "en": "Invalid config.xml - failed to parse the <content> element(Invalid
source or the source is not specified.)"
-        },
         "EXCEPTION_INVALID_FEATURE_ID": {
             "en": "Invalid <feature> element - failed to find the id attribute"
         },

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/3ac0593b/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js b/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js
index 7a5e3bc..d88d162 100644
--- a/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js
+++ b/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js
@@ -263,17 +263,6 @@ describe("config parser", function () {
         });
     });
 
-    it("Fails when missing content error is not shown", function () {
-        var data = testUtilities.cloneObj(testData.xml2jsConfig);
-        data.content = "";
-
-        mockParsing(data);
-
-        expect(function () {
-            configParser.parse(configPath, session, {});
-        }).toThrow(localize.translate("EXCEPTION_INVALID_CONTENT"));
-    });
-
     it("adds local:/// protocol to urls", function () {
         var data = testUtilities.cloneObj(testData.xml2jsConfig);
         data.content["@"].src = "localFile.html";

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/3ac0593b/blackberry10/framework/lib/config/default.js
----------------------------------------------------------------------
diff --git a/blackberry10/framework/lib/config/default.js b/blackberry10/framework/lib/config/default.js
index ad1a4a4..77ea4c1 100644
--- a/blackberry10/framework/lib/config/default.js
+++ b/blackberry10/framework/lib/config/default.js
@@ -31,7 +31,7 @@ module.exports = {
     authorURL: "",
     authorEmail: "",
     copyright: "",
-    content: "index.html",
+    content: "local:///index.html",
     contentCharset: "",
     contentType: "",
     description: "",


Mime
View raw message