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

Unified Diff: chrome/browser/browser_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
« no previous file with comments | « no previous file | chrome/browser/crash_recovery_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_uitest.cc
===================================================================
--- chrome/browser/browser_uitest.cc (revision 17078)
+++ chrome/browser/browser_uitest.cc (working copy)
@@ -42,8 +42,8 @@
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 @@
#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 @@
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 @@
// 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 @@
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 @@
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");
« no previous file with comments | « no previous file | chrome/browser/crash_recovery_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698