Chromium Code Reviews| 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( |