| 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 "components/test_runner/test_interfaces.h" | 5 #include "components/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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 settings.SetString("testPath", base::GetQuotedJSONString(spec)); | 105 settings.SetString("testPath", base::GetQuotedJSONString(spec)); |
| 106 std::string settings_string; | 106 std::string settings_string; |
| 107 base::JSONWriter::Write(settings, &settings_string); | 107 base::JSONWriter::Write(settings, &settings_string); |
| 108 test_runner_->ShowDevTools(settings_string, std::string()); | 108 test_runner_->ShowDevTools(settings_string, std::string()); |
| 109 } | 109 } |
| 110 if (spec.find("/viewsource/") != std::string::npos) { | 110 if (spec.find("/viewsource/") != std::string::npos) { |
| 111 test_runner_->setShouldEnableViewSource(true); | 111 test_runner_->setShouldEnableViewSource(true); |
| 112 test_runner_->setShouldGeneratePixelResults(false); | 112 test_runner_->setShouldGeneratePixelResults(false); |
| 113 test_runner_->setShouldDumpAsMarkup(true); | 113 test_runner_->setShouldDumpAsMarkup(true); |
| 114 } | 114 } |
| 115 if (spec.find("/imported/wpt/") != std::string::npos || |
| 116 spec.find("/imported/csswg-test/") != std::string::npos) |
| 117 test_runner_->set_is_web_platform_tests_mode(); |
| 115 } | 118 } |
| 116 | 119 |
| 117 void TestInterfaces::SetAppBannerClient(AppBannerClient* app_banner_client) { | 120 void TestInterfaces::SetAppBannerClient(AppBannerClient* app_banner_client) { |
| 118 app_banner_client_ = app_banner_client; | 121 app_banner_client_ = app_banner_client; |
| 119 } | 122 } |
| 120 | 123 |
| 121 void TestInterfaces::WindowOpened(WebTestProxyBase* proxy) { | 124 void TestInterfaces::WindowOpened(WebTestProxyBase* proxy) { |
| 122 window_list_.push_back(proxy); | 125 window_list_.push_back(proxy); |
| 123 } | 126 } |
| 124 | 127 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 153 if (!theme_engine_.get()) | 156 if (!theme_engine_.get()) |
| 154 theme_engine_.reset(new MockWebThemeEngine()); | 157 theme_engine_.reset(new MockWebThemeEngine()); |
| 155 return theme_engine_.get(); | 158 return theme_engine_.get(); |
| 156 } | 159 } |
| 157 | 160 |
| 158 AppBannerClient* TestInterfaces::GetAppBannerClient() { | 161 AppBannerClient* TestInterfaces::GetAppBannerClient() { |
| 159 return app_banner_client_; | 162 return app_banner_client_; |
| 160 } | 163 } |
| 161 | 164 |
| 162 } // namespace test_runner | 165 } // namespace test_runner |
| OLD | NEW |