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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 base::JSONWriter::Write(settings, &settings_string); | 110 base::JSONWriter::Write(settings, &settings_string); |
111 test_runner_->ShowDevTools(settings_string, std::string()); | 111 test_runner_->ShowDevTools(settings_string, std::string()); |
112 } | 112 } |
113 if (spec.find("/viewsource/") != std::string::npos) { | 113 if (spec.find("/viewsource/") != std::string::npos) { |
114 test_runner_->setShouldEnableViewSource(true); | 114 test_runner_->setShouldEnableViewSource(true); |
115 test_runner_->setShouldGeneratePixelResults(false); | 115 test_runner_->setShouldGeneratePixelResults(false); |
116 test_runner_->setShouldDumpAsMarkup(true); | 116 test_runner_->setShouldDumpAsMarkup(true); |
117 } | 117 } |
118 if (spec.find("/external/wpt/") != std::string::npos || | 118 if (spec.find("/external/wpt/") != std::string::npos || |
119 spec.find("/external/csswg-test/") != std::string::npos || | 119 spec.find("/external/csswg-test/") != std::string::npos || |
120 spec.find("://web-platform.test") != std::string::npos) | 120 spec.find("://web-platform.test") != std::string::npos || |
| 121 spec.find("/harness-tests/wpt/") != std::string::npos) |
121 test_runner_->set_is_web_platform_tests_mode(); | 122 test_runner_->set_is_web_platform_tests_mode(); |
122 } | 123 } |
123 | 124 |
124 void TestInterfaces::WindowOpened(WebViewTestProxyBase* proxy) { | 125 void TestInterfaces::WindowOpened(WebViewTestProxyBase* proxy) { |
125 window_list_.push_back(proxy); | 126 window_list_.push_back(proxy); |
126 } | 127 } |
127 | 128 |
128 void TestInterfaces::WindowClosed(WebViewTestProxyBase* proxy) { | 129 void TestInterfaces::WindowClosed(WebViewTestProxyBase* proxy) { |
129 std::vector<WebViewTestProxyBase*>::iterator pos = | 130 std::vector<WebViewTestProxyBase*>::iterator pos = |
130 std::find(window_list_.begin(), window_list_.end(), proxy); | 131 std::find(window_list_.begin(), window_list_.end(), proxy); |
(...skipping 21 matching lines...) Expand all Loading... |
152 | 153 |
153 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { | 154 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { |
154 if (!test_runner_->UseMockTheme()) | 155 if (!test_runner_->UseMockTheme()) |
155 return 0; | 156 return 0; |
156 if (!theme_engine_.get()) | 157 if (!theme_engine_.get()) |
157 theme_engine_.reset(new MockWebThemeEngine()); | 158 theme_engine_.reset(new MockWebThemeEngine()); |
158 return theme_engine_.get(); | 159 return theme_engine_.get(); |
159 } | 160 } |
160 | 161 |
161 } // namespace test_runner | 162 } // namespace test_runner |
OLD | NEW |