| 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/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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 tab = window->GetActiveTab(); | 242 tab = window->GetActiveTab(); |
| 243 continue; | 243 continue; |
| 244 } | 244 } |
| 245 | 245 |
| 246 int tab_index = counter % num_target_tabs; // A pseudo-random tab. | 246 int tab_index = counter % num_target_tabs; // A pseudo-random tab. |
| 247 tab = window->GetTab(tab_index); | 247 tab = window->GetTab(tab_index); |
| 248 } | 248 } |
| 249 | 249 |
| 250 const int kMaxWaitTime = 5000; | 250 const int kMaxWaitTime = 5000; |
| 251 bool timed_out = false; | 251 bool timed_out = false; |
| 252 tab->NavigateToURLWithTimeout(GURL(urls[counter]), kMaxWaitTime, | 252 tab->NavigateToURLWithTimeout(GURL(urls[counter]), 1, kMaxWaitTime, |
| 253 &timed_out); | 253 &timed_out); |
| 254 if (timed_out) | 254 if (timed_out) |
| 255 printf("warning: %s timed out!\n", urls[counter].c_str()); | 255 printf("warning: %s timed out!\n", urls[counter].c_str()); |
| 256 | 256 |
| 257 // TODO(mbelshe): Bug 2953 | 257 // TODO(mbelshe): Bug 2953 |
| 258 // The automation crashes periodically if we cycle too quickly. | 258 // The automation crashes periodically if we cycle too quickly. |
| 259 // To make these tests more reliable, slowing them down a bit. | 259 // To make these tests more reliable, slowing them down a bit. |
| 260 PlatformThread::Sleep(100); | 260 PlatformThread::Sleep(100); |
| 261 } | 261 } |
| 262 #if defined(OS_WIN) | 262 #if defined(OS_WIN) |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 447 |
| 448 TEST_F(MemoryTest, FiveTabTest) { | 448 TEST_F(MemoryTest, FiveTabTest) { |
| 449 RunTest("5t", 5); | 449 RunTest("5t", 5); |
| 450 } | 450 } |
| 451 | 451 |
| 452 TEST_F(MemoryTest, TwelveTabTest) { | 452 TEST_F(MemoryTest, TwelveTabTest) { |
| 453 RunTest("12t", 12); | 453 RunTest("12t", 12); |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace | 456 } // namespace |
| OLD | NEW |