diff --git a/apps/app/css-perf-test/app.ts b/apps/app/css-perf-test/app.ts new file mode 100644 index 000000000..2858b0cb8 --- /dev/null +++ b/apps/app/css-perf-test/app.ts @@ -0,0 +1,12 @@ +import application = require("application"); + + global.time = function(): number { + if (global.android) { + return java.lang.System.nanoTime() / 1000000; // 1 ms = 1000000 ns + } + else { + return CACurrentMediaTime() * 1000; + } +} + +application.start({ moduleName: "css-perf-test/root" }); \ No newline at end of file diff --git a/apps/app/css-perf-test/main-page.css b/apps/app/css-perf-test/main-page.css new file mode 100644 index 000000000..115f58fbc --- /dev/null +++ b/apps/app/css-perf-test/main-page.css @@ -0,0 +1,29 @@ +.title { + font-size: 20; + margin: 3; +} + +.author { + font-size: 14; + horizontal-align: left; + vertical-align: bottom; + margin: 3; +} + +.comments { + color: #10C2B0; + font-size: 14; + vertical-align: bottom; + margin: 3; +} + +.thumbnail { + width: 72; + height: 72; + margin: 3; + vertical-align: top; +} + +TabView { + background-color: white; +} \ No newline at end of file diff --git a/apps/app/css-perf-test/main-page.ts b/apps/app/css-perf-test/main-page.ts new file mode 100644 index 000000000..0833dcc32 --- /dev/null +++ b/apps/app/css-perf-test/main-page.ts @@ -0,0 +1,7 @@ +import {EventData as ObservableEventData} from "data/observable"; + +export function navigatedTo(args: ObservableEventData) { + setTimeout(() => { + console.log(`Time: ${global.time() - global.startTime} ms`); + }); +} \ No newline at end of file diff --git a/apps/app/css-perf-test/main-page.xml b/apps/app/css-perf-test/main-page.xml new file mode 100644 index 000000000..a66a5ffcd --- /dev/null +++ b/apps/app/css-perf-test/main-page.xml @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/app/css-perf-test/main-page2.css b/apps/app/css-perf-test/main-page2.css new file mode 100644 index 000000000..115f58fbc --- /dev/null +++ b/apps/app/css-perf-test/main-page2.css @@ -0,0 +1,29 @@ +.title { + font-size: 20; + margin: 3; +} + +.author { + font-size: 14; + horizontal-align: left; + vertical-align: bottom; + margin: 3; +} + +.comments { + color: #10C2B0; + font-size: 14; + vertical-align: bottom; + margin: 3; +} + +.thumbnail { + width: 72; + height: 72; + margin: 3; + vertical-align: top; +} + +TabView { + background-color: white; +} \ No newline at end of file diff --git a/apps/app/css-perf-test/res/logo.png b/apps/app/css-perf-test/res/logo.png new file mode 100644 index 000000000..de99da231 Binary files /dev/null and b/apps/app/css-perf-test/res/logo.png differ diff --git a/apps/app/css-perf-test/root.ts b/apps/app/css-perf-test/root.ts new file mode 100644 index 000000000..b67d9911a --- /dev/null +++ b/apps/app/css-perf-test/root.ts @@ -0,0 +1,7 @@ +import {Page} from "ui/page"; + +export function onTap(args: any) { + global.startTime = global.time(); + let page = args.object.page; + page.frame.navigate("css-perf-test/main-page"); +} \ No newline at end of file diff --git a/apps/app/css-perf-test/root.xml b/apps/app/css-perf-test/root.xml new file mode 100644 index 000000000..6088b5d07 --- /dev/null +++ b/apps/app/css-perf-test/root.xml @@ -0,0 +1,3 @@ + +