Switch TestFrameNavigationObserver to DidCommitProvisionalLoadForFrame.
[chromium-blink-merge.git] / chrome / test / data / third_party / spaceport / README.chromium
blob7e43261be5bc31de953e79879f84fbdf283a33b8
1 Name: HTML5 Game Benchmarks
2 URL: git://github.com/sibblingz/PerfMarks
3 URL: http://spaceport.io/community/perfmarks
4 Version: 0
5 Date: May 14, 2012
6 Revision: c2dcbffeb492430c27160cb1ba5d6f1a2bf75d0a
7 License: Various, see license file
8 License File: LICENSE
10 Additional files, not in the original suite:
11   README.chromium
13 Modifications to the test suite to enable running as a cross browser performance test.
14   js/index.js
16 How to update:
18 1. In js/index.js, change the 'step' attribute to add the required console.log
19 statements. Below is the patch.
21 diff --git a/js/index.js b/js/index.js
22 index 2c23d0d..059a57a 100644
23 --- a/js/index.js
24 +++ b/js/index.js
25 @@ -36,17 +36,25 @@ define([ 'tests/performance', 'testDom', 'testRunner', 'tables', 'util/report',
26          function runPerformanceTests(callback) {
27              callback = ensureCallback(callback);
29              testRunner.run('performance', performance, {
30                  done: function (err, results) {
31                      allTestsDone(err, results);
32                      callback(err, results);
33                  },
34 -                step: testDone
35 +                step: function (err, name, results) {
36 +                    shortName = name.replace('performance.sprites.image.', '');
37 +                    if (results) {
38 +                       console.log(shortName + ": " + results.objectCount);
39 +                    } else {
40 +                       console.log(shortName + ": 0");
41 +                    }
42 +                    return testDone(err, name, results);
43 +                }
44              });
45          }
47          function runAndUploadPerformanceTests(callback) {
48              callback = ensureCallback(callback);
50              runPerformanceTests(function (err, results) {
51                  if (err) return callback(err);
53 2. In js/tests/sprites.js, apply the below patch to keep too many objects from
54 being created on fast desktop machines.
56 diff --git a/chrome/test/data/third_party/spaceport/js/tests/sprites.js b/chrome/test/data/third_party/spaceport/js/tests/s
57 index b491fe6..64b2d03 100644
58 --- a/chrome/test/data/third_party/spaceport/js/tests/sprites.js
59 +++ b/chrome/test/data/third_party/spaceport/js/tests/sprites.js
60 @@ -168,7 +168,7 @@ define([ 'sprites/sources', 'sprites/transformers', 'sprites/renderers', 'util/e
61                  rawData.push([ objectCount, results ]);
62                  
63                  var timePerObjectEstimate = 1/(objectCount*results.fps);
64 -                var estimatedMaxObjects = Math.floor(1/(targetFramerate * timePerObjectEstimate));
65 +                var estimatedMaxObjects = Math.min(5000, Math.floor(1/(targetFramerate * timePerObjectEstimate)));
66                  
67                  var nextObjectCount = nextNumberToTry(fpsResults, estimatedMaxObjects);
68                  test(nextObjectCount);