OLD | NEW |
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/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 | 61 |
62 // run N iterations | 62 // run N iterations |
63 GURL::Replacements replacements; | 63 GURL::Replacements replacements; |
64 const char query_string[] = "iterations=" TEST_ITERATIONS "&auto=1"; | 64 const char query_string[] = "iterations=" TEST_ITERATIONS "&auto=1"; |
65 replacements.SetQuery( | 65 replacements.SetQuery( |
66 query_string, | 66 query_string, |
67 url_parse::Component(0, arraysize(query_string) - 1)); | 67 url_parse::Component(0, arraysize(query_string) - 1)); |
68 test_url = test_url.ReplaceComponents(replacements); | 68 test_url = test_url.ReplaceComponents(replacements); |
69 | 69 |
70 scoped_ptr<TabProxy> tab(GetActiveTab()); | 70 scoped_refptr<TabProxy> tab(GetActiveTab()); |
71 tab->NavigateToURL(test_url); | 71 tab->NavigateToURL(test_url); |
72 | 72 |
73 // Wait for the test to finish. | 73 // Wait for the test to finish. |
74 ASSERT_TRUE(WaitUntilCookieValue(tab.get(), test_url, "__pc_done", | 74 ASSERT_TRUE(WaitUntilCookieValue(tab.get(), test_url, "__pc_done", |
75 3000, UITest::test_timeout_ms(), "1")); | 75 3000, UITest::test_timeout_ms(), "1")); |
76 | 76 |
77 std::string cookie; | 77 std::string cookie; |
78 ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie)); | 78 ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie)); |
79 pages->assign(UTF8ToWide(cookie)); | 79 pages->assign(UTF8ToWide(cookie)); |
80 ASSERT_FALSE(pages->empty()); | 80 ASSERT_FALSE(pages->empty()); |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 RunTest("bloat", true); | 351 RunTest("bloat", true); |
352 } | 352 } |
353 | 353 |
354 #if !defined(OS_MACOSX) | 354 #if !defined(OS_MACOSX) |
355 TEST_F(PageCyclerReferenceTest, BloatHttp) { | 355 TEST_F(PageCyclerReferenceTest, BloatHttp) { |
356 RunTest("bloat", true); | 356 RunTest("bloat", true); |
357 } | 357 } |
358 #endif | 358 #endif |
359 | 359 |
360 } // namespace | 360 } // namespace |
OLD | NEW |