Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[CB-4076] Modified config-parser to default to the uri attribute
Reviewed by Bryan Higgins <bhiggins@blackberry.com>
  • Loading branch information
Kristoffer Flores authored and bryanhiggins committed Aug 9, 2013
1 parent cfee530 commit 0dbdf308456ac588b099cac1052190ba5dae6974
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
@@ -202,7 +202,11 @@ function processWidgetData(data, widgetConfig, session) {
} else {
attribs.subdomains = packagerUtils.toBoolean(attribs.subdomains);
if (attribs.uri || attribs.origin) {
widgetConfig.accessList.push(createAccessListObj(attribs.uri || attribs.origin, attribs.subdomains));
if (uriExist === true && originExist === true) {
widgetConfig.accessList.push(createAccessListObj(attribs.uri, attribs.subdomains)); //using uri attribute by default
} else {
widgetConfig.accessList.push(createAccessListObj(attribs.uri || attribs.origin, attribs.subdomains));
}
}
}
}
@@ -502,10 +502,10 @@ describe("config parser", function () {
//hasMultiAccess was set to false
expect(configObj.hasMultiAccess).toEqual(false);
expect(configObj.accessList).toEqual([ {
origin : 'WIDGET_LOCAL',
uri : 'WIDGET_LOCAL',
allowSubDomain : true
}, {
"origin" : "http://www.somedomain1.com"
"uri" : "http://www.somedomain1.com"
} ]);
});
});

0 comments on commit 0dbdf30

Please sign in to comment.