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

Side by Side Diff: chrome/test/webdriver/webdriver_automation.cc

Issue 15836003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/reliability/page_load_test.cc ('k') | chrome/utility/profile_import_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/webdriver/webdriver_automation.h" 5 #include "chrome/test/webdriver/webdriver_automation.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 if (!view_id.old_style()) { 785 if (!view_id.old_style()) {
786 AutomationMsg_NavigationResponseValues navigate_response; 786 AutomationMsg_NavigationResponseValues navigate_response;
787 if (!SendNavigateToURLJSONRequest(automation(), view_locator, url, 787 if (!SendNavigateToURLJSONRequest(automation(), view_locator, url,
788 0, &navigate_response, &auto_error)) { 788 0, &navigate_response, &auto_error)) {
789 *error = Error::FromAutomationError(auto_error); 789 *error = Error::FromAutomationError(auto_error);
790 return; 790 return;
791 } 791 }
792 } else { 792 } else {
793 scoped_refptr<BrowserProxy> browser = 793 scoped_refptr<BrowserProxy> browser =
794 automation()->GetBrowserWindow(view_locator.browser_index()); 794 automation()->GetBrowserWindow(view_locator.browser_index());
795 if (!browser) { 795 if (!browser.get()) {
796 *error = new Error(kUnknownError, "Couldn't obtain browser proxy"); 796 *error = new Error(kUnknownError, "Couldn't obtain browser proxy");
797 return; 797 return;
798 } 798 }
799 scoped_refptr<TabProxy> tab = browser->GetTab(view_locator.tab_index()); 799 scoped_refptr<TabProxy> tab = browser->GetTab(view_locator.tab_index());
800 if (!tab) { 800 if (!tab.get()) {
801 *error = new Error(kUnknownError, "Couldn't obtain tab proxy"); 801 *error = new Error(kUnknownError, "Couldn't obtain tab proxy");
802 return; 802 return;
803 } 803 }
804 if (!tab->NavigateToURLAsync(GURL(url))) { 804 if (!tab->NavigateToURLAsync(GURL(url))) {
805 *error = new Error(kUnknownError, "Unable to navigate to url"); 805 *error = new Error(kUnknownError, "Unable to navigate to url");
806 return; 806 return;
807 } 807 }
808 } 808 }
809 } 809 }
810 810
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 } 1207 }
1208 1208
1209 Error* Automation::CheckMaximizeSupported() { 1209 Error* Automation::CheckMaximizeSupported() {
1210 const char* message = 1210 const char* message =
1211 "Maximize automation interface is not supported for this version of " 1211 "Maximize automation interface is not supported for this version of "
1212 "Chrome."; 1212 "Chrome.";
1213 return CheckVersion(1160, message); 1213 return CheckVersion(1160, message);
1214 } 1214 }
1215 1215
1216 } // namespace webdriver 1216 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/reliability/page_load_test.cc ('k') | chrome/utility/profile_import_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698