| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/shell/test_runner/test_interfaces.h" | 5 #include "content/shell/test_runner/test_interfaces.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 for (WebViewTestProxyBase* web_view_test_proxy_base : window_list_) | 73 for (WebViewTestProxyBase* web_view_test_proxy_base : window_list_) |
| 74 web_view_test_proxy_base->Reset(); | 74 web_view_test_proxy_base->Reset(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void TestInterfaces::ResetAll() { | 77 void TestInterfaces::ResetAll() { |
| 78 ResetTestHelperControllers(); | 78 ResetTestHelperControllers(); |
| 79 test_runner_->Reset(); | 79 test_runner_->Reset(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 bool TestInterfaces::TestIsRunning() { |
| 83 return test_runner_->TestIsRunning(); |
| 84 } |
| 85 |
| 82 void TestInterfaces::SetTestIsRunning(bool running) { | 86 void TestInterfaces::SetTestIsRunning(bool running) { |
| 83 test_runner_->SetTestIsRunning(running); | 87 test_runner_->SetTestIsRunning(running); |
| 84 } | 88 } |
| 85 | 89 |
| 86 void TestInterfaces::ConfigureForTestWithURL(const blink::WebURL& test_url, | 90 void TestInterfaces::ConfigureForTestWithURL(const blink::WebURL& test_url, |
| 87 bool generate_pixels) { | 91 bool generate_pixels) { |
| 88 std::string spec = GURL(test_url).spec(); | 92 std::string spec = GURL(test_url).spec(); |
| 89 size_t path_start = spec.rfind("LayoutTests/"); | 93 size_t path_start = spec.rfind("LayoutTests/"); |
| 90 if (path_start != std::string::npos) | 94 if (path_start != std::string::npos) |
| 91 spec = spec.substr(path_start); | 95 spec = spec.substr(path_start); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 160 |
| 157 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { | 161 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { |
| 158 if (!test_runner_->UseMockTheme()) | 162 if (!test_runner_->UseMockTheme()) |
| 159 return 0; | 163 return 0; |
| 160 if (!theme_engine_.get()) | 164 if (!theme_engine_.get()) |
| 161 theme_engine_.reset(new MockWebThemeEngine()); | 165 theme_engine_.reset(new MockWebThemeEngine()); |
| 162 return theme_engine_.get(); | 166 return theme_engine_.get(); |
| 163 } | 167 } |
| 164 | 168 |
| 165 } // namespace test_runner | 169 } // namespace test_runner |
| OLD | NEW |