browser/metro/base/tests/mochiperf/browser_layers_01.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     4 "use strict";
     6 function test() {
     7   runTests();
     8 }
    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();
    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();
    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 });

mercurial