|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 "use strict"; |
|
5 |
|
6 function test() { |
|
7 runTests(); |
|
8 } |
|
9 |
|
10 gTests.push({ |
|
11 desc: "rotating divs", |
|
12 run: function run() { |
|
13 yield addTab(chromeRoot + "res/divs_test.html", true); |
|
14 yield hideContextUI(); |
|
15 yield hideNavBar(); |
|
16 |
|
17 let stopwatch = new StopWatch(); |
|
18 let win = Browser.selectedTab.browser.contentWindow; |
|
19 let domUtils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); |
|
20 yield waitForEvent(win, "teststarted", 5000); |
|
21 // the test runs for five seconds |
|
22 let recordingHandle = domUtils.startFrameTimeRecording(); |
|
23 stopwatch.start(); |
|
24 let event = yield waitForEvent(win, "testfinished", 10000); |
|
25 let intervals = domUtils.stopFrameTimeRecording(recordingHandle); |
|
26 let msec = stopwatch.stop(); |
|
27 |
|
28 PerfTest.declareTest("B924F3FA-4CB5-4453-B131-53E3611E0765", |
|
29 "rotating divs w/text", "graphics", "content", |
|
30 "Measures animation frames for rotating translucent divs on top of a background of text."); |
|
31 PerfTest.declareFrameRateResult(intervals.length, msec, "fps"); |
|
32 } |
|
33 }); |
|
34 |
|
35 |