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

Side by Side Diff: chrome/test/ui/ui_test.cc

Issue 6159001: Modifying some downloads hooks to act per-window (so that incognito windows c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/ui/ui_test.h ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #endif 10 #endif
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 void UITestBase::NavigateToURLAsync(const GURL& url) { 265 void UITestBase::NavigateToURLAsync(const GURL& url) {
266 scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); 266 scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
267 ASSERT_TRUE(tab_proxy.get()); 267 ASSERT_TRUE(tab_proxy.get());
268 ASSERT_TRUE(tab_proxy->NavigateToURLAsync(url)); 268 ASSERT_TRUE(tab_proxy->NavigateToURLAsync(url));
269 } 269 }
270 270
271 void UITestBase::NavigateToURL(const GURL& url) { 271 void UITestBase::NavigateToURL(const GURL& url) {
272 NavigateToURL(url, 0, GetActiveTabIndex(0)); 272 NavigateToURL(url, 0, GetActiveTabIndex(0));
273 } 273 }
274 274
275 void UITestBase::NavigateToURL(const GURL& url, int window_index) {
276 NavigateToURL(url, window_index, GetActiveTabIndex(window_index));
277 }
278
275 void UITestBase::NavigateToURL(const GURL& url, int window_index, int 279 void UITestBase::NavigateToURL(const GURL& url, int window_index, int
276 tab_index) { 280 tab_index) {
277 NavigateToURLBlockUntilNavigationsComplete(url, 1, window_index, tab_index); 281 NavigateToURLBlockUntilNavigationsComplete(url, 1, window_index, tab_index);
278 } 282 }
279 283
280 void UITestBase::NavigateToURLBlockUntilNavigationsComplete( 284 void UITestBase::NavigateToURLBlockUntilNavigationsComplete(
281 const GURL& url, int number_of_navigations) { 285 const GURL& url, int number_of_navigations) {
282 scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); 286 scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
283 ASSERT_TRUE(tab_proxy.get()); 287 ASSERT_TRUE(tab_proxy.get());
284 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, 288 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 incorrect_state_count++; 851 incorrect_state_count++;
848 } 852 }
849 853
850 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() 854 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF()
851 << " seconds" 855 << " seconds"
852 << " call failed " << fail_count << " times" 856 << " call failed " << fail_count << " times"
853 << " state was incorrect " << incorrect_state_count << " times"; 857 << " state was incorrect " << incorrect_state_count << " times";
854 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; 858 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__;
855 return false; 859 return false;
856 } 860 }
OLDNEW
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698