summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui_test_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/ui_test_utils.h')
-rw-r--r--chrome/test/ui_test_utils.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/chrome/test/ui_test_utils.h b/chrome/test/ui_test_utils.h
new file mode 100644
index 0000000..f0433b0
--- /dev/null
+++ b/chrome/test/ui_test_utils.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_TEST_UI_TEST_UTILS_H_
+#define CHROME_TEST_UI_TEST_UTILS_H_
+
+class Browser;
+class GURL;
+class NavigationController;
+
+// A collections of functions designed for use with InProcessBrowserTest.
+namespace ui_test_utils {
+
+// Turns on nestable tasks, runs the message loop, then resets nestable tasks
+// to what they were originally. Prefer this over MessageLoop::Run for in
+// process browser tests that need to block until a condition is met.
+void RunMessageLoop();
+
+// Waits for |controller| to complete a navigation. This blocks until
+// the navigation finishes.
+void WaitForNavigation(NavigationController* controller);
+
+// Navigates the selected tab of |browser| to |url|, blocking until the
+// navigation finishes.
+void NavigateToURL(Browser* browser, const GURL& url);
+
+}
+
+#endif // CHROME_TEST_UI_TEST_UTILS_H_