| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Runs Browsermark CSS, DOM, WebGL, JS, resize and page load benchmarks. | 5 """Runs Browsermark CSS, DOM, WebGL, JS, resize and page load benchmarks. |
| 6 | 6 |
| 7 Browsermark benchmark suite have five test groups: | 7 Browsermark benchmark suite have five test groups: |
| 8 a) CSS group: measures your browsers 2D and 3D performance, and finally executes | 8 a) CSS group: measures your browsers 2D and 3D performance, and finally executes |
| 9 CSS Crunch test | 9 CSS Crunch test |
| 10 b) DOM group: measures variety of areas, like how well your browser traverse in | 10 b) DOM group: measures variety of areas, like how well your browser traverse in |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 """ | 39 """ |
| 40 tab.ExecuteJavaScript(js_start_test) | 40 tab.ExecuteJavaScript(js_start_test) |
| 41 tab.WaitForJavaScriptExpression( | 41 tab.WaitForJavaScriptExpression( |
| 42 'window.location.pathname.indexOf("results") != -1', 600) | 42 'window.location.pathname.indexOf("results") != -1', 600) |
| 43 result = int(tab.EvaluateJavaScript( | 43 result = int(tab.EvaluateJavaScript( |
| 44 'document.getElementsByClassName("score")[0].innerHTML')) | 44 'document.getElementsByClassName("score")[0].innerHTML')) |
| 45 results.AddValue( | 45 results.AddValue( |
| 46 scalar.ScalarValue(results.current_page, 'Score', 'score', result)) | 46 scalar.ScalarValue(results.current_page, 'Score', 'score', result)) |
| 47 | 47 |
| 48 | 48 |
| 49 @benchmark.Disabled |
| 49 class Browsermark(benchmark.Benchmark): | 50 class Browsermark(benchmark.Benchmark): |
| 50 """Browsermark suite tests CSS, DOM, resize, page load, WebGL and JS.""" | 51 """Browsermark suite tests CSS, DOM, resize, page load, WebGL and JS.""" |
| 51 test = _BrowsermarkMeasurement | 52 test = _BrowsermarkMeasurement |
| 52 def CreatePageSet(self, options): | 53 def CreatePageSet(self, options): |
| 53 ps = page_set.PageSet( | 54 ps = page_set.PageSet( |
| 54 file_path=os.path.abspath(__file__), | 55 file_path=os.path.abspath(__file__), |
| 55 archive_data_file='../page_sets/data/browsermark.json', | 56 archive_data_file='../page_sets/data/browsermark.json', |
| 56 make_javascript_deterministic=False) | 57 make_javascript_deterministic=False) |
| 57 ps.AddPageWithDefaultRunNavigate('http://browsermark.rightware.com/tests/') | 58 ps.AddPageWithDefaultRunNavigate('http://browsermark.rightware.com/tests/') |
| 58 return ps | 59 return ps |
| OLD | NEW |