diff --git a/tests/app/ui/helper.ts b/tests/app/ui/helper.ts index 0f8509712..74bc6dd4a 100644 --- a/tests/app/ui/helper.ts +++ b/tests/app/ui/helper.ts @@ -150,9 +150,13 @@ export function buildUIWithWeakRefAndInteract(createFunc: () => // Could cause GC on the next call. // NOTE: Don't replace this with forceGC(); new ArrayBuffer(4 * 1024 * 1024); + + // An additional GC and wait are needed since WebKit upgrade to version 12.0 + // (TEXT-FIELD.testMemoryLeak test started failing sporadically) + utils.GC(); + TKUnit.wait(0.1); } utils.GC(); - try { TKUnit.assert(!weakRef.get(), weakRef.get() + " leaked!"); done(null); @@ -683,13 +687,13 @@ function setupSetters(): void { cssSetters.set("selectedTabTextColor", "red"); cssSetters.set("androidSelectedTabHighlightColor", "red"); - // ListView-specific props + // ListView-specific props cssSetters.set("separatorColor", "red"); // SegmentedBar-specific props cssSetters.set("selectedBackgroundColor", "red"); - // Page-specific props + // Page-specific props cssSetters.set("statusBarStyle", "light"); cssSetters.set("androidStatusBarBackground", "red"); @@ -855,4 +859,4 @@ function setupSetters(): void { return text ? text.toString() : text; } }); -} \ No newline at end of file +} diff --git a/tests/app/ui/text-field/text-field-tests.ts b/tests/app/ui/text-field/text-field-tests.ts index 1ecc4b92b..fae77c0f1 100644 --- a/tests/app/ui/text-field/text-field-tests.ts +++ b/tests/app/ui/text-field/text-field-tests.ts @@ -200,7 +200,7 @@ if (isIOS) { helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array) { var textField = views[0]; textField.color = new Color("red"); - TKUnit.assertEqual(textField.color.ios.CGColor, textField.ios.textColor.CGColor, "textField.color"); + TKUnit.assert(textField.color.ios.CGColor.isEqual(textField.ios.textColor.CGColor), "textField.color"); }); } } @@ -633,7 +633,7 @@ export function test_android_ime_actions_move_focus() { if (isIOS) { return; } - + const stack = new StackLayout(); const addTextField = () => { const tf = new TextField(); @@ -655,7 +655,7 @@ export function test_android_ime_actions_move_focus() { let edittext = stack._context.getCurrentFocus(); TKUnit.assertNotNull(edittext, "TextField not focused."); - + edittext.onEditorAction(android.view.inputmethod.EditorInfo.IME_ACTION_NEXT); assert(0, 1); assert(1, 0); @@ -691,4 +691,4 @@ export function test_android_ime_actions_move_focus() { assert(1, 2); assert(2, 2); }); -} \ No newline at end of file +}