Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CB-4570 Removing unnecessary <content> check for config since index.h…
…tml is in the default

Reviewed by Bryan Higgins <bhiggins@blackberry.com>
Tested by Tracy Li <tli@blackberry.com>
  • Loading branch information
Jeffrey Heifetz authored and bryanhiggins committed Oct 31, 2013
1 parent 43638d6 commit 3ac0593b2ecaabd304d16bfbbe930e9a87ad4d05
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 18 deletions.
@@ -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");

@@ -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"
},
@@ -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";
@@ -31,7 +31,7 @@ module.exports = {
authorURL: "",
authorEmail: "",
copyright: "",
content: "index.html",
content: "local:///index.html",
contentCharset: "",
contentType: "",
description: "",

0 comments on commit 3ac0593

Please sign in to comment.