Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 import json | 4 import json |
| 5 import optparse | 5 import optparse |
| 6 import os | 6 import os |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 import webgl_conformance_expectations | 9 import webgl_conformance_expectations |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 }; | 46 }; |
| 47 testHarness.navigateToPage = function(src) { | 47 testHarness.navigateToPage = function(src) { |
| 48 var testFrame = document.getElementById("test-frame"); | 48 var testFrame = document.getElementById("test-frame"); |
| 49 testFrame.src = src; | 49 testFrame.src = src; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 window.webglTestHarness = testHarness; | 52 window.webglTestHarness = testHarness; |
| 53 window.parent.webglTestHarness = testHarness; | 53 window.parent.webglTestHarness = testHarness; |
| 54 window.console.log = testHarness.log; | 54 window.console.log = testHarness.log; |
| 55 window.onerror = function(message, url, line) { | 55 window.onerror = function(message, url, line) { |
| 56 testHarness._failures++; | 56 testHarness.reportResults(null, false, message); |
|
Ken Russell (switch to Gerrit)
2014/08/27 21:57:23
Should this pass the URL to reportResults instead
| |
| 57 if (message) { | |
| 58 testHarness.log(message); | |
| 59 } | |
| 60 testHarness.notifyFinished(null); | 57 testHarness.notifyFinished(null); |
| 61 }; | 58 }; |
| 62 """ | 59 """ |
| 63 | 60 |
| 64 def _DidWebGLTestSucceed(tab): | 61 def _DidWebGLTestSucceed(tab): |
| 65 return tab.EvaluateJavaScript('webglTestHarness._allTestSucceeded') | 62 return tab.EvaluateJavaScript('webglTestHarness._allTestSucceeded') |
| 66 | 63 |
| 67 def _WebGLTestMessages(tab): | 64 def _WebGLTestMessages(tab): |
| 68 return tab.EvaluateJavaScript('webglTestHarness._messages') | 65 return tab.EvaluateJavaScript('webglTestHarness._messages') |
| 69 | 66 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 | 160 |
| 164 if '.txt' in test_name: | 161 if '.txt' in test_name: |
| 165 include_path = os.path.join(current_dir, test_name) | 162 include_path = os.path.join(current_dir, test_name) |
| 166 test_paths += WebglConformance._ParseTests( | 163 test_paths += WebglConformance._ParseTests( |
| 167 include_path, version) | 164 include_path, version) |
| 168 else: | 165 else: |
| 169 test = os.path.join(current_dir, test_name) | 166 test = os.path.join(current_dir, test_name) |
| 170 test_paths.append(test) | 167 test_paths.append(test) |
| 171 | 168 |
| 172 return test_paths | 169 return test_paths |
| OLD | NEW |