Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: content/test/gpu/gpu_tests/webgl_conformance.py

Issue 23604039: Include console.log output in exceptions thrown for WebGL test failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/webgl_conformance.py
diff --git a/content/test/gpu/gpu_tests/webgl_conformance.py b/content/test/gpu/gpu_tests/webgl_conformance.py
index 6a58b79292a7a22453d9459c16625dda71c1ab05..2f39d716d9c6d54e09503dae380b229fec836694 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance.py
@@ -21,13 +21,19 @@ conformance_harness_script = r"""
testHarness._messages = '';
testHarness._failures = 0;
testHarness._finished = false;
+ testHarness._originalLog = window.console.log;
+
+ testHarness.log = function(msg) {
+ testHarness._messages += msg + "\n";
+ testHarness._originalLog.apply(window.console, [msg]);
+ }
testHarness.reportResults = function(success, msg) {
testHarness._allTestSucceeded = testHarness._allTestSucceeded && !!success;
if(!success) {
testHarness._failures++;
if(msg) {
- testHarness._messages += msg + "\n";
+ testHarness.log(msg);
}
}
};
@@ -42,6 +48,7 @@ conformance_harness_script = r"""
window.webglTestHarness = testHarness;
window.parent.webglTestHarness = testHarness;
console.log("Harness injected.");
+ window.console.log = testHarness.log;
"""
def _DidWebGLTestSucceed(tab):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698