Skip to content

Commit 525d0c4

Browse files
committed
Fix ui-tests-app paths and add css-perf-test app
1 parent 3f41a6c commit 525d0c4

File tree

14 files changed

+424
-30
lines changed

14 files changed

+424
-30
lines changed

apps/app/css-perf-test/app.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import application = require("application");
2+
3+
global.time = function(): number {
4+
if (global.android) {
5+
return java.lang.System.nanoTime() / 1000000; // 1 ms = 1000000 ns
6+
}
7+
else {
8+
return CACurrentMediaTime() * 1000;
9+
}
10+
}
11+
12+
application.start({ moduleName: "css-perf-test/root" });
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.title {
2+
font-size: 20;
3+
margin: 3;
4+
}
5+
6+
.author {
7+
font-size: 14;
8+
horizontal-align: left;
9+
vertical-align: bottom;
10+
margin: 3;
11+
}
12+
13+
.comments {
14+
color: #10C2B0;
15+
font-size: 14;
16+
vertical-align: bottom;
17+
margin: 3;
18+
}
19+
20+
.thumbnail {
21+
width: 72;
22+
height: 72;
23+
margin: 3;
24+
vertical-align: top;
25+
}
26+
27+
TabView {
28+
background-color: white;
29+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import {EventData as ObservableEventData} from "data/observable";
2+
3+
export function navigatedTo(args: ObservableEventData) {
4+
setTimeout(() => {
5+
console.log(`Time: ${global.time() - global.startTime} ms`);
6+
});
7+
}

apps/app/css-perf-test/main-page.xml

Lines changed: 307 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.title {
2+
font-size: 20;
3+
margin: 3;
4+
}
5+
6+
.author {
7+
font-size: 14;
8+
horizontal-align: left;
9+
vertical-align: bottom;
10+
margin: 3;
11+
}
12+
13+
.comments {
14+
color: #10C2B0;
15+
font-size: 14;
16+
vertical-align: bottom;
17+
margin: 3;
18+
}
19+
20+
.thumbnail {
21+
width: 72;
22+
height: 72;
23+
margin: 3;
24+
vertical-align: top;
25+
}
26+
27+
TabView {
28+
background-color: white;
29+
}
26.2 KB
Loading

apps/app/css-perf-test/root.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import {Page} from "ui/page";
2+
3+
export function onTap(args: any) {
4+
global.startTime = global.time();
5+
let page = <Page>args.object.page;
6+
page.frame.navigate("css-perf-test/main-page");
7+
}

apps/app/css-perf-test/root.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
2+
<Button text="Start test" tap="onTap" />
3+
</Page>

apps/app/fonts/Pacifico.ttf

73.8 KB
Binary file not shown.

apps/app/fonts/Sofia.otf

23.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)