diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 22:06:22 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 22:06:22 +0000 |
commit | 50613309535025abb3bb030d5f13fac2fff235c6 (patch) | |
tree | 987484cd98074d92b5a4a7876bd1928bd643c7f7 /chrome/test/in_process_browser_test.h | |
parent | d5c4f386029ab19cec0f4d76bede0c4d2975d431 (diff) | |
download | chromium_src-50613309535025abb3bb030d5f13fac2fff235c6.zip chromium_src-50613309535025abb3bb030d5f13fac2fff235c6.tar.gz chromium_src-50613309535025abb3bb030d5f13fac2fff235c6.tar.bz2 |
Converted the browser focus interactive ui tests to be in process.
Some testing I did as part of my in-progress focus refactoring seemed to indicate they are flacky.
With this CL, they now mostly use the blocking calls when simulating UI actions (instead of relying on timers).
BUG=None
TEST=Run the tests BrowserFocusTest.* in the interactive tests.
Review URL: http://codereview.chromium.org/27083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10295 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/in_process_browser_test.h')
-rw-r--r-- | chrome/test/in_process_browser_test.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/test/in_process_browser_test.h b/chrome/test/in_process_browser_test.h index 230b8df..90dcdc9 100644 --- a/chrome/test/in_process_browser_test.h +++ b/chrome/test/in_process_browser_test.h @@ -5,7 +5,6 @@ #ifndef CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ #define CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ -#include "chrome/app/scoped_ole_initializer.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/notification_observer.h" #include "net/url_request/url_request_unittest.h" @@ -74,6 +73,11 @@ class InProcessBrowserTest : public testing::Test, public NotificationObserver { // This is invoked from Setup. virtual Browser* CreateBrowser(Profile* profile); + // Sets some test states (see below for comments). Call this in your test + // constructor. + void set_show_window(bool show) { show_window_ = show; } + void EnableDOMAutomation() { dom_automation_enabled_ = true; } + private: // Invokes CreateBrowser to create a browser, then RunTestOnMainThread, and // destroys the browser. @@ -88,7 +92,13 @@ class InProcessBrowserTest : public testing::Test, public NotificationObserver { // HTTPServer, created when StartHTTPServer is invoked. scoped_refptr<HTTPTestServer> http_server_; - ScopedOleInitializer ole_initializer_; + // Whether this test requires the browser windows to be shown (interactive + // tests for example need the windows shown). + bool show_window_; + + // Whether the JavaScript can access the DOMAutomationController (a JS object + // that can send messages back to the browser). + bool dom_automation_enabled_; DISALLOW_COPY_AND_ASSIGN(InProcessBrowserTest); }; |