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

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

Issue 16160006: Revert 202620 "Collect tab timing information for use in telemen..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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),
89 show_window_(false), 88 show_window_(false),
90 clear_profile_(true), 89 clear_profile_(true),
91 include_testing_id_(true), 90 include_testing_id_(true),
92 enable_file_cookies_(true) { 91 enable_file_cookies_(true) {
93 PathService::Get(chrome::DIR_APP, &browser_directory_); 92 PathService::Get(chrome::DIR_APP, &browser_directory_);
94 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); 93 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
95 } 94 }
96 95
97 UITestBase::UITestBase(base::MessageLoop::Type msg_loop_type) 96 UITestBase::UITestBase(base::MessageLoop::Type msg_loop_type)
98 : launch_arguments_(CommandLine::NO_PROGRAM), 97 : launch_arguments_(CommandLine::NO_PROGRAM),
99 expected_errors_(0), 98 expected_errors_(0),
100 expected_crashes_(0), 99 expected_crashes_(0),
101 wait_for_initial_loads_(true), 100 wait_for_initial_loads_(true),
102 dom_automation_enabled_(false), 101 dom_automation_enabled_(false),
103 stats_collection_controller_enabled_(false),
104 show_window_(false), 102 show_window_(false),
105 clear_profile_(true), 103 clear_profile_(true),
106 include_testing_id_(true), 104 include_testing_id_(true),
107 enable_file_cookies_(true) { 105 enable_file_cookies_(true) {
108 PathService::Get(chrome::DIR_APP, &browser_directory_); 106 PathService::Get(chrome::DIR_APP, &browser_directory_);
109 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); 107 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
110 } 108 }
111 109
112 UITestBase::~UITestBase() {} 110 UITestBase::~UITestBase() {}
113 111
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 test_launcher_utils::PrepareBrowserCommandLineForTests(&launch_arguments_); 180 test_launcher_utils::PrepareBrowserCommandLineForTests(&launch_arguments_);
183 181
184 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWaitForDebugger)) 182 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWaitForDebugger))
185 launch_arguments_.AppendSwitch(switches::kWaitForDebugger); 183 launch_arguments_.AppendSwitch(switches::kWaitForDebugger);
186 184
187 // We need cookies on file:// for things like the page cycler. 185 // We need cookies on file:// for things like the page cycler.
188 if (enable_file_cookies_) 186 if (enable_file_cookies_)
189 launch_arguments_.AppendSwitch(switches::kEnableFileCookies); 187 launch_arguments_.AppendSwitch(switches::kEnableFileCookies);
190 if (dom_automation_enabled_) 188 if (dom_automation_enabled_)
191 launch_arguments_.AppendSwitch(switches::kDomAutomationController); 189 launch_arguments_.AppendSwitch(switches::kDomAutomationController);
192 if (stats_collection_controller_enabled_)
193 launch_arguments_.AppendSwitch(switches::kStatsCollectionController);
194 // Allow off-store extension installs. 190 // Allow off-store extension installs.
195 launch_arguments_.AppendSwitchASCII( 191 launch_arguments_.AppendSwitchASCII(
196 switches::kEasyOffStoreExtensionInstall, "1"); 192 switches::kEasyOffStoreExtensionInstall, "1");
197 if (!homepage_.empty()) { 193 if (!homepage_.empty()) {
198 // Pass |homepage_| both as an arg (so that it opens on startup) and to the 194 // Pass |homepage_| both as an arg (so that it opens on startup) and to the
199 // homepage switch (so that the homepage is set). 195 // homepage switch (so that the homepage is set).
200 196
201 if (!launch_arguments_.HasSwitch(switches::kHomePage)) 197 if (!launch_arguments_.HasSwitch(switches::kHomePage))
202 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_); 198 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_);
203 199
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 ASSERT_TRUE(session_end_completed); 690 ASSERT_TRUE(session_end_completed);
695 691
696 // Make sure session restore says we didn't crash. 692 // Make sure session restore says we didn't crash.
697 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences()); 693 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences());
698 ASSERT_TRUE(profile_prefs.get()); 694 ASSERT_TRUE(profile_prefs.get());
699 std::string exit_type; 695 std::string exit_type;
700 ASSERT_TRUE(profile_prefs->GetString(prefs::kSessionExitedCleanly, 696 ASSERT_TRUE(profile_prefs->GetString(prefs::kSessionExitedCleanly,
701 &exit_type)); 697 &exit_type));
702 EXPECT_EQ(ProfileImpl::kPrefExitTypeNormal, exit_type); 698 EXPECT_EQ(ProfileImpl::kPrefExitTypeNormal, exit_type);
703 } 699 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/test/ui/ui_test.h ('k') | trunk/src/content/browser/histogram_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698