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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 // in the message loop to delete itself, which frees the Browser object | 367 // in the message loop to delete itself, which frees the Browser object |
368 // which fires this event. | 368 // which fires this event. |
369 AutoreleasePool()->Recycle(); | 369 AutoreleasePool()->Recycle(); |
370 #endif | 370 #endif |
371 observer.Wait(); | 371 observer.Wait(); |
372 | 372 |
373 // Create a new window, which should trigger session restore. | 373 // Create a new window, which should trigger session restore. |
374 content::TestNavigationObserver restore_observer(NULL, expected_tab_count); | 374 content::TestNavigationObserver restore_observer(NULL, expected_tab_count); |
375 restore_observer.StartWatchingNewWebContents(); | 375 restore_observer.StartWatchingNewWebContents(); |
376 ui_test_utils::BrowserAddedObserver window_observer; | 376 ui_test_utils::BrowserAddedObserver window_observer; |
377 chrome::NewEmptyWindow(profile, chrome::HOST_DESKTOP_TYPE_NATIVE); | 377 chrome::NewEmptyWindow(profile, chrome::GetActiveDesktop()); |
378 Browser* new_browser = window_observer.WaitForSingleNewBrowser(); | 378 Browser* new_browser = window_observer.WaitForSingleNewBrowser(); |
379 restore_observer.Wait(); | 379 restore_observer.Wait(); |
380 g_browser_process->ReleaseModule(); | 380 g_browser_process->ReleaseModule(); |
381 | 381 |
382 return new_browser; | 382 return new_browser; |
383 } | 383 } |
384 }; | 384 }; |
385 | 385 |
386 // Test that PerformanceMonitor will correctly record an extension installation | 386 // Test that PerformanceMonitor will correctly record an extension installation |
387 // event. | 387 // event. |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 test_server()->GetURL(std::string("files/").append("title2.html"))); | 790 test_server()->GetURL(std::string("files/").append("title2.html"))); |
791 | 791 |
792 performance_monitor()->DoTimedCollections(); | 792 performance_monitor()->DoTimedCollections(); |
793 | 793 |
794 metrics = GetStats(METRIC_NETWORK_BYTES_READ); | 794 metrics = GetStats(METRIC_NETWORK_BYTES_READ); |
795 ASSERT_EQ(2u, metrics.size()); | 795 ASSERT_EQ(2u, metrics.size()); |
796 EXPECT_GE(metrics[1].value, page1_size + page2_size); | 796 EXPECT_GE(metrics[1].value, page1_size + page2_size); |
797 } | 797 } |
798 | 798 |
799 } // namespace performance_monitor | 799 } // namespace performance_monitor |
OLD | NEW |