summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-24 04:41:54 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-24 04:41:54 +0000
commitd59b315cc7b1f662eb6d312311bf0d63fdeee40c (patch)
treebec631d61f301dc6b8621e4c6a32564856db67dd /chrome/test
parent450d54eceb47146fb4fd9af724a8589e0c1baa69 (diff)
downloadchromium_src-d59b315cc7b1f662eb6d312311bf0d63fdeee40c.zip
chromium_src-d59b315cc7b1f662eb6d312311bf0d63fdeee40c.tar.gz
chromium_src-d59b315cc7b1f662eb6d312311bf0d63fdeee40c.tar.bz2
basic browser tests for compact navigation bar.
* Tests if Browser::ToggleCompactNavigationBar() turns on/off compact navigation bar and tool bar. * Tests if the accelerator works. BUG=http://crosbug.com/2028 TEST=new tests CompactNativationBarTest.TestBasic/TestAccelerator should pass. Review URL: http://codereview.chromium.org/1200001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/in_process_browser_test.cc6
-rw-r--r--chrome/test/in_process_browser_test.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index 3f4ce39..5afcfc2 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -315,3 +315,9 @@ void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) {
DCHECK_GT(timeout_value, 0);
initial_timeout_ = timeout_value;
}
+
+void InProcessBrowserTest::RunAllPendingEvents() {
+ MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
+ ui_test_utils::RunMessageLoop();
+}
+
diff --git a/chrome/test/in_process_browser_test.h b/chrome/test/in_process_browser_test.h
index 6e922d9..dfcf6d6 100644
--- a/chrome/test/in_process_browser_test.h
+++ b/chrome/test/in_process_browser_test.h
@@ -114,6 +114,9 @@ class InProcessBrowserTest : public testing::Test {
void EnableDOMAutomation() { dom_automation_enabled_ = true; }
void EnableSingleProcess() { single_process_ = true; }
+ // Run all pending events in the message loop.
+ void RunAllPendingEvents();
+
private:
// Invokes CreateBrowser to create a browser, then RunTestOnMainThread, and
// destroys the browser.