| 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 11 matching lines...) Expand all Loading... |
| 22 testHarness._messages = ''; | 22 testHarness._messages = ''; |
| 23 testHarness._failures = 0; | 23 testHarness._failures = 0; |
| 24 testHarness._finished = false; | 24 testHarness._finished = false; |
| 25 testHarness._originalLog = window.console.log; | 25 testHarness._originalLog = window.console.log; |
| 26 | 26 |
| 27 testHarness.log = function(msg) { | 27 testHarness.log = function(msg) { |
| 28 testHarness._messages += msg + "\n"; | 28 testHarness._messages += msg + "\n"; |
| 29 testHarness._originalLog.apply(window.console, [msg]); | 29 testHarness._originalLog.apply(window.console, [msg]); |
| 30 } | 30 } |
| 31 | 31 |
| 32 testHarness.reportResults = function(success, msg) { | 32 testHarness.reportResults = function(url, success, msg) { |
| 33 testHarness._allTestSucceeded = testHarness._allTestSucceeded && !!success; | 33 testHarness._allTestSucceeded = testHarness._allTestSucceeded && !!success; |
| 34 if(!success) { | 34 if(!success) { |
| 35 testHarness._failures++; | 35 testHarness._failures++; |
| 36 if(msg) { | 36 if(msg) { |
| 37 testHarness.log(msg); | 37 testHarness.log(msg); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 }; | 40 }; |
| 41 testHarness.notifyFinished = function() { | 41 testHarness.notifyFinished = function(url) { |
| 42 testHarness._finished = true; | 42 testHarness._finished = true; |
| 43 }; | 43 }; |
| 44 testHarness.navigateToPage = function(src) { | 44 testHarness.navigateToPage = function(src) { |
| 45 var testFrame = document.getElementById("test-frame"); | 45 var testFrame = document.getElementById("test-frame"); |
| 46 testFrame.src = src; | 46 testFrame.src = src; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 window.webglTestHarness = testHarness; | 49 window.webglTestHarness = testHarness; |
| 50 window.parent.webglTestHarness = testHarness; | 50 window.parent.webglTestHarness = testHarness; |
| 51 window.console.log = testHarness.log; | 51 window.console.log = testHarness.log; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 if '.txt' in test_name: | 156 if '.txt' in test_name: |
| 157 include_path = os.path.join(current_dir, test_name) | 157 include_path = os.path.join(current_dir, test_name) |
| 158 test_paths += WebglConformance._ParseTests( | 158 test_paths += WebglConformance._ParseTests( |
| 159 include_path, version) | 159 include_path, version) |
| 160 else: | 160 else: |
| 161 test = os.path.join(current_dir, test_name) | 161 test = os.path.join(current_dir, test_name) |
| 162 test_paths.append(test) | 162 test_paths.append(test) |
| 163 | 163 |
| 164 return test_paths | 164 return test_paths |
| OLD | NEW |