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/browser_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/browser_uitest.cc')
-rw-r--r-- | chrome/browser/browser_uitest.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc index 4feb635..3b2437a 100644 --- a/chrome/browser/browser_uitest.cc +++ b/chrome/browser/browser_uitest.cc @@ -42,8 +42,8 @@ class BrowserTest : public UITest { protected: #if defined(OS_WIN) HWND GetMainWindow() { - scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); - scoped_ptr<WindowProxy> window(browser->GetWindow()); + scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); + scoped_refptr<WindowProxy> window(browser->GetWindow()); HWND window_handle; EXPECT_TRUE(window->GetHWND(&window_handle)); @@ -52,8 +52,8 @@ class BrowserTest : public UITest { #endif std::wstring GetWindowTitle() { - scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); - scoped_ptr<WindowProxy> window(browser->GetWindow()); + scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); + scoped_refptr<WindowProxy> window(browser->GetWindow()); string16 title; EXPECT_TRUE(window->GetWindowTitle(&title)); @@ -104,7 +104,7 @@ TEST_F(BrowserTest, ThirtyFourTabs) { FilePath test_file(test_data_directory_); test_file = test_file.AppendASCII("title2.html"); GURL url(net::FilePathToFileURL(test_file)); - scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); + scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); // There is one initial tab. for (int ix = 0; ix != 33; ++ix) { EXPECT_TRUE(window->AppendTab(url)); @@ -167,13 +167,13 @@ TEST_F(BrowserTest, WindowsSessionEnd) { // This test is flakey, see bug 5668 for details. TEST_F(BrowserTest, DISABLED_JavascriptAlertActivatesTab) { - scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); + scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); int start_index; ASSERT_TRUE(window->GetActiveTabIndex(&start_index)); ASSERT_TRUE(window->AppendTab(GURL("about:blank"))); int javascript_tab_index; ASSERT_TRUE(window->GetActiveTabIndex(&javascript_tab_index)); - TabProxy* javascript_tab = window->GetActiveTab(); + scoped_refptr<TabProxy> javascript_tab = window->GetActiveTab(); // Switch back to the starting tab, then send the second tab a javascript // alert, which should force it to become active. ASSERT_TRUE(window->ActivateTab(start_index)); @@ -200,8 +200,8 @@ TEST_F(BrowserTest, NullOpenerRedirectForksProcess) { HTTPTestServer::CreateServer(kDocRoot, NULL); ASSERT_TRUE(NULL != server.get()); FilePath test_file(test_data_directory_); - scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); - scoped_ptr<TabProxy> tab(window->GetActiveTab()); + scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); + scoped_refptr<TabProxy> tab(window->GetActiveTab()); // Start with a file:// url test_file = test_file.AppendASCII("title2.html"); @@ -242,8 +242,8 @@ TEST_F(BrowserTest, OtherRedirectsDontForkProcess) { HTTPTestServer::CreateServer(kDocRoot, NULL); ASSERT_TRUE(NULL != server.get()); FilePath test_file(test_data_directory_); - scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); - scoped_ptr<TabProxy> tab(window->GetActiveTab()); + scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); + scoped_refptr<TabProxy> tab(window->GetActiveTab()); // Start with a file:// url test_file = test_file.AppendASCII("title2.html"); |