OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/prerender/prerender_util.h" | 5 #include "chrome/browser/prerender/prerender_util.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/metrics/histogram_samples.h" | 8 #include "base/metrics/histogram_samples.h" |
9 #include "base/metrics/statistics_recorder.h" | 9 #include "base/metrics/statistics_recorder.h" |
10 #include "net/http/http_response_headers.h" | 10 #include "net/http/http_response_headers.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
| 14 using content::ResourceType; |
| 15 |
14 namespace prerender { | 16 namespace prerender { |
15 | 17 |
16 class PrerenderUtilTest : public testing::Test { | 18 class PrerenderUtilTest : public testing::Test { |
17 public: | 19 public: |
18 PrerenderUtilTest() { | 20 PrerenderUtilTest() { |
19 } | 21 } |
20 }; | 22 }; |
21 | 23 |
22 // Ensure that extracting a urlencoded URL in the url= query string component | 24 // Ensure that extracting a urlencoded URL in the url= query string component |
23 // works. | 25 // works. |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 EXPECT_EQ( num_pss, server_samples->GetCount(3)); | 218 EXPECT_EQ( num_pss, server_samples->GetCount(3)); |
217 EXPECT_EQ( num_other, server_samples->GetCount(4)); | 219 EXPECT_EQ( num_other, server_samples->GetCount(4)); |
218 EXPECT_EQ( num_bucket_1, version_samples->GetCount(1)); | 220 EXPECT_EQ( num_bucket_1, version_samples->GetCount(1)); |
219 EXPECT_EQ( num_bucket_30, version_samples->GetCount(30)); | 221 EXPECT_EQ( num_bucket_30, version_samples->GetCount(30)); |
220 EXPECT_EQ( num_bucket_33, version_samples->GetCount(33)); | 222 EXPECT_EQ( num_bucket_33, version_samples->GetCount(33)); |
221 | 223 |
222 headers->RemoveHeader("X-Page-Speed"); | 224 headers->RemoveHeader("X-Page-Speed"); |
223 } | 225 } |
224 | 226 |
225 } // namespace prerender | 227 } // namespace prerender |
OLD | NEW |