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

Unified Diff: chrome/test/automated_ui_tests/automated_ui_tests.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/test/automated_ui_tests/automated_ui_tests.cc
===================================================================
--- chrome/test/automated_ui_tests/automated_ui_tests.cc (revision 17078)
+++ chrome/test/automated_ui_tests/automated_ui_tests.cc (working copy)
@@ -591,7 +591,7 @@
}
bool AutomatedUITest::ForceCrash() {
- scoped_ptr<TabProxy> tab(GetActiveTab());
+ scoped_refptr<TabProxy> tab(GetActiveTab());
GURL test_url("about:crash");
bool did_timeout;
tab->NavigateToURLWithTimeout(test_url, kDebuggingTimeoutMsec, &did_timeout);
@@ -609,7 +609,7 @@
return false;
}
- scoped_ptr<WindowProxy> window(
+ scoped_refptr<WindowProxy> window(
GetAndActivateWindowForBrowser(browser));
if (window.get() == NULL) {
AddErrorAttribute("active_window_not_found");
@@ -688,7 +688,7 @@
return true;
}
-WindowProxy* AutomatedUITest::GetAndActivateWindowForBrowser(
+scoped_refptr<WindowProxy> AutomatedUITest::GetAndActivateWindowForBrowser(
BrowserProxy* browser) {
bool did_timeout;
if (!browser->BringToFrontWithTimeout(action_max_timeout_ms(),
@@ -697,13 +697,12 @@
return NULL;
}
- WindowProxy* window = browser->GetWindow();
- return window;
+ return browser->GetWindow();
}
bool AutomatedUITest::SimulateKeyPressInActiveWindow(wchar_t key, int flags) {
- scoped_ptr<WindowProxy> window(automation()->GetActiveWindow());
+ scoped_refptr<WindowProxy> window(automation()->GetActiveWindow());
if (window.get() == NULL) {
AddErrorAttribute("active_window_not_found");
return false;
« no previous file with comments | « chrome/test/automated_ui_tests/automated_ui_tests.h ('k') | chrome/test/automation/automation_handle_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698