michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: "use strict"; michael@0: michael@0: function test() { michael@0: runTests(); michael@0: } michael@0: michael@0: gTests.push({ michael@0: desc: "rotating divs", michael@0: run: function run() { michael@0: yield addTab(chromeRoot + "res/divs_test.html", true); michael@0: yield hideContextUI(); michael@0: yield hideNavBar(); michael@0: michael@0: let stopwatch = new StopWatch(); michael@0: let win = Browser.selectedTab.browser.contentWindow; michael@0: let domUtils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); michael@0: yield waitForEvent(win, "teststarted", 5000); michael@0: // the test runs for five seconds michael@0: let recordingHandle = domUtils.startFrameTimeRecording(); michael@0: stopwatch.start(); michael@0: let event = yield waitForEvent(win, "testfinished", 10000); michael@0: let intervals = domUtils.stopFrameTimeRecording(recordingHandle); michael@0: let msec = stopwatch.stop(); michael@0: michael@0: PerfTest.declareTest("B924F3FA-4CB5-4453-B131-53E3611E0765", michael@0: "rotating divs w/text", "graphics", "content", michael@0: "Measures animation frames for rotating translucent divs on top of a background of text."); michael@0: PerfTest.declareFrameRateResult(intervals.length, msec, "fps"); michael@0: } michael@0: }); michael@0: michael@0: