Add web-view test page.

This commit is contained in:
Vasil Chimev
2015-07-14 11:04:07 +03:00
parent 8ea97e31bd
commit af40a2da06
6 changed files with 35 additions and 4 deletions

View File

@ -241,6 +241,9 @@
<TypeScriptCompile Include="apps\ui-tests-app\pages\text\text-view.ts" />
<TypeScriptCompile Include="apps\ui-tests-app\pages\text\label.ts" />
<TypeScriptCompile Include="apps\ui-tests-app\pages\text\button.ts" />
<TypeScriptCompile Include="apps\ui-tests-app\web-view\webview.ts">
<DependentUpon>webview.xml</DependentUpon>
</TypeScriptCompile>
<TypeScriptCompile Include="es-collections.d.ts" />
<TypeScriptCompile Include="es6-promise.d.ts" />
<TypeScriptCompile Include="file-system\file-name-resolver.d.ts" />
@ -736,6 +739,7 @@
<Content Include="apps\ui-tests-app\pages\text\text-view.xml" />
<Content Include="apps\ui-tests-app\pages\text\label.xml" />
<Content Include="apps\ui-tests-app\pages\text\button.xml" />
<Content Include="apps\ui-tests-app\web-view\webview.xml" />
<Content Include="js-libs\reworkcss-value\reworkcss-value.js" />
<Content Include="ui\layouts\stack-layout\package.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

View File

@ -10,8 +10,8 @@ export function stack0Loaded(args: observable.EventData) {
var button = stack0.getViewById<textFieldModule.TextField>("btn");
var bindingOptions = {
sourceProperty: "textSource",
targetProperty: "text",
twoWay: true
targetProperty: "text"// ,
// twoWay: true
};
target.bind(bindingOptions, source);
source.set("textSource", "Text");

View File

@ -1,6 +1,6 @@
<Page loaded="pageLoaded">
<StackLayout>
<Label text="{{ name }}" style="text-align:center;" />
<Label text="{{ name }}" id="label" style="text-align:center;" />
<Button text="action" tap="{{ actionName }}" />
<Button text="alert" tap="{{ alertName }}" />
<Button text="confirm" tap="{{ confirmName }}" />

View File

@ -10,7 +10,7 @@ import trace = require("trace");
trace.enable();
trace.setCategories(trace.categories.Test);
var list: string[] = ["pages", "layouts", "modal-view", "bindings", "dialogs"];
var list: string[] = ["pages", "layouts", "modal-view", "bindings", "dialogs", "web-view"];
// basePath is auto-changed when building multiple apps
var basePath = "";

View File

@ -0,0 +1,19 @@
export function loaded(args) {
args.object.items = [1];
}
export function onLoaded(args) {
console.log("### onLoaded");
}
export function onLoadStarted(args) {
console.log("### onLoadStarted: " + args.url);
}
export function onLoadFinished(args) {
console.log("### onLoadFinished: " + args.url);
}
export function onUnloaded(args) {
console.log("### onUnloaded");
}

View File

@ -0,0 +1,8 @@
<Page>
<ListView loaded="loaded">
<ListView.itemTemplate>
<WebView loaded="onLoaded" loadStarted="onLoadStarted" loadFinished="onLoadFinished" unloaded="onUnloaded"
url="http://www.bbc.com/" minHeight="250" />
</ListView.itemTemplate>
</ListView>
</Page>