| 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(
|
|
|