| 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 "base/macros.h" |
| 5 #include "base/test/histogram_tester.h" | 6 #include "base/test/histogram_tester.h" |
| 6 #include "chrome/test/base/in_process_browser_test.h" | 7 #include "chrome/test/base/in_process_browser_test.h" |
| 7 #include "chrome/test/base/ui_test_utils.h" | 8 #include "chrome/test/base/ui_test_utils.h" |
| 8 #include "components/page_load_metrics/browser/metrics_web_contents_observer.h" | 9 #include "components/page_load_metrics/browser/metrics_web_contents_observer.h" |
| 9 #include "net/test/embedded_test_server/embedded_test_server.h" | 10 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 10 | 11 |
| 11 namespace page_load_metrics { | 12 namespace page_load_metrics { |
| 12 | 13 |
| 13 class MetricsWebContentsObserverBrowserTest : public InProcessBrowserTest { | 14 class MetricsWebContentsObserverBrowserTest : public InProcessBrowserTest { |
| 14 public: | 15 public: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 browser(), embedded_test_server()->GetURL("/title1.html#hash")); | 52 browser(), embedded_test_server()->GetURL("/title1.html#hash")); |
| 52 ui_test_utils::NavigateToURL(browser(), | 53 ui_test_utils::NavigateToURL(browser(), |
| 53 embedded_test_server()->GetURL("/title2.html")); | 54 embedded_test_server()->GetURL("/title2.html")); |
| 54 | 55 |
| 55 histogram_tester_.ExpectTotalCount(kHistogramDomContentLoaded, 1); | 56 histogram_tester_.ExpectTotalCount(kHistogramDomContentLoaded, 1); |
| 56 histogram_tester_.ExpectTotalCount(kHistogramLoad, 1); | 57 histogram_tester_.ExpectTotalCount(kHistogramLoad, 1); |
| 57 histogram_tester_.ExpectTotalCount(kHistogramFirstLayout, 1); | 58 histogram_tester_.ExpectTotalCount(kHistogramFirstLayout, 1); |
| 58 } | 59 } |
| 59 | 60 |
| 60 } // namespace page_load_metrics | 61 } // namespace page_load_metrics |
| OLD | NEW |