OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome_frame/test/net/fake_external_tab.h" | 5 #include "chrome_frame/test/net/fake_external_tab.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlcom.h> | 8 #include <atlcom.h> |
9 #include <exdisp.h> | 9 #include <exdisp.h> |
10 | 10 |
11 #include "app/app_paths.h" | 11 #include "app/app_paths.h" |
12 #include "app/win/scoped_com_initializer.h" | 12 #include "app/win/scoped_com_initializer.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/debug/debugger.h" | 14 #include "base/debug/debugger.h" |
15 #include "base/file_util.h" | 15 #include "base/file_util.h" |
16 #include "base/file_version_info.h" | 16 #include "base/file_version_info.h" |
17 #include "base/i18n/icu_util.h" | 17 #include "base/i18n/icu_util.h" |
18 #include "base/path_service.h" | 18 #include "base/path_service.h" |
19 #include "base/scoped_comptr_win.h" | |
20 #include "base/string_util.h" | 19 #include "base/string_util.h" |
21 #include "base/stringprintf.h" | 20 #include "base/stringprintf.h" |
22 #include "base/threading/platform_thread.h" | 21 #include "base/threading/platform_thread.h" |
| 22 #include "base/win/scoped_comptr.h" |
23 #include "base/win/scoped_handle.h" | 23 #include "base/win/scoped_handle.h" |
24 #include "chrome/browser/automation/automation_provider_list.h" | 24 #include "chrome/browser/automation/automation_provider_list.h" |
25 #include "chrome/browser/chrome_content_browser_client.h" | 25 #include "chrome/browser/chrome_content_browser_client.h" |
26 #include "chrome/renderer/chrome_content_renderer_client.h" | |
27 #include "chrome/browser/prefs/browser_prefs.h" | 26 #include "chrome/browser/prefs/browser_prefs.h" |
28 #include "chrome/browser/prefs/pref_service.h" | 27 #include "chrome/browser/prefs/pref_service.h" |
29 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 28 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
30 #include "chrome/browser/process_singleton.h" | 29 #include "chrome/browser/process_singleton.h" |
31 #include "chrome/browser/profiles/profile_manager.h" | 30 #include "chrome/browser/profiles/profile_manager.h" |
32 #include "chrome/browser/renderer_host/web_cache_manager.h" | 31 #include "chrome/browser/renderer_host/web_cache_manager.h" |
33 #include "chrome/common/chrome_constants.h" | 32 #include "chrome/common/chrome_constants.h" |
34 #include "chrome/common/chrome_content_client.h" | 33 #include "chrome/common/chrome_content_client.h" |
35 #include "chrome/common/chrome_paths.h" | 34 #include "chrome/common/chrome_paths.h" |
36 #include "chrome/common/chrome_paths_internal.h" | 35 #include "chrome/common/chrome_paths_internal.h" |
37 #include "chrome/common/chrome_switches.h" | 36 #include "chrome/common/chrome_switches.h" |
38 #include "chrome/common/pref_names.h" | 37 #include "chrome/common/pref_names.h" |
| 38 #include "chrome/renderer/chrome_content_renderer_client.h" |
39 #include "chrome_frame/test/chrome_frame_test_utils.h" | 39 #include "chrome_frame/test/chrome_frame_test_utils.h" |
40 #include "chrome_frame/test/net/test_automation_resource_message_filter.h" | 40 #include "chrome_frame/test/net/test_automation_resource_message_filter.h" |
41 #include "chrome_frame/test/simulate_input.h" | 41 #include "chrome_frame/test/simulate_input.h" |
42 #include "chrome_frame/test/win_event_receiver.h" | 42 #include "chrome_frame/test/win_event_receiver.h" |
43 #include "chrome_frame/utils.h" | 43 #include "chrome_frame/utils.h" |
44 #include "content/browser/plugin_service.h" | 44 #include "content/browser/plugin_service.h" |
45 #include "content/browser/renderer_host/render_process_host.h" | 45 #include "content/browser/renderer_host/render_process_host.h" |
46 #include "content/common/content_client.h" | 46 #include "content/common/content_client.h" |
47 #include "content/common/content_paths.h" | 47 #include "content/common/content_paths.h" |
48 #include "content/common/notification_service.h" | 48 #include "content/common/notification_service.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 // Uses the IAccessible interface for the window to set the focus. | 85 // Uses the IAccessible interface for the window to set the focus. |
86 // This can be useful when you don't have control over the thread that | 86 // This can be useful when you don't have control over the thread that |
87 // owns the window. | 87 // owns the window. |
88 // NOTE: this depends on oleacc.lib which the net tests already depend on | 88 // NOTE: this depends on oleacc.lib which the net tests already depend on |
89 // but other unit tests don't depend on oleacc so we can't just add the method | 89 // but other unit tests don't depend on oleacc so we can't just add the method |
90 // directly into chrome_frame_test_utils.cc (without adding a | 90 // directly into chrome_frame_test_utils.cc (without adding a |
91 // #pragma comment(lib, "oleacc.lib")). | 91 // #pragma comment(lib, "oleacc.lib")). |
92 bool SetFocusToAccessibleWindow(HWND hwnd) { | 92 bool SetFocusToAccessibleWindow(HWND hwnd) { |
93 bool ret = false; | 93 bool ret = false; |
94 ScopedComPtr<IAccessible> acc; | 94 base::win::ScopedComPtr<IAccessible> acc; |
95 AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible, | 95 AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible, |
96 reinterpret_cast<void**>(acc.Receive())); | 96 reinterpret_cast<void**>(acc.Receive())); |
97 if (acc) { | 97 if (acc) { |
98 VARIANT self = { VT_I4 }; | 98 VARIANT self = { VT_I4 }; |
99 self.lVal = CHILDID_SELF; | 99 self.lVal = CHILDID_SELF; |
100 ret = SUCCEEDED(acc->accSelect(SELFLAG_TAKEFOCUS, self)); | 100 ret = SUCCEEDED(acc->accSelect(SELFLAG_TAKEFOCUS, self)); |
101 } | 101 } |
102 return ret; | 102 return ret; |
103 } | 103 } |
104 | 104 |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 | 511 |
512 WindowWatchdog watchdog; | 512 WindowWatchdog watchdog; |
513 // See url_request_unittest.cc for these credentials. | 513 // See url_request_unittest.cc for these credentials. |
514 SupplyProxyCredentials credentials("user", "secret"); | 514 SupplyProxyCredentials credentials("user", "secret"); |
515 watchdog.AddObserver(&credentials, "Windows Security", ""); | 515 watchdog.AddObserver(&credentials, "Windows Security", ""); |
516 testing::InitGoogleTest(&argc, argv); | 516 testing::InitGoogleTest(&argc, argv); |
517 FilterDisabledTests(); | 517 FilterDisabledTests(); |
518 test_suite.RunMainUIThread(); | 518 test_suite.RunMainUIThread(); |
519 return 0; | 519 return 0; |
520 } | 520 } |
OLD | NEW |