@@ -17,6 +17,7 @@ import myCustomControlWithoutXml = require("./mymodule/MyControl");
1717import listViewModule = require( "ui/list-view" ) ;
1818import helper = require( "../ui/helper" ) ;
1919import viewModule = require( "ui/core/view" ) ;
20+ import platform = require( "platform" ) ;
2021
2122export function test_load_IsDefined ( ) {
2223 TKUnit . assert ( types . isFunction ( builder . load ) , "ui/builder should have load method!" ) ;
@@ -129,6 +130,17 @@ export function test_parse_ShouldParseBooleanPropertiesIgnoreCaseInverted() {
129130 TKUnit . assert ( tf . editable === false , "Expected result: false; Actual result: " + tf . editable + "; type: " + typeof ( tf . editable ) ) ;
130131} ;
131132
133+ export function test_parse_ShouldParsePlatofmrSpecificProperties ( ) {
134+ var p = < page . Page > builder . parse ( "<Page><TextField ios:editable='False' android:editable='True' /></Page>" ) ;
135+ var tf = < textFieldModule . TextField > p . content ;
136+
137+ if ( platform . device . os === platform . platformNames . ios ) {
138+ TKUnit . assert ( tf . editable === true , "Expected result: false; Actual result: " + tf . editable + "; type: " + typeof ( tf . editable ) ) ;
139+ } else {
140+ TKUnit . assert ( tf . editable === false , "Expected result: false; Actual result: " + tf . editable + "; type: " + typeof ( tf . editable ) ) ;
141+ }
142+ } ;
143+
132144export function test_parse_ShouldParseBindings ( ) {
133145 var p = < page . Page > builder . parse ( "<Page><Switch checked='{{ myProp }}' /></Page>" ) ;
134146 p . bindingContext = { myProp : true } ;
@@ -295,4 +307,4 @@ export function test_parse_ShouldParseNestedListViewInListViewTemplate() {
295307 finally {
296308 helper . goBack ( ) ;
297309 }
298- }
310+ }
0 commit comments