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

Side by Side Diff: chrome/test/page_cycler/page_cycler_test.cc

Issue 149281: Sprinkle some defensiveness into the UI tests so that they don't explode if t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/eintr_wrapper.h" 7 #include "base/eintr_wrapper.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 // run N iterations 203 // run N iterations
204 GURL::Replacements replacements; 204 GURL::Replacements replacements;
205 const char query_string[] = "iterations=" TEST_ITERATIONS "&auto=1"; 205 const char query_string[] = "iterations=" TEST_ITERATIONS "&auto=1";
206 replacements.SetQuery( 206 replacements.SetQuery(
207 query_string, 207 query_string,
208 url_parse::Component(0, arraysize(query_string) - 1)); 208 url_parse::Component(0, arraysize(query_string) - 1));
209 test_url = test_url.ReplaceComponents(replacements); 209 test_url = test_url.ReplaceComponents(replacements);
210 210
211 scoped_refptr<TabProxy> tab(GetActiveTab()); 211 scoped_refptr<TabProxy> tab(GetActiveTab());
212 ASSERT_TRUE(tab.get());
212 tab->NavigateToURL(test_url); 213 tab->NavigateToURL(test_url);
213 214
214 // Wait for the test to finish. 215 // Wait for the test to finish.
215 ASSERT_TRUE(WaitUntilCookieValue(tab.get(), test_url, "__pc_done", 216 ASSERT_TRUE(WaitUntilCookieValue(tab.get(), test_url, "__pc_done",
216 3000, UITest::test_timeout_ms(), "1")); 217 3000, UITest::test_timeout_ms(), "1"));
217 218
218 std::string cookie; 219 std::string cookie;
219 ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie)); 220 ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie));
220 pages->assign(UTF8ToWide(cookie)); 221 pages->assign(UTF8ToWide(cookie));
221 ASSERT_FALSE(pages->empty()); 222 ASSERT_FALSE(pages->empty());
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 520
520 TEST_F(PageCyclerTest, BloatHttp) { 521 TEST_F(PageCyclerTest, BloatHttp) {
521 RunTest("bloat", true); 522 RunTest("bloat", true);
522 } 523 }
523 524
524 TEST_F(PageCyclerReferenceTest, BloatHttp) { 525 TEST_F(PageCyclerReferenceTest, BloatHttp) {
525 RunTest("bloat", true); 526 RunTest("bloat", true);
526 } 527 }
527 528
528 } // namespace 529 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/automated_ui_tests/automated_ui_test_test.cc ('k') | chrome/test/ui/dom_checker_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698