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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 std::string id; | 78 std::string id; |
79 std::string name; | 79 std::string name; |
80 std::string url; | 80 std::string url; |
81 std::string version; | 81 std::string version; |
82 extensions::Manifest::Location location; | 82 extensions::Manifest::Location location; |
83 }; | 83 }; |
84 | 84 |
85 // Compare the fields of |extension| to those in |value|; this is a check to | 85 // Compare the fields of |extension| to those in |value|; this is a check to |
86 // make sure the extension data was recorded properly in the event. | 86 // make sure the extension data was recorded properly in the event. |
87 void ValidateExtensionInfo(const ExtensionBasicInfo extension, | 87 void ValidateExtensionInfo(const ExtensionBasicInfo extension, |
88 const DictionaryValue* value) { | 88 const base::DictionaryValue* value) { |
89 std::string extension_description; | 89 std::string extension_description; |
90 std::string extension_id; | 90 std::string extension_id; |
91 std::string extension_name; | 91 std::string extension_name; |
92 std::string extension_url; | 92 std::string extension_url; |
93 std::string extension_version; | 93 std::string extension_version; |
94 int extension_location; | 94 int extension_location; |
95 | 95 |
96 ASSERT_TRUE(value->GetString("extensionDescription", | 96 ASSERT_TRUE(value->GetString("extensionDescription", |
97 &extension_description)); | 97 &extension_description)); |
98 ASSERT_EQ(extension.description, extension_description); | 98 ASSERT_EQ(extension.description, extension_description); |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 test_server()->GetURL(std::string("files/").append("title2.html"))); | 785 test_server()->GetURL(std::string("files/").append("title2.html"))); |
786 | 786 |
787 GatherStatistics(); | 787 GatherStatistics(); |
788 | 788 |
789 metrics = GetStats(METRIC_NETWORK_BYTES_READ); | 789 metrics = GetStats(METRIC_NETWORK_BYTES_READ); |
790 ASSERT_EQ(2u, metrics.size()); | 790 ASSERT_EQ(2u, metrics.size()); |
791 EXPECT_GE(metrics[1].value, page1_size + page2_size); | 791 EXPECT_GE(metrics[1].value, page1_size + page2_size); |
792 } | 792 } |
793 | 793 |
794 } // namespace performance_monitor | 794 } // namespace performance_monitor |
OLD | NEW |