OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
6 #include "base/string_number_conversions.h" | 6 #include "base/string_number_conversions.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/test/automation/extension_proxy.h" | 9 #include "chrome/test/automation/extension_proxy.h" |
10 #include "chrome/test/automation/tab_proxy.h" | 10 #include "chrome/test/automation/tab_proxy.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 void PyUITestBase::TearDown() { | 68 void PyUITestBase::TearDown() { |
69 UITestBase::TearDown(); | 69 UITestBase::TearDown(); |
70 } | 70 } |
71 | 71 |
72 void PyUITestBase::NavigateToURL(const char* url_string) { | 72 void PyUITestBase::NavigateToURL(const char* url_string) { |
73 GURL url(url_string); | 73 GURL url(url_string); |
74 UITestBase::NavigateToURL(url); | 74 UITestBase::NavigateToURL(url); |
75 } | 75 } |
76 | 76 |
| 77 void PyUITestBase::NavigateToURL(const char* url_string, int window_index) { |
| 78 GURL url(url_string); |
| 79 UITestBase::NavigateToURL(url, window_index); |
| 80 } |
| 81 |
77 void PyUITestBase::NavigateToURL( | 82 void PyUITestBase::NavigateToURL( |
78 const char* url_string, int window_index, int tab_index) { | 83 const char* url_string, int window_index, int tab_index) { |
79 GURL url(url_string); | 84 GURL url(url_string); |
80 UITestBase::NavigateToURL(url, window_index, tab_index); | 85 UITestBase::NavigateToURL(url, window_index, tab_index); |
81 } | 86 } |
82 | 87 |
83 void PyUITestBase::ReloadActiveTab(int window_index) { | 88 void PyUITestBase::ReloadActiveTab(int window_index) { |
84 scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); | 89 scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); |
85 ASSERT_TRUE(tab_proxy.get()); | 90 ASSERT_TRUE(tab_proxy.get()); |
86 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab_proxy->Reload()); | 91 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab_proxy->Reload()); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 // TODO(phadjan.jr): figure out a way to unambiguously report error. | 378 // TODO(phadjan.jr): figure out a way to unambiguously report error. |
374 if (!browser_proxy.get()) | 379 if (!browser_proxy.get()) |
375 return cookie_val; | 380 return cookie_val; |
376 scoped_refptr<TabProxy> tab_proxy = browser_proxy->GetTab(tab_index); | 381 scoped_refptr<TabProxy> tab_proxy = browser_proxy->GetTab(tab_index); |
377 EXPECT_TRUE(tab_proxy.get()); | 382 EXPECT_TRUE(tab_proxy.get()); |
378 if (!tab_proxy.get()) | 383 if (!tab_proxy.get()) |
379 return cookie_val; | 384 return cookie_val; |
380 EXPECT_TRUE(tab_proxy->GetCookies(cookie_url, &cookie_val)); | 385 EXPECT_TRUE(tab_proxy->GetCookies(cookie_url, &cookie_val)); |
381 return cookie_val; | 386 return cookie_val; |
382 } | 387 } |
OLD | NEW |