diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 19:12:46 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 19:12:46 +0000 |
commit | 802376eb9aacca5284b76da93face73a9488bdb6 (patch) | |
tree | 705226a6750fed9a1429aaf07fe9c0a03303c759 /chrome/browser/unload_uitest.cc | |
parent | 319d4ae6c8b2236fa7e0acf218c533a5a93af5a6 (diff) | |
download | chromium_src-802376eb9aacca5284b76da93face73a9488bdb6.zip chromium_src-802376eb9aacca5284b76da93face73a9488bdb6.tar.gz chromium_src-802376eb9aacca5284b76da93face73a9488bdb6.tar.bz2 |
Make automation proxy objects to ref_counted. That allows to process async notifications directly in channel background thread. Add support for listener-less ChannelProxy.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/113722
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/unload_uitest.cc')
-rw-r--r-- | chrome/browser/unload_uitest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc index baaa496..dd2a56c 100644 --- a/chrome/browser/unload_uitest.cc +++ b/chrome/browser/unload_uitest.cc @@ -146,7 +146,7 @@ class UnloadTest : public UITest { void LoadUrlAndQuitBrowser(const std::string& html_content, const std::wstring& expected_title = L"") { - scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); + scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); NavigateToDataURL(html_content, expected_title); bool application_closed = false; EXPECT_TRUE(CloseBrowser(browser.get(), &application_closed)); @@ -239,7 +239,7 @@ TEST_F(UnloadTest, BrowserCloseUnload) { // Tests closing the browser with a beforeunload handler and clicking // OK in the beforeunload confirm dialog. TEST_F(UnloadTest, BrowserCloseBeforeUnloadOK) { - scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); + scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); NavigateToDataURL(BEFORE_UNLOAD_HTML, L"beforeunload"); CloseBrowserAsync(browser.get()); @@ -251,7 +251,7 @@ TEST_F(UnloadTest, BrowserCloseBeforeUnloadOK) { // Tests closing the browser with a beforeunload handler and clicking // CANCEL in the beforeunload confirm dialog. TEST_F(UnloadTest, BrowserCloseBeforeUnloadCancel) { - scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); + scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); NavigateToDataURL(BEFORE_UNLOAD_HTML, L"beforeunload"); CloseBrowserAsync(browser.get()); @@ -336,26 +336,26 @@ TEST_F(UnloadTest, BrowserCloseTabWhenOtherTabHasListener) { automation()->GetBrowserWindowCount(&window_count); ASSERT_EQ(2, window_count); - scoped_ptr<BrowserProxy> popup_browser_proxy( + scoped_refptr<BrowserProxy> popup_browser_proxy( automation()->GetBrowserWindow(1)); ASSERT_TRUE(popup_browser_proxy.get()); int popup_tab_count; EXPECT_TRUE(popup_browser_proxy->GetTabCount(&popup_tab_count)); EXPECT_EQ(1, popup_tab_count); - scoped_ptr<TabProxy> popup_tab(popup_browser_proxy->GetActiveTab()); + scoped_refptr<TabProxy> popup_tab(popup_browser_proxy->GetActiveTab()); std::wstring popup_title; ASSERT_TRUE(popup_tab.get() != NULL); EXPECT_TRUE(popup_tab->GetTabTitle(&popup_title)); EXPECT_EQ(std::wstring(L"popup"), popup_title); EXPECT_TRUE(popup_tab->Close(true)); - scoped_ptr<BrowserProxy> main_browser_proxy( + scoped_refptr<BrowserProxy> main_browser_proxy( automation()->GetBrowserWindow(0)); ASSERT_TRUE(main_browser_proxy.get()); int main_tab_count; EXPECT_TRUE(main_browser_proxy->GetTabCount(&main_tab_count)); EXPECT_EQ(1, main_tab_count); - scoped_ptr<TabProxy> main_tab(main_browser_proxy->GetActiveTab()); + scoped_refptr<TabProxy> main_tab(main_browser_proxy->GetActiveTab()); std::wstring main_title; ASSERT_TRUE(main_tab.get() != NULL); EXPECT_TRUE(main_tab->GetTabTitle(&main_title)); |