| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_UI_TEST_UTILS_H_ | 5 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // They can be ORed together. | 75 // They can be ORed together. |
| 76 // The order in which the waits happen when more than one is selected, is: | 76 // The order in which the waits happen when more than one is selected, is: |
| 77 // Browser | 77 // Browser |
| 78 // Tab | 78 // Tab |
| 79 // Navigation | 79 // Navigation |
| 80 enum BrowserTestWaitFlags { | 80 enum BrowserTestWaitFlags { |
| 81 BROWSER_TEST_NONE = 0, // Don't wait for anything. | 81 BROWSER_TEST_NONE = 0, // Don't wait for anything. |
| 82 BROWSER_TEST_WAIT_FOR_BROWSER = 1 << 0, // Wait for a new browser. | 82 BROWSER_TEST_WAIT_FOR_BROWSER = 1 << 0, // Wait for a new browser. |
| 83 BROWSER_TEST_WAIT_FOR_TAB = 1 << 1, // Wait for a new tab. | 83 BROWSER_TEST_WAIT_FOR_TAB = 1 << 1, // Wait for a new tab. |
| 84 BROWSER_TEST_WAIT_FOR_NAVIGATION = 1 << 2, // Wait for navigation to finish. | 84 BROWSER_TEST_WAIT_FOR_NAVIGATION = 1 << 2, // Wait for navigation to finish. |
| 85 BROWSER_TEST_WAIT_FOR_AUTH = 1 << 3, // Wait for auth prompt. |
| 85 | 86 |
| 86 BROWSER_TEST_MASK = BROWSER_TEST_WAIT_FOR_BROWSER | | 87 BROWSER_TEST_MASK = BROWSER_TEST_WAIT_FOR_BROWSER | |
| 87 BROWSER_TEST_WAIT_FOR_TAB | | 88 BROWSER_TEST_WAIT_FOR_TAB | |
| 88 BROWSER_TEST_WAIT_FOR_NAVIGATION | 89 BROWSER_TEST_WAIT_FOR_NAVIGATION |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 // Turns on nestable tasks, runs the message loop, then resets nestable tasks | 92 // Turns on nestable tasks, runs the message loop, then resets nestable tasks |
| 92 // to what they were originally. Prefer this over MessageLoop::Run for in | 93 // to what they were originally. Prefer this over MessageLoop::Run for in |
| 93 // process browser tests that need to block until a condition is met. | 94 // process browser tests that need to block until a condition is met. |
| 94 void RunMessageLoop(); | 95 void RunMessageLoop(); |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 // ui_controls_linux.cc and ui_controls_mac.cc | 638 // ui_controls_linux.cc and ui_controls_mac.cc |
| 638 void ClickTask(ui_controls::MouseButton button, | 639 void ClickTask(ui_controls::MouseButton button, |
| 639 int state, | 640 int state, |
| 640 const base::Closure& followup); | 641 const base::Closure& followup); |
| 641 | 642 |
| 642 } // namespace internal | 643 } // namespace internal |
| 643 | 644 |
| 644 } // namespace ui_test_utils | 645 } // namespace ui_test_utils |
| 645 | 646 |
| 646 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 647 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| OLD | NEW |