OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ | 5 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ |
6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ | 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "app/message_box_flags.h" | 10 #include "app/message_box_flags.h" |
11 #include "app/gfx/native_widget_types.h" | 11 #include "app/gfx/native_widget_types.h" |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "base/thread.h" | 16 #include "base/thread.h" |
17 #include "base/waitable_event.h" | 17 #include "base/waitable_event.h" |
18 #include "chrome/test/automation/automation_constants.h" | 18 #include "chrome/test/automation/automation_constants.h" |
19 #include "chrome/test/automation/automation_handle_tracker.h" | 19 #include "chrome/test/automation/automation_handle_tracker.h" |
| 20 #include "chrome/test/automation/browser_proxy.h" |
20 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
21 #include "ipc/ipc_channel_proxy.h" | 22 #include "ipc/ipc_channel_proxy.h" |
22 #include "ipc/ipc_message.h" | 23 #include "ipc/ipc_message.h" |
23 #include "ipc/ipc_sync_channel.h" | 24 #include "ipc/ipc_sync_channel.h" |
24 | 25 |
25 class BrowserProxy; | 26 class BrowserProxy; |
26 class TabProxy; | 27 class TabProxy; |
27 class WindowProxy; | 28 class WindowProxy; |
28 | 29 |
29 namespace IPC { | 30 namespace IPC { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // NOTE: this only fires once for a run of the application. | 80 // NOTE: this only fires once for a run of the application. |
80 // Returns true if the load is successful | 81 // Returns true if the load is successful |
81 bool WaitForInitialLoads(); | 82 bool WaitForInitialLoads(); |
82 | 83 |
83 // Waits for the initial destinations tab to report that it has finished | 84 // Waits for the initial destinations tab to report that it has finished |
84 // querying. |load_time| is filled in with how long it took, in milliseconds. | 85 // querying. |load_time| is filled in with how long it took, in milliseconds. |
85 // NOTE: this only fires once for a run of the application. | 86 // NOTE: this only fires once for a run of the application. |
86 // Returns true if the load is successful. | 87 // Returns true if the load is successful. |
87 bool WaitForInitialNewTabUILoad(int* load_time); | 88 bool WaitForInitialNewTabUILoad(int* load_time); |
88 | 89 |
89 // Open a new browser window, returning true on success. |show| | 90 // Open a new browser window of type |type|, returning true on success. |show| |
90 // identifies whether the window should be shown. | 91 // identifies whether the window should be shown. Returns true on success. |
91 // False likely indicates an IPC error. | 92 bool OpenNewBrowserWindow(BrowserProxy::Type type, bool show); |
92 bool OpenNewBrowserWindow(bool show); | |
93 | 93 |
94 // Fills the number of open browser windows into the given variable, returning | 94 // Fills the number of open browser windows into the given variable, returning |
95 // true on success. False likely indicates an IPC error. | 95 // true on success. False likely indicates an IPC error. |
96 bool GetBrowserWindowCount(int* num_windows); | 96 bool GetBrowserWindowCount(int* num_windows); |
97 | 97 |
98 // Block the thread until the window count becomes the provided value. | 98 // Block the thread until the window count becomes the provided value. |
99 // Returns true on success. | 99 // Returns true on success. |
100 bool WaitForWindowCountToBecome(int target_count, int wait_timeout); | 100 bool WaitForWindowCountToBecome(int target_count, int wait_timeout); |
101 | 101 |
102 // Fills the number of open normal browser windows (normal type and | 102 // Fills the number of open normal browser windows (normal type and |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // a version resource. | 273 // a version resource. |
274 bool perform_version_check_; | 274 bool perform_version_check_; |
275 | 275 |
276 // Delay to let the browser execute the command. | 276 // Delay to let the browser execute the command. |
277 base::TimeDelta command_execution_timeout_; | 277 base::TimeDelta command_execution_timeout_; |
278 | 278 |
279 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); | 279 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); |
280 }; | 280 }; |
281 | 281 |
282 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ | 282 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ |
OLD | NEW |