Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1946)

Unified Diff: chrome/browser/unload_uitest.cc

Issue 113722: Make automation proxy objects to ref_counted. That allows to process async no... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/unload_uitest.cc
===================================================================
--- chrome/browser/unload_uitest.cc (revision 17078)
+++ chrome/browser/unload_uitest.cc (working copy)
@@ -146,7 +146,7 @@
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 @@
// 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 @@
// 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 @@
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));
« no previous file with comments | « chrome/browser/tab_restore_uitest.cc ('k') | chrome/browser/views/constrained_window_impl_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698