diff --git a/apps/tests/xml-declaration/xml-declaration-tests.ts b/apps/tests/xml-declaration/xml-declaration-tests.ts index a0600b51b..fea769541 100644 --- a/apps/tests/xml-declaration/xml-declaration-tests.ts +++ b/apps/tests/xml-declaration/xml-declaration-tests.ts @@ -17,6 +17,7 @@ import myCustomControlWithoutXml = require("./mymodule/MyControl"); import listViewModule = require("ui/list-view"); import helper = require("../ui/helper"); import viewModule = require("ui/core/view"); +import platform = require("platform"); export function test_load_IsDefined() { TKUnit.assert(types.isFunction(builder.load), "ui/builder should have load method!"); @@ -129,6 +130,17 @@ export function test_parse_ShouldParseBooleanPropertiesIgnoreCaseInverted() { TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable)); }; +export function test_parse_ShouldParsePlatofmrSpecificProperties() { + var p = builder.parse(""); + var tf = p.content; + + if(platform.device.os === platform.platformNames.ios) { + TKUnit.assert(tf.editable === true, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable)); + } else { + TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable)); + } +}; + export function test_parse_ShouldParseBindings() { var p = builder.parse(""); p.bindingContext = { myProp: true }; @@ -295,4 +307,4 @@ export function test_parse_ShouldParseNestedListViewInListViewTemplate() { finally { helper.goBack(); } -} \ No newline at end of file +}