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/file_path.h" | 6 #include "base/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/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 | 544 |
545 std::string previous_version; | 545 std::string previous_version; |
546 std::string current_version; | 546 std::string current_version; |
547 | 547 |
548 ASSERT_TRUE(value->GetString("previousVersion", &previous_version)); | 548 ASSERT_TRUE(value->GetString("previousVersion", &previous_version)); |
549 ASSERT_EQ(kOldVersion, previous_version); | 549 ASSERT_EQ(kOldVersion, previous_version); |
550 ASSERT_TRUE(value->GetString("currentVersion", ¤t_version)); | 550 ASSERT_TRUE(value->GetString("currentVersion", ¤t_version)); |
551 ASSERT_EQ(version_string, current_version); | 551 ASSERT_EQ(version_string, current_version); |
552 } | 552 } |
553 | 553 |
554 IN_PROC_BROWSER_TEST_F(PerformanceMonitorBrowserTest, GatherStatistics) { | 554 // crbug.com/160502 |
| 555 IN_PROC_BROWSER_TEST_F(PerformanceMonitorBrowserTest, FLAKY_GatherStatistics) { |
555 GatherStatistics(); | 556 GatherStatistics(); |
556 | 557 |
557 // No stats should be recorded for this CPUUsage because this was the first | 558 // No stats should be recorded for this CPUUsage because this was the first |
558 // call to GatherStatistics. | 559 // call to GatherStatistics. |
559 Database::MetricVector stats = GetStats(METRIC_CPU_USAGE); | 560 Database::MetricVector stats = GetStats(METRIC_CPU_USAGE); |
560 ASSERT_EQ(0u, stats.size()); | 561 ASSERT_EQ(0u, stats.size()); |
561 | 562 |
562 stats = GetStats(METRIC_PRIVATE_MEMORY_USAGE); | 563 stats = GetStats(METRIC_PRIVATE_MEMORY_USAGE); |
563 ASSERT_EQ(1u, stats.size()); | 564 ASSERT_EQ(1u, stats.size()); |
564 EXPECT_GT(stats[0].value, 0); | 565 EXPECT_GT(stats[0].value, 0); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 test_server()->GetURL(std::string("files/").append("title2.html"))); | 774 test_server()->GetURL(std::string("files/").append("title2.html"))); |
774 | 775 |
775 performance_monitor()->DoTimedCollections(); | 776 performance_monitor()->DoTimedCollections(); |
776 | 777 |
777 metrics = GetStats(METRIC_NETWORK_BYTES_READ); | 778 metrics = GetStats(METRIC_NETWORK_BYTES_READ); |
778 ASSERT_EQ(2u, metrics.size()); | 779 ASSERT_EQ(2u, metrics.size()); |
779 EXPECT_GE(metrics[1].value, page1_size + page2_size); | 780 EXPECT_GE(metrics[1].value, page1_size + page2_size); |
780 } | 781 } |
781 | 782 |
782 } // namespace performance_monitor | 783 } // namespace performance_monitor |
OLD | NEW |