| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 // BrowserWindowController depends on the auto release pool being recycled | 362 // BrowserWindowController depends on the auto release pool being recycled |
| 363 // in the message loop to delete itself, which frees the Browser object | 363 // in the message loop to delete itself, which frees the Browser object |
| 364 // which fires this event. | 364 // which fires this event. |
| 365 AutoreleasePool()->Recycle(); | 365 AutoreleasePool()->Recycle(); |
| 366 #endif | 366 #endif |
| 367 observer.Wait(); | 367 observer.Wait(); |
| 368 | 368 |
| 369 // Create a new window, which should trigger session restore. | 369 // Create a new window, which should trigger session restore. |
| 370 ui_test_utils::BrowserAddedObserver window_observer; | 370 ui_test_utils::BrowserAddedObserver window_observer; |
| 371 content::TestNavigationObserver navigation_observer( | 371 content::TestNavigationObserver navigation_observer( |
| 372 content::NotificationService::AllSources(), NULL, expected_tab_count); | 372 content::NotificationService::AllSources(), expected_tab_count); |
| 373 chrome::NewEmptyWindow(profile, chrome::HOST_DESKTOP_TYPE_NATIVE); | 373 chrome::NewEmptyWindow(profile, chrome::HOST_DESKTOP_TYPE_NATIVE); |
| 374 Browser* new_browser = window_observer.WaitForSingleNewBrowser(); | 374 Browser* new_browser = window_observer.WaitForSingleNewBrowser(); |
| 375 navigation_observer.Wait(); | 375 navigation_observer.Wait(); |
| 376 g_browser_process->ReleaseModule(); | 376 g_browser_process->ReleaseModule(); |
| 377 | 377 |
| 378 return new_browser; | 378 return new_browser; |
| 379 } | 379 } |
| 380 }; | 380 }; |
| 381 | 381 |
| 382 // Test that PerformanceMonitor will correctly record an extension installation | 382 // Test that PerformanceMonitor will correctly record an extension installation |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 test_server()->GetURL(std::string("files/").append("title2.html"))); | 786 test_server()->GetURL(std::string("files/").append("title2.html"))); |
| 787 | 787 |
| 788 performance_monitor()->DoTimedCollections(); | 788 performance_monitor()->DoTimedCollections(); |
| 789 | 789 |
| 790 metrics = GetStats(METRIC_NETWORK_BYTES_READ); | 790 metrics = GetStats(METRIC_NETWORK_BYTES_READ); |
| 791 ASSERT_EQ(2u, metrics.size()); | 791 ASSERT_EQ(2u, metrics.size()); |
| 792 EXPECT_GE(metrics[1].value, page1_size + page2_size); | 792 EXPECT_GE(metrics[1].value, page1_size + page2_size); |
| 793 } | 793 } |
| 794 | 794 |
| 795 } // namespace performance_monitor | 795 } // namespace performance_monitor |
| OLD | NEW |