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

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

Issue 7941010: Revert r101718 "wait for test script to be loaded" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « no previous file | tools/page_cycler/common/head.js » ('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) 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Wait for the test to finish. 190 // Wait for the test to finish.
191 ASSERT_TRUE(WaitUntilCookieValue( 191 ASSERT_TRUE(WaitUntilCookieValue(
192 tab.get(), test_url, "__pc_done", 192 tab.get(), test_url, "__pc_done",
193 TestTimeouts::large_test_timeout_ms(), "1")); 193 TestTimeouts::large_test_timeout_ms(), "1"));
194 194
195 std::string cookie; 195 std::string cookie;
196 ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie)); 196 ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie));
197 pages->assign(UTF8ToWide(cookie)); 197 pages->assign(UTF8ToWide(cookie));
198 ASSERT_FALSE(pages->empty()); 198 ASSERT_FALSE(pages->empty());
199 199
200 // Wait for the report.html to be loaded.
201 ASSERT_TRUE(WaitUntilCookieValue(
202 tab.get(), test_url, "__navigated_to_report",
203 TestTimeouts::action_max_timeout_ms(), "1"));
204
205 // Get the timing cookie value from the DOM automation. 200 // Get the timing cookie value from the DOM automation.
206 std::wstring wcookie; 201 std::wstring wcookie;
207 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", 202 ASSERT_TRUE(tab->ExecuteAndExtractString(L"",
208 L"window.domAutomationController.send(" 203 L"window.domAutomationController.send("
209 L"JSON.stringify(__get_timings()));", 204 L"JSON.stringify(__get_timings()));",
210 &wcookie)); 205 &wcookie));
211 cookie = base::SysWideToNativeMB(wcookie); 206 cookie = base::SysWideToNativeMB(wcookie);
212 207
213 // JSON.stringify() encapsulates the returned string in quotes, strip them. 208 // JSON.stringify() encapsulates the returned string in quotes, strip them.
214 std::string::size_type start_idx = cookie.find("\""); 209 std::string::size_type start_idx = cookie.find("\"");
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 #define PAGE_CYCLER_TESTS(test, name, use_http) \ 435 #define PAGE_CYCLER_TESTS(test, name, use_http) \
441 TEST_F(PageCyclerTest, name) { \ 436 TEST_F(PageCyclerTest, name) { \
442 RunTest("times", test, use_http); \ 437 RunTest("times", test, use_http); \
443 } \ 438 } \
444 TEST_F(PageCyclerReferenceTest, name) { \ 439 TEST_F(PageCyclerReferenceTest, name) { \
445 RunTest("times", test, use_http); \ 440 RunTest("times", test, use_http); \
446 } 441 }
447 442
448 // This macro simplifies setting up regular and reference build tests 443 // This macro simplifies setting up regular and reference build tests
449 // for HTML5 database tests. 444 // for HTML5 database tests.
445 // FLAKY http://crbug.com/67918
450 #define PAGE_CYCLER_DATABASE_TESTS(test, name) \ 446 #define PAGE_CYCLER_DATABASE_TESTS(test, name) \
451 TEST_F(PageCyclerDatabaseTest, Database##name##File) { \ 447 TEST_F(PageCyclerDatabaseTest, FLAKY_Database##name##File) { \
452 RunTest(test, test, false); \ 448 RunTest(test, test, false); \
453 } \ 449 } \
454 TEST_F(PageCyclerDatabaseReferenceTest, Database##name##File) { \ 450 TEST_F(PageCyclerDatabaseReferenceTest, FLAKY_Database##name##File) { \
455 RunTest(test, test, false); \ 451 RunTest(test, test, false); \
456 } 452 }
457 453
458 // This macro simplifies setting up regular and reference build tests 454 // This macro simplifies setting up regular and reference build tests
459 // for HTML5 Indexed DB tests. 455 // for HTML5 Indexed DB tests.
456 // FLAKY http://crbug.com/67918
460 #define PAGE_CYCLER_IDB_TESTS(test, name) \ 457 #define PAGE_CYCLER_IDB_TESTS(test, name) \
461 TEST_F(PageCyclerIndexedDatabaseTest, IndexedDB##name##File) { \ 458 TEST_F(PageCyclerIndexedDatabaseTest, FLAKY_IndexedDB##name##File) { \
462 RunTest(test, test, false); \ 459 RunTest(test, test, false); \
463 } \ 460 } \
464 TEST_F(PageCyclerIndexedDatabaseReferenceTest, IndexedDB##name##File) { \ 461 TEST_F(PageCyclerIndexedDatabaseReferenceTest, IndexedDB##name##File) { \
465 RunTest(test, test, false); \ 462 RunTest(test, test, false); \
466 } 463 }
467 464
468 // These are shorthand for File vs. Http tests. 465 // These are shorthand for File vs. Http tests.
469 #define PAGE_CYCLER_FILE_TESTS(test, name) \ 466 #define PAGE_CYCLER_FILE_TESTS(test, name) \
470 PAGE_CYCLER_TESTS(test, name, false) 467 PAGE_CYCLER_TESTS(test, name, false)
471 #define PAGE_CYCLER_HTTP_TESTS(test, name) \ 468 #define PAGE_CYCLER_HTTP_TESTS(test, name) \
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 PAGE_CYCLER_DATABASE_TESTS("delete-transactions", 527 PAGE_CYCLER_DATABASE_TESTS("delete-transactions",
531 DeleteTransactions); 528 DeleteTransactions);
532 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions", 529 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions",
533 PseudoRandomTransactions); 530 PseudoRandomTransactions);
534 #endif 531 #endif
535 532
536 // Indexed DB tests. 533 // Indexed DB tests.
537 PAGE_CYCLER_IDB_TESTS("basic_insert", BasicInsert); 534 PAGE_CYCLER_IDB_TESTS("basic_insert", BasicInsert);
538 535
539 } // namespace 536 } // namespace
OLDNEW
« no previous file with comments | « no previous file | tools/page_cycler/common/head.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698