Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: webkit/tools/test_shell/test_shell.cc

Issue 3466019: Adds speech input mock methods to TestShell. (Closed)
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #undef LOG 5 #undef LOG
6 6
7 #include "webkit/tools/test_shell/test_shell.h" 7 #include "webkit/tools/test_shell/test_shell.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 16 matching lines...) Expand all
27 #include "grit/webkit_strings.h" 27 #include "grit/webkit_strings.h"
28 #include "net/base/mime_util.h" 28 #include "net/base/mime_util.h"
29 #include "net/base/net_util.h" 29 #include "net/base/net_util.h"
30 #include "net/url_request/url_request_file_job.h" 30 #include "net/url_request/url_request_file_job.h"
31 #include "net/url_request/url_request_filter.h" 31 #include "net/url_request/url_request_filter.h"
32 #include "skia/ext/bitmap_platform_device.h" 32 #include "skia/ext/bitmap_platform_device.h"
33 #include "testing/gtest/include/gtest/gtest.h" 33 #include "testing/gtest/include/gtest/gtest.h"
34 #include "third_party/skia/include/core/SkBitmap.h" 34 #include "third_party/skia/include/core/SkBitmap.h"
35 #include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h" 35 #include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h"
36 #include "third_party/WebKit/WebKit/chromium/public/WebDeviceOrientationClientMo ck.h" 36 #include "third_party/WebKit/WebKit/chromium/public/WebDeviceOrientationClientMo ck.h"
37 #include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputControllerMock .h"
37 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" 38 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
38 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" 39 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
39 #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" 40 #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h"
40 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" 41 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
41 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" 42 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
42 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" 43 #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
43 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" 44 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
44 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" 45 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
45 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" 46 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
46 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 47 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 759
759 WebKit::WebDeviceOrientationClientMock* 760 WebKit::WebDeviceOrientationClientMock*
760 TestShell::device_orientation_client_mock() { 761 TestShell::device_orientation_client_mock() {
761 if (!device_orientation_client_mock_.get()) { 762 if (!device_orientation_client_mock_.get()) {
762 device_orientation_client_mock_.reset( 763 device_orientation_client_mock_.reset(
763 WebKit::WebDeviceOrientationClientMock::create()); 764 WebKit::WebDeviceOrientationClientMock::create());
764 } 765 }
765 return device_orientation_client_mock_.get(); 766 return device_orientation_client_mock_.get();
766 } 767 }
767 768
769 WebKit::WebSpeechInputControllerMock*
770 TestShell::CreateSpeechInputControllerMock(
771 WebKit::WebSpeechInputListener* listener) {
772 DCHECK(!speech_input_controller_mock_.get());
773 speech_input_controller_mock_.reset(
774 WebKit::WebSpeechInputControllerMock::create(listener));
775 return speech_input_controller_mock_.get();
776 }
777
778 WebKit::WebSpeechInputControllerMock*
779 TestShell::speech_input_controller_mock() {
780 return speech_input_controller_mock_.get();
781 }
782
768 //----------------------------------------------------------------------------- 783 //-----------------------------------------------------------------------------
769 784
770 namespace webkit_glue { 785 namespace webkit_glue {
771 786
772 void PrecacheUrl(const char16* url, int url_length) {} 787 void PrecacheUrl(const char16* url, int url_length) {}
773 788
774 void AppendToLog(const char* file, int line, const char* msg) { 789 void AppendToLog(const char* file, int line, const char* msg) {
775 logging::LogMessage(file, line).stream() << msg; 790 logging::LogMessage(file, line).stream() << msg;
776 } 791 }
777 792
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 return -1; 860 return -1;
846 } 861 }
847 862
848 bool GetFontTable(int fd, uint32_t table, uint8_t* output, 863 bool GetFontTable(int fd, uint32_t table, uint8_t* output,
849 size_t* output_length) { 864 size_t* output_length) {
850 return false; 865 return false;
851 } 866 }
852 #endif 867 #endif
853 868
854 } // namespace webkit_glue 869 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698