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

Unified Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 706193003: [WebGL-chromium]Test to validate glinfo when webglcontext fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed function signature. Created 6 years, 1 month 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 | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/test_runner.cc
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index 3eeda2e6db4cfc9567086cfe6967df00ce69902d..869cc81368207e5c1e7623a8486ac436b8184bc0 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -308,6 +308,8 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void NotImplemented(const gin::Arguments& args);
+ void ForceNextWebGLContextCreationToFail();
+
base::WeakPtr<TestRunner> runner_;
DISALLOW_COPY_AND_ASSIGN(TestRunnerBindings);
@@ -544,6 +546,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
&TestRunnerBindings::SetMockPushClientError)
.SetMethod("setBluetoothMockDataSet",
&TestRunnerBindings::SetBluetoothMockDataSet)
+ .SetMethod("forceNextWebGLContextCreationToFail",
+ &TestRunnerBindings::ForceNextWebGLContextCreationToFail)
// Properties.
.SetProperty("platformName", &TestRunnerBindings::PlatformName)
@@ -1448,6 +1452,11 @@ void TestRunnerBindings::SetInterceptPostMessage(bool value) {
runner_->intercept_post_message_ = value;
}
+void TestRunnerBindings::ForceNextWebGLContextCreationToFail() {
+ if (runner_)
+ runner_->ForceNextWebGLContextCreationToFail();
+}
+
void TestRunnerBindings::NotImplemented(const gin::Arguments& args) {
}
@@ -2845,6 +2854,11 @@ void TestRunner::CapturePixelsAsyncThen(v8::Handle<v8::Function> callback) {
base::Passed(&task)));
}
+void TestRunner::ForceNextWebGLContextCreationToFail() {
+ if (web_view_)
+ web_view_->forceNextWebGLContextCreationToFail();
+}
+
void TestRunner::CopyImageAtAndCapturePixelsAsyncThen(
int x, int y, v8::Handle<v8::Function> callback) {
scoped_ptr<InvokeCallbackTask> task(
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698