OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "components/page_load_metrics/browser/metrics_web_contents_observer.h" | 5 #include "components/page_load_metrics/browser/metrics_web_contents_observer.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
8 #include "base/process/kill.h" | 9 #include "base/process/kill.h" |
9 #include "base/test/histogram_tester.h" | 10 #include "base/test/histogram_tester.h" |
10 #include "base/time/time.h" | 11 #include "base/time/time.h" |
11 #include "components/page_load_metrics/common/page_load_metrics_messages.h" | 12 #include "components/page_load_metrics/common/page_load_metrics_messages.h" |
12 #include "components/rappor/rappor_utils.h" | 13 #include "components/rappor/rappor_utils.h" |
13 #include "components/rappor/test_rappor_service.h" | 14 #include "components/rappor/test_rappor_service.h" |
14 #include "content/public/browser/navigation_handle.h" | 15 #include "content/public/browser/navigation_handle.h" |
15 #include "content/public/browser/render_frame_host.h" | 16 #include "content/public/browser/render_frame_host.h" |
16 #include "content/public/test/test_renderer_host.h" | 17 #include "content/public/test/test_renderer_host.h" |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 EXPECT_NE(string_it, sample_obj->string_fields.end()); | 648 EXPECT_NE(string_it, sample_obj->string_fields.end()); |
648 EXPECT_EQ(rappor::GetDomainAndRegistrySampleFromGURL(GURL(kDefaultTestUrl)), | 649 EXPECT_EQ(rappor::GetDomainAndRegistrySampleFromGURL(GURL(kDefaultTestUrl)), |
649 string_it->second); | 650 string_it->second); |
650 | 651 |
651 const auto& flag_it = sample_obj->flag_fields.find("IsSlow"); | 652 const auto& flag_it = sample_obj->flag_fields.find("IsSlow"); |
652 EXPECT_NE(flag_it, sample_obj->flag_fields.end()); | 653 EXPECT_NE(flag_it, sample_obj->flag_fields.end()); |
653 EXPECT_EQ(0u, flag_it->second); | 654 EXPECT_EQ(0u, flag_it->second); |
654 } | 655 } |
655 | 656 |
656 } // namespace page_load_metrics | 657 } // namespace page_load_metrics |
OLD | NEW |