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

Unified Diff: content/test/data/gpu/functional_files/context.js

Issue 2753873002: Fix race condition in GpuProcess_skip_gpu_process. (Closed)
Patch Set: Fixed breakage in test. Created 3 years, 9 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 | content/test/gpu/gpu_tests/gpu_process_expectations.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/gpu/functional_files/context.js
diff --git a/content/test/data/gpu/functional_files/context.js b/content/test/data/gpu/functional_files/context.js
index 90ba3369fa9ee304c811cc3f156ab1d550a03b97..d89e722d853e475a8918a02caceec0a1c28c46ca 100644
--- a/content/test/data/gpu/functional_files/context.js
+++ b/content/test/data/gpu/functional_files/context.js
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Global variable.
+// Global variables.
var gl_context;
+var gl_renderer;
initializeWebGL = function(canvas) {
gl_context = null;
@@ -13,7 +14,7 @@ initializeWebGL = function(canvas) {
// If we don't have a GL context, give up now.
if (!gl_context) {
err = "Unable to initialize WebGL. Your browser may not support it.";
- if (domAutomationController) {
+ if (window.domAutomationController) {
console.log(err);
} else {
alert(err);
@@ -34,8 +35,14 @@ startWebGLContext = function() {
gl_context.clearDepth(1);
gl_context.clear(gl_context.COLOR_BUFFER_BIT |
gl_context.DEPTH_BUFFER_BIT);
+
+ // Also fetch the unmasked GL_RENDERER string.
+ var ext = gl_context.getExtension("WEBGL_debug_renderer_info");
+ gl_renderer = gl_context.getParameter(ext.UNMASKED_RENDERER_WEBGL);
}
- domAutomationController.setAutomationId(0);
- domAutomationController.send("FINISHED");
+ if (window.domAutomationController) {
+ domAutomationController.setAutomationId(0);
+ domAutomationController.send("FINISHED");
+ }
}
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/gpu_process_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698