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 <stddef.h> | 5 #include <stddef.h> |
6 #include <deque> | 6 #include <deque> |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <unordered_map> | 9 #include <unordered_map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 histogram_tester().ExpectTotalCount( | 1085 histogram_tester().ExpectTotalCount( |
1086 "PageLoad.PaintTiming.NavigationToFirstContentfulPaint", 1); | 1086 "PageLoad.PaintTiming.NavigationToFirstContentfulPaint", 1); |
1087 | 1087 |
1088 // Histogram only emitted during a prerender, which should not happen here. | 1088 // Histogram only emitted during a prerender, which should not happen here. |
1089 histogram_tester().ExpectTotalCount( | 1089 histogram_tester().ExpectTotalCount( |
1090 "Prerender.websame_PrefetchTTFCP.Warm.Cacheable.Visible", 0); | 1090 "Prerender.websame_PrefetchTTFCP.Warm.Cacheable.Visible", 0); |
1091 } | 1091 } |
1092 | 1092 |
1093 // Checks that the correct page load metrics observers are produced with a | 1093 // Checks that the correct page load metrics observers are produced with a |
1094 // prerender. | 1094 // prerender. |
1095 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PageLoadMetricsPrerender) { | 1095 // TODO(https://crbug.com/678976) Fails on ChromeOS and Linux. |
| 1096 #if defined(OS_CHROMEOS) || defined(OS_LINUX) |
| 1097 #define MAYBE_PageLoadMetricsPrerender DISABLED_PageLoadMetricsPrerender |
| 1098 #else |
| 1099 #define MAYBE_PageLoadMetricsPrerender PageLoadMetricsPrerender |
| 1100 #endif |
| 1101 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, MAYBE_PageLoadMetricsPrerender) { |
1096 test_utils::FirstContentfulPaintManagerWaiter* prerender_fcp_waiter = | 1102 test_utils::FirstContentfulPaintManagerWaiter* prerender_fcp_waiter = |
1097 test_utils::FirstContentfulPaintManagerWaiter::Create( | 1103 test_utils::FirstContentfulPaintManagerWaiter::Create( |
1098 GetPrerenderManager()); | 1104 GetPrerenderManager()); |
1099 PrerenderTestURL("/prerender/prerender_page.html", FINAL_STATUS_USED, 1); | 1105 PrerenderTestURL("/prerender/prerender_page.html", FINAL_STATUS_USED, 1); |
1100 NavigateToDestURL(); | 1106 NavigateToDestURL(); |
1101 prerender_fcp_waiter->Wait(); | 1107 prerender_fcp_waiter->Wait(); |
1102 | 1108 |
1103 histogram_tester().ExpectTotalCount( | 1109 histogram_tester().ExpectTotalCount( |
1104 "Prerender.websame_PrefetchTTFCP.Warm.Cacheable.Visible", 1); | 1110 "Prerender.websame_PrefetchTTFCP.Warm.Cacheable.Visible", 1); |
1105 | 1111 |
(...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3751 browser()->tab_strip_model()->GetActiveWebContents(); | 3757 browser()->tab_strip_model()->GetActiveWebContents(); |
3752 bool display_test_result = false; | 3758 bool display_test_result = false; |
3753 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, | 3759 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, |
3754 "DidDisplayReallyPass()", | 3760 "DidDisplayReallyPass()", |
3755 &display_test_result)); | 3761 &display_test_result)); |
3756 ASSERT_TRUE(display_test_result); | 3762 ASSERT_TRUE(display_test_result); |
3757 } | 3763 } |
3758 #endif // !defined(DISABLE_NACL) | 3764 #endif // !defined(DISABLE_NACL) |
3759 | 3765 |
3760 } // namespace prerender | 3766 } // namespace prerender |
OLD | NEW |