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

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 code as per review comments. 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
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..b9a0d2634b0e9290f3331928da877393309df429 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();
tkent 2014/11/12 00:19:17 force -> Force
sivag 2014/11/12 18:47:20 Done.
+
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)
tkent 2014/11/12 00:19:17 force -> Force
sivag 2014/11/12 18:47:21 Done.
// Properties.
.SetProperty("platformName", &TestRunnerBindings::PlatformName)
@@ -1448,6 +1452,11 @@ void TestRunnerBindings::SetInterceptPostMessage(bool value) {
runner_->intercept_post_message_ = value;
}
+void TestRunnerBindings::forceNextWebGLContextCreationToFail() {
tkent 2014/11/12 00:19:17 force -> Force
sivag 2014/11/12 18:47:20 Done.
+ if (runner_)
+ runner_->forceNextWebGLContextCreationToFail();
tkent 2014/11/12 00:19:17 force -> Force
sivag 2014/11/12 18:47:20 Done.
+}
+
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() {
tkent 2014/11/12 00:19:17 force -> Force
sivag 2014/11/12 18:47:20 Done.
+ if (web_view_)
+ web_view_->forceNextWebGLContextCreationToFail();
+}
+
void TestRunner::CopyImageAtAndCapturePixelsAsyncThen(
int x, int y, v8::Handle<v8::Function> callback) {
scoped_ptr<InvokeCallbackTask> task(

Powered by Google App Engine
This is Rietveld 408576698