diff --git a/apps/tests/testRunner.ts b/apps/tests/testRunner.ts index 983fa72f9..a2863746d 100644 --- a/apps/tests/testRunner.ts +++ b/apps/tests/testRunner.ts @@ -10,7 +10,6 @@ allTests["WRAPLAYOUT"] = require("./layouts/wrap-layout-tests"); allTests["ABSOLUTELAYOUT"] = require("./layouts/absolute-layout-tests"); allTests["GRIDLAYOUT"] = require("./layouts/grid-layout-tests"); allTests["STACKLAYOUT"] = require("./layouts/stack-layout-tests"); -allTests["WEB-VIEW"] = require("./ui/web-view/web-view-tests"); allTests["PLATFORM"] = require("./platform-tests"); allTests["STYLE-PROPERTIES"] = require("./ui/style/style-properties-tests"); allTests["SCROLL-VIEW"] = require("./ui/scroll-view/scroll-view-tests"); @@ -51,6 +50,7 @@ allTests["XML-DECLARATION"] = require("./xml-declaration/xml-declaration-tests") allTests["LIST-PICKER"] = require("./ui/list-picker/list-picker-tests"); allTests["DATE-PICKER"] = require("./ui/date-picker/date-picker-tests"); allTests["TIME-PICKER"] = require("./ui/time-picker/time-picker-tests"); +allTests["WEB-VIEW"] = require("./ui/web-view/web-view-tests"); var testsWithLongDelay = { testLocation: 10000, diff --git a/apps/tests/ui/web-view/web-view-tests.ts b/apps/tests/ui/web-view/web-view-tests.ts index fdd95e872..ee597cf0d 100644 --- a/apps/tests/ui/web-view/web-view-tests.ts +++ b/apps/tests/ui/web-view/web-view-tests.ts @@ -63,7 +63,7 @@ export var testLoadExistingUrl = function () { }); webView.url = "https://httpbin.org/html"; - TKUnit.wait(2); + TKUnit.wait(4); helper.goBack(); @@ -89,14 +89,17 @@ export var testLoadInvalidUrl = function () { var testFinished = false; var actualError; - webView.on(webViewModule.knownEvents.loadFinished, function (args: webViewModule.LoadEventData) { - testFinished = true; + if (actualError) { + // Android call this twice -- the second time args.error is undefined. + return; + } actualError = args.error; + testFinished = true; }); webView.url = "kofti://mnogokofti"; - TKUnit.wait(2); + TKUnit.wait(4); helper.goBack(); diff --git a/ui/core/view-common.ts b/ui/core/view-common.ts index 57ca9cabd..7ed335ac6 100644 --- a/ui/core/view-common.ts +++ b/ui/core/view-common.ts @@ -174,20 +174,6 @@ export class View extends proxy.ProxyObject implements definition.View { this.style.backgroundColor = value; } - get fontSize(): number { - return this.style.fontSize; - } - set fontSize(value: number) { - this.style.fontSize = value; - } - - get textAlignment(): string { - return this.style.textAlignment; - } - set textAlignment(value: string) { - this.style.textAlignment; - } - get minWidth(): number { return this.style.minWidth; } diff --git a/ui/core/view.d.ts b/ui/core/view.d.ts index f45adc46f..c4995e081 100644 --- a/ui/core/view.d.ts +++ b/ui/core/view.d.ts @@ -135,16 +135,6 @@ declare module "ui/core/view" { */ backgroundColor: color.Color; - /** - * Gets or sets font-size style property. - */ - fontSize: number; - - /** - * Gets or sets text-alignment style property. - */ - textAlignment: string; - /** * Gets or sets the minimum width the view may grow to. */ diff --git a/ui/text-base/text-base.d.ts b/ui/text-base/text-base.d.ts index 4e7fb682c..9dadae4dd 100644 --- a/ui/text-base/text-base.d.ts +++ b/ui/text-base/text-base.d.ts @@ -25,6 +25,16 @@ */ text: string; + /** + * Gets or sets text-alignment style property. + */ + textAlignment: string; + + /** + * Gets or sets font-size style property. + */ + fontSize: number; + /** * Gets or sets a formatted string. */ diff --git a/ui/text-base/text-base.ts b/ui/text-base/text-base.ts index 3a0cb322a..210f87235 100644 --- a/ui/text-base/text-base.ts +++ b/ui/text-base/text-base.ts @@ -57,6 +57,20 @@ export class TextBase extends view.View implements definition.TextBase { this._setValue(TextBase.textProperty, value); } + get fontSize(): number { + return this.style.fontSize; + } + set fontSize(value: number) { + this.style.fontSize = value; + } + + get textAlignment(): string { + return this.style.textAlignment; + } + set textAlignment(value: string) { + this.style.textAlignment; + } + get formattedText(): formattedString.FormattedString { return this._getValue(TextBase.formattedTextProperty); }