diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-30 17:05:18 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-30 17:05:18 +0000 |
commit | 9e00e635121e693b18dc0d5e9b973753febe111d (patch) | |
tree | 90e473e6f206b29aaee9af9bdcd9737a1d012828 /content/test/content_browser_test_utils.h | |
parent | 39647bb1973a525fc204f127ad573ea0a655d8f6 (diff) | |
download | chromium_src-9e00e635121e693b18dc0d5e9b973753febe111d.zip chromium_src-9e00e635121e693b18dc0d5e9b973753febe111d.tar.gz chromium_src-9e00e635121e693b18dc0d5e9b973753febe111d.tar.bz2 |
Port the render_view_host_manager_browsertest.cc to content_browsertests.
BUG=90448
Review URL: https://chromiumcodereview.appspot.com/10831056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148962 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test/content_browser_test_utils.h')
-rw-r--r-- | content/test/content_browser_test_utils.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/content/test/content_browser_test_utils.h b/content/test/content_browser_test_utils.h index b64f048..9ea40a5 100644 --- a/content/test/content_browser_test_utils.h +++ b/content/test/content_browser_test_utils.h @@ -5,6 +5,7 @@ #ifndef CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_ #define CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_ +#include "base/memory/ref_counted.h" #include "googleurl/src/gurl.h" #include "ui/gfx/native_widget_types.h" @@ -20,6 +21,7 @@ class Rect; namespace content { +class MessageLoopRunner; class Shell; // Generate the file path for testing a particular test. @@ -47,6 +49,26 @@ void NavigateToURLBlockUntilNavigationsComplete(Shell* window, // Wait until an application modal dialog is requested. void WaitForAppModalDialog(Shell* window); +// Used to wait for a new Shell window to be created. Instantiate this object +// before the operation that will create the window. +class ShellAddedObserver { + public: + ShellAddedObserver(); + ~ShellAddedObserver(); + + // Will run a message loop to wait for the new window if it hasn't been + // created since the constructor. + Shell* GetShell(); + + private: + void ShellCreated(Shell* shell); + + Shell* shell_; + scoped_refptr<MessageLoopRunner> runner_; + + DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); +}; + #if defined OS_MACOSX void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); #endif |