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

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

Issue 5744005: Revert rev 69137 due to incorrect change log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/test_shell.gypi » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
38 #include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
39 #endif
40 #include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputControllerMock .h" 37 #include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputControllerMock .h"
41 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" 38 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
42 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" 39 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
43 #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" 40 #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h"
44 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" 41 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
45 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" 42 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
46 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" 43 #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
47 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" 44 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
48 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" 45 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
49 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" 46 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 void TestShell::SizeToDefault() { 640 void TestShell::SizeToDefault() {
644 SizeTo(kTestWindowWidth, kTestWindowHeight); 641 SizeTo(kTestWindowWidth, kTestWindowHeight);
645 } 642 }
646 643
647 void TestShell::ResetTestController() { 644 void TestShell::ResetTestController() {
648 accessibility_controller_->Reset(); 645 accessibility_controller_->Reset();
649 layout_test_controller_->Reset(); 646 layout_test_controller_->Reset();
650 event_sending_controller_->Reset(); 647 event_sending_controller_->Reset();
651 notification_presenter_->Reset(); 648 notification_presenter_->Reset();
652 delegate_->Reset(); 649 delegate_->Reset();
653 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
654 if (geolocation_client_mock_.get())
655 geolocation_client_mock_->resetMock();
656 #endif
657 } 650 }
658 651
659 void TestShell::LoadFile(const FilePath& file) { 652 void TestShell::LoadFile(const FilePath& file) {
660 LoadURLForFrame(net::FilePathToFileURL(file), std::wstring()); 653 LoadURLForFrame(net::FilePathToFileURL(file), std::wstring());
661 } 654 }
662 655
663 void TestShell::LoadURL(const GURL& url) { 656 void TestShell::LoadURL(const GURL& url) {
664 // Used as a sentinal for run_webkit_tests.py to know when to start reading 657 // Used as a sentinal for run_webkit_tests.py to know when to start reading
665 // test output for this test and so we know we're not getting out of sync. 658 // test output for this test and so we know we're not getting out of sync.
666 if (layout_test_mode_ && dump_when_finished_ && test_params()) 659 if (layout_test_mode_ && dump_when_finished_ && test_params())
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 speech_input_controller_mock_.reset( 779 speech_input_controller_mock_.reset(
787 WebKit::WebSpeechInputControllerMock::create(listener)); 780 WebKit::WebSpeechInputControllerMock::create(listener));
788 return speech_input_controller_mock_.get(); 781 return speech_input_controller_mock_.get();
789 } 782 }
790 783
791 WebKit::WebSpeechInputControllerMock* 784 WebKit::WebSpeechInputControllerMock*
792 TestShell::speech_input_controller_mock() { 785 TestShell::speech_input_controller_mock() {
793 return speech_input_controller_mock_.get(); 786 return speech_input_controller_mock_.get();
794 } 787 }
795 788
796 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
797 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() {
798 if (!geolocation_client_mock_.get()) {
799 geolocation_client_mock_.reset(
800 WebKit::WebGeolocationClientMock::create());
801 }
802 return geolocation_client_mock_.get();
803 }
804 #endif
805
806 //----------------------------------------------------------------------------- 789 //-----------------------------------------------------------------------------
807 790
808 namespace webkit_glue { 791 namespace webkit_glue {
809 792
810 void PrecacheUrl(const char16* url, int url_length) {} 793 void PrecacheUrl(const char16* url, int url_length) {}
811 794
812 void AppendToLog(const char* file, int line, const char* msg) { 795 void AppendToLog(const char* file, int line, const char* msg) {
813 logging::LogMessage(file, line).stream() << msg; 796 logging::LogMessage(file, line).stream() << msg;
814 } 797 }
815 798
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { 889 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
907 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { 890 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
908 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path); 891 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path);
909 plugins->erase(plugins->begin() + i); 892 plugins->erase(plugins->begin() + i);
910 } 893 }
911 } 894 }
912 } 895 }
913 } 896 }
914 897
915 } // namespace webkit_glue 898 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/test_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698