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/renderer/test_runner/web_test_proxy.h" | 5 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
6 | 6 |
7 #include <cctype> | 7 #include <cctype> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "content/public/common/content_switches.h" | 16 #include "content/public/common/content_switches.h" |
17 #include "content/shell/renderer/test_runner/accessibility_controller.h" | 17 #include "content/shell/renderer/test_runner/accessibility_controller.h" |
18 #include "content/shell/renderer/test_runner/event_sender.h" | 18 #include "content/shell/renderer/test_runner/event_sender.h" |
19 #include "content/shell/renderer/test_runner/mock_color_chooser.h" | 19 #include "content/shell/renderer/test_runner/mock_color_chooser.h" |
20 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" | 20 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" |
21 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h" | 21 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h" |
22 #include "content/shell/renderer/test_runner/mock_web_push_client.h" | |
23 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h" | 22 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h" |
24 #include "content/shell/renderer/test_runner/mock_web_user_media_client.h" | 23 #include "content/shell/renderer/test_runner/mock_web_user_media_client.h" |
25 #include "content/shell/renderer/test_runner/spell_check_client.h" | 24 #include "content/shell/renderer/test_runner/spell_check_client.h" |
26 #include "content/shell/renderer/test_runner/test_interfaces.h" | 25 #include "content/shell/renderer/test_runner/test_interfaces.h" |
27 #include "content/shell/renderer/test_runner/test_plugin.h" | 26 #include "content/shell/renderer/test_runner/test_plugin.h" |
28 #include "content/shell/renderer/test_runner/test_runner.h" | 27 #include "content/shell/renderer/test_runner/test_runner.h" |
29 #include "content/shell/renderer/test_runner/web_test_delegate.h" | 28 #include "content/shell/renderer/test_runner/web_test_delegate.h" |
30 #include "content/shell/renderer/test_runner/web_test_interfaces.h" | 29 #include "content/shell/renderer/test_runner/web_test_interfaces.h" |
31 #include "content/shell/renderer/test_runner/web_test_runner.h" | 30 #include "content/shell/renderer/test_runner/web_test_runner.h" |
32 // FIXME: Including platform_canvas.h here is a layering violation. | 31 // FIXME: Including platform_canvas.h here is a layering violation. |
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 // If a composition text exists, then we need to let the browser process | 1322 // If a composition text exists, then we need to let the browser process |
1324 // to cancel the input method's ongoing composition session. | 1323 // to cancel the input method's ongoing composition session. |
1325 if (web_widget_) | 1324 if (web_widget_) |
1326 web_widget_->confirmComposition(); | 1325 web_widget_->confirmComposition(); |
1327 } | 1326 } |
1328 | 1327 |
1329 blink::WebString WebTestProxyBase::acceptLanguages() { | 1328 blink::WebString WebTestProxyBase::acceptLanguages() { |
1330 return blink::WebString::fromUTF8(accept_languages_); | 1329 return blink::WebString::fromUTF8(accept_languages_); |
1331 } | 1330 } |
1332 | 1331 |
1333 MockWebPushClient* WebTestProxyBase::GetPushClientMock() { | |
1334 if (!push_client_.get()) | |
1335 push_client_.reset(new MockWebPushClient); | |
1336 return push_client_.get(); | |
1337 } | |
1338 | |
1339 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { | |
1340 return GetPushClientMock(); | |
1341 } | |
1342 | |
1343 } // namespace content | 1332 } // namespace content |
OLD | NEW |