diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 23:52:34 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 23:52:34 +0000 |
commit | b782578e971100daacb017679bb470bd1941da0c (patch) | |
tree | 174b60cf83c04262bf21d8aa28560cc05c806891 /chrome/browser/browser_uitest.cc | |
parent | f081bbf106d0e49697a4b2dd354d356488072e9e (diff) | |
download | chromium_src-b782578e971100daacb017679bb470bd1941da0c.zip chromium_src-b782578e971100daacb017679bb470bd1941da0c.tar.gz chromium_src-b782578e971100daacb017679bb470bd1941da0c.tar.bz2 |
Drop whitespace at end of line
Fix formatting for initializer list
Use ASSERT_GE when appropriate
Don't #include a header twice
etc
Review URL: http://codereview.chromium.org/28137
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_uitest.cc')
-rw-r--r-- | chrome/browser/browser_uitest.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc index 64acd36..a30016a 100644 --- a/chrome/browser/browser_uitest.cc +++ b/chrome/browser/browser_uitest.cc @@ -31,22 +31,22 @@ std::wstring WindowCaptionFromPageTitle(std::wstring page_title) { class BrowserTest : public UITest { protected: - HWND GetMainWindow() { - scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); - scoped_ptr<WindowProxy> window(browser->GetWindow()); - - HWND window_handle; - EXPECT_TRUE(window->GetHWND(&window_handle)); - return window_handle; - } - - std::wstring GetWindowTitle() { - HWND window_handle = GetMainWindow(); - std::wstring result; - int length = ::GetWindowTextLength(window_handle) + 1; - ::GetWindowText(window_handle, WriteInto(&result, length), length); - return result; - } + HWND GetMainWindow() { + scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); + scoped_ptr<WindowProxy> window(browser->GetWindow()); + + HWND window_handle; + EXPECT_TRUE(window->GetHWND(&window_handle)); + return window_handle; + } + + std::wstring GetWindowTitle() { + HWND window_handle = GetMainWindow(); + std::wstring result; + int length = ::GetWindowTextLength(window_handle) + 1; + ::GetWindowText(window_handle, WriteInto(&result, length), length); + return result; + } }; class VisibleBrowserTest : public UITest { @@ -196,7 +196,7 @@ TEST_F(BrowserTest, NullOpenerRedirectForksProcess) { int orig_tab_count = -1; ASSERT_TRUE(window->GetTabCount(&orig_tab_count)); int orig_process_count = GetBrowserProcessCount(); - ASSERT_TRUE(orig_process_count >= 1); + ASSERT_GE(orig_process_count, 1); // Use JavaScript URL to "fork" a new tab, just like Gmail. (Open tab to a // blank page, set its opener to null, and redirect it cross-site.) @@ -236,7 +236,7 @@ TEST_F(BrowserTest, OtherRedirectsDontForkProcess) { int orig_tab_count = -1; ASSERT_TRUE(window->GetTabCount(&orig_tab_count)); int orig_process_count = GetBrowserProcessCount(); - ASSERT_TRUE(orig_process_count >= 1); + ASSERT_GE(orig_process_count, 1); // Use JavaScript URL to almost fork a new tab, but not quite. (Leave the // opener non-null.) Should not fork a process. |