| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #if defined(OS_CHROMEOS) | 75 #if defined(OS_CHROMEOS) |
| 76 // Disable the test on chromos since kernel controls the user profile thus we | 76 // Disable the test on chromos since kernel controls the user profile thus we |
| 77 // won't be able to corrupt it. | 77 // won't be able to corrupt it. |
| 78 #define MAYBE_CorruptedProfile DISABLED_CorruptedProfile | 78 #define MAYBE_CorruptedProfile DISABLED_CorruptedProfile |
| 79 #else | 79 #else |
| 80 // http://crbug.com/527145 | 80 // http://crbug.com/527145 |
| 81 #define MAYBE_CorruptedProfile DISABLED_CorruptedProfile | 81 #define MAYBE_CorruptedProfile DISABLED_CorruptedProfile |
| 82 #endif | 82 #endif |
| 83 | 83 |
| 84 IN_PROC_BROWSER_TEST_P(ProfileErrorBrowserTest, MAYBE_CorruptedProfile) { | 84 IN_PROC_BROWSER_TEST_P(ProfileErrorBrowserTest, MAYBE_CorruptedProfile) { |
| 85 const char kPaintHistogram[] = "Startup.FirstWebContents.NonEmptyPaint"; | 85 const char kPaintHistogram[] = "Startup.FirstWebContents.NonEmptyPaint2"; |
| 86 const char kLoadHistogram[] = "Startup.FirstWebContents.MainFrameLoad"; | 86 const char kLoadHistogram[] = "Startup.FirstWebContents.MainFrameLoad2"; |
| 87 | 87 |
| 88 // Navigate to a URL so the first non-empty paint is registered. | 88 // Navigate to a URL so the first non-empty paint is registered. |
| 89 ui_test_utils::NavigateToURL(browser(), GURL("http://www.example.com/")); | 89 ui_test_utils::NavigateToURL(browser(), GURL("http://www.example.com/")); |
| 90 | 90 |
| 91 content::WebContents* contents = | 91 content::WebContents* contents = |
| 92 browser()->tab_strip_model()->GetActiveWebContents(); | 92 browser()->tab_strip_model()->GetActiveWebContents(); |
| 93 | 93 |
| 94 // Wait for the page to produce a frame, the first visually non-empty paint | 94 // Wait for the page to produce a frame, the first visually non-empty paint |
| 95 // metric is not valid until then. | 95 // metric is not valid until then. |
| 96 bool loaded = false; | 96 bool loaded = false; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 109 histogram_tester_.ExpectTotalCount(kPaintHistogram, 1); | 109 histogram_tester_.ExpectTotalCount(kPaintHistogram, 1); |
| 110 histogram_tester_.ExpectTotalCount(kLoadHistogram, 1); | 110 histogram_tester_.ExpectTotalCount(kLoadHistogram, 1); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 INSTANTIATE_TEST_CASE_P(ProfileErrorBrowserTestInstance, | 114 INSTANTIATE_TEST_CASE_P(ProfileErrorBrowserTestInstance, |
| 115 ProfileErrorBrowserTest, | 115 ProfileErrorBrowserTest, |
| 116 testing::Bool()); | 116 testing::Bool()); |
| 117 | 117 |
| 118 } // namespace | 118 } // namespace |
| OLD | NEW |