Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: chrome/test/ui/ui_test.cc

Issue 12389073: Collect tab timing information for use in telementry-based startup tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix telemetry tests with reference builds. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #endif 10 #endif
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 L"NOTE: Crash service not ported to this platform!"; 78 L"NOTE: Crash service not ported to this platform!";
79 #endif 79 #endif
80 80
81 UITestBase::UITestBase() 81 UITestBase::UITestBase()
82 : launch_arguments_(CommandLine::NO_PROGRAM), 82 : launch_arguments_(CommandLine::NO_PROGRAM),
83 expected_errors_(0), 83 expected_errors_(0),
84 expected_crashes_(0), 84 expected_crashes_(0),
85 homepage_(content::kAboutBlankURL), 85 homepage_(content::kAboutBlankURL),
86 wait_for_initial_loads_(true), 86 wait_for_initial_loads_(true),
87 dom_automation_enabled_(false), 87 dom_automation_enabled_(false),
88 stats_collection_controller_enabled_(false),
88 show_window_(false), 89 show_window_(false),
89 clear_profile_(true), 90 clear_profile_(true),
90 include_testing_id_(true), 91 include_testing_id_(true),
91 enable_file_cookies_(true) { 92 enable_file_cookies_(true) {
92 PathService::Get(chrome::DIR_APP, &browser_directory_); 93 PathService::Get(chrome::DIR_APP, &browser_directory_);
93 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); 94 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
94 } 95 }
95 96
96 UITestBase::UITestBase(base::MessageLoop::Type msg_loop_type) 97 UITestBase::UITestBase(base::MessageLoop::Type msg_loop_type)
97 : launch_arguments_(CommandLine::NO_PROGRAM), 98 : launch_arguments_(CommandLine::NO_PROGRAM),
98 expected_errors_(0), 99 expected_errors_(0),
99 expected_crashes_(0), 100 expected_crashes_(0),
100 wait_for_initial_loads_(true), 101 wait_for_initial_loads_(true),
101 dom_automation_enabled_(false), 102 dom_automation_enabled_(false),
103 stats_collection_controller_enabled_(false),
102 show_window_(false), 104 show_window_(false),
103 clear_profile_(true), 105 clear_profile_(true),
104 include_testing_id_(true), 106 include_testing_id_(true),
105 enable_file_cookies_(true) { 107 enable_file_cookies_(true) {
106 PathService::Get(chrome::DIR_APP, &browser_directory_); 108 PathService::Get(chrome::DIR_APP, &browser_directory_);
107 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); 109 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
108 } 110 }
109 111
110 UITestBase::~UITestBase() {} 112 UITestBase::~UITestBase() {}
111 113
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 test_launcher_utils::PrepareBrowserCommandLineForTests(&launch_arguments_); 182 test_launcher_utils::PrepareBrowserCommandLineForTests(&launch_arguments_);
181 183
182 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWaitForDebugger)) 184 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWaitForDebugger))
183 launch_arguments_.AppendSwitch(switches::kWaitForDebugger); 185 launch_arguments_.AppendSwitch(switches::kWaitForDebugger);
184 186
185 // We need cookies on file:// for things like the page cycler. 187 // We need cookies on file:// for things like the page cycler.
186 if (enable_file_cookies_) 188 if (enable_file_cookies_)
187 launch_arguments_.AppendSwitch(switches::kEnableFileCookies); 189 launch_arguments_.AppendSwitch(switches::kEnableFileCookies);
188 if (dom_automation_enabled_) 190 if (dom_automation_enabled_)
189 launch_arguments_.AppendSwitch(switches::kDomAutomationController); 191 launch_arguments_.AppendSwitch(switches::kDomAutomationController);
192 if (stats_collection_controller_enabled_)
193 launch_arguments_.AppendSwitch(switches::kStatsCollectionController);
190 // Allow off-store extension installs. 194 // Allow off-store extension installs.
191 launch_arguments_.AppendSwitchASCII( 195 launch_arguments_.AppendSwitchASCII(
192 switches::kEasyOffStoreExtensionInstall, "1"); 196 switches::kEasyOffStoreExtensionInstall, "1");
193 if (!homepage_.empty()) { 197 if (!homepage_.empty()) {
194 // Pass |homepage_| both as an arg (so that it opens on startup) and to the 198 // Pass |homepage_| both as an arg (so that it opens on startup) and to the
195 // homepage switch (so that the homepage is set). 199 // homepage switch (so that the homepage is set).
196 200
197 if (!launch_arguments_.HasSwitch(switches::kHomePage)) 201 if (!launch_arguments_.HasSwitch(switches::kHomePage))
198 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_); 202 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_);
199 203
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 ASSERT_TRUE(session_end_completed); 694 ASSERT_TRUE(session_end_completed);
691 695
692 // Make sure session restore says we didn't crash. 696 // Make sure session restore says we didn't crash.
693 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences()); 697 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences());
694 ASSERT_TRUE(profile_prefs.get()); 698 ASSERT_TRUE(profile_prefs.get());
695 std::string exit_type; 699 std::string exit_type;
696 ASSERT_TRUE(profile_prefs->GetString(prefs::kSessionExitedCleanly, 700 ASSERT_TRUE(profile_prefs->GetString(prefs::kSessionExitedCleanly,
697 &exit_type)); 701 &exit_type));
698 EXPECT_EQ(ProfileImpl::kPrefExitTypeNormal, exit_type); 702 EXPECT_EQ(ProfileImpl::kPrefExitTypeNormal, exit_type);
699 } 703 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698