| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/gfx/rect.h" | 6 #include "base/gfx/rect.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/perftimer.h" | 8 #include "base/perftimer.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 ASSERT_TRUE(window->GetTabCount(&tab_count)); | 127 ASSERT_TRUE(window->GetTabCount(&tab_count)); |
| 128 ASSERT_EQ(1, tab_count); | 128 ASSERT_EQ(1, tab_count); |
| 129 | 129 |
| 130 // Hit ctl-t and wait for the tab to load. | 130 // Hit ctl-t and wait for the tab to load. |
| 131 window->ApplyAccelerator(IDC_NEW_TAB); | 131 window->ApplyAccelerator(IDC_NEW_TAB); |
| 132 ASSERT_TRUE(window->WaitForTabCountToBecome(2, 5000)); | 132 ASSERT_TRUE(window->WaitForTabCountToBecome(2, 5000)); |
| 133 int duration; | 133 int duration; |
| 134 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&duration)); | 134 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&duration)); |
| 135 | 135 |
| 136 // Collect the timing information. | 136 // Collect the timing information. |
| 137 ASSERT_TRUE(automation()->GetMetricEventDuration("NewTab.ScriptStart", | 137 ASSERT_TRUE(automation()->GetMetricEventDuration("Tab.NewTabScriptStart", |
| 138 &duration)); | 138 &duration)); |
| 139 scriptstart_times[i] = TimeDelta::FromMilliseconds(duration); | 139 scriptstart_times[i] = TimeDelta::FromMilliseconds(duration); |
| 140 | 140 |
| 141 ASSERT_TRUE(automation()->GetMetricEventDuration( | 141 ASSERT_TRUE(automation()->GetMetricEventDuration( |
| 142 "NewTab.DOMContentLoaded", &duration)); | 142 "Tab.NewTabDOMContentLoaded", &duration)); |
| 143 domcontentloaded_times[i] = TimeDelta::FromMilliseconds(duration); | 143 domcontentloaded_times[i] = TimeDelta::FromMilliseconds(duration); |
| 144 | 144 |
| 145 ASSERT_TRUE(automation()->GetMetricEventDuration("NewTab.Onload", | 145 ASSERT_TRUE(automation()->GetMetricEventDuration("Tab.NewTabOnload", |
| 146 &duration)); | 146 &duration)); |
| 147 onload_times[i] = TimeDelta::FromMilliseconds(duration); | 147 onload_times[i] = TimeDelta::FromMilliseconds(duration); |
| 148 | 148 |
| 149 window = NULL; | 149 window = NULL; |
| 150 UITest::TearDown(); | 150 UITest::TearDown(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 PrintTimings("script_start", scriptstart_times, false /* important */); | 153 PrintTimings("script_start", scriptstart_times, false /* important */); |
| 154 PrintTimings("domcontent_loaded", domcontentloaded_times, | 154 PrintTimings("domcontent_loaded", domcontentloaded_times, |
| 155 false /* important */); | 155 false /* important */); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 | 193 |
| 194 TEST_F(NewTabUIStartupTest, NativeFrameGtkThemeCold) { | 194 TEST_F(NewTabUIStartupTest, NativeFrameGtkThemeCold) { |
| 195 RunStartupTest("tab_custom_frame_gtk_theme_cold", false /* cold */, | 195 RunStartupTest("tab_custom_frame_gtk_theme_cold", false /* cold */, |
| 196 false /* not important */, | 196 false /* not important */, |
| 197 UITest::CUSTOM_FRAME_NATIVE_THEME); | 197 UITest::CUSTOM_FRAME_NATIVE_THEME); |
| 198 } | 198 } |
| 199 #endif | 199 #endif |
| 200 | 200 |
| 201 } // namespace | 201 } // namespace |
| OLD | NEW |