Chromium Code Reviews| 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 "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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 if (!launch_arguments_.HasSwitch(switches::kHomePage)) | 198 if (!launch_arguments_.HasSwitch(switches::kHomePage)) |
| 199 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_); | 199 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_); |
| 200 | 200 |
| 201 if (launch_arguments_.GetArgs().empty() && | 201 if (launch_arguments_.GetArgs().empty() && |
| 202 !launch_arguments_.HasSwitch(switches::kRestoreLastSession)) { | 202 !launch_arguments_.HasSwitch(switches::kRestoreLastSession)) { |
| 203 launch_arguments_.AppendArg(homepage_); | 203 launch_arguments_.AppendArg(homepage_); |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 if (!test_name_.empty()) | 206 if (!test_name_.empty()) |
| 207 launch_arguments_.AppendSwitchASCII(switches::kTestName, test_name_); | 207 launch_arguments_.AppendSwitchASCII(switches::kTestName, test_name_); |
| 208 #if defined(USE_AURA) | 208 // TODO: !OS_WIN is temporary, will remove shortly. |
| 209 #if defined(USE_AURA) && !defined(OS_WIN) | |
| 209 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 210 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
|
sky
2013/01/31 05:05:37
All the perf tests we care about are UI tests, so
| |
| 210 switches::kDisableTestCompositor)) { | 211 switches::kDisableTestCompositor)) { |
| 211 launch_arguments_.AppendSwitch(switches::kTestCompositor); | 212 launch_arguments_.AppendSwitch(switches::kTestCompositor); |
| 212 } | 213 } |
| 213 #endif | 214 #endif |
| 214 } | 215 } |
| 215 | 216 |
| 216 void UITestBase::SetUpProfile() { | 217 void UITestBase::SetUpProfile() { |
| 217 } | 218 } |
| 218 | 219 |
| 219 void UITestBase::LaunchBrowser() { | 220 void UITestBase::LaunchBrowser() { |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 712 ASSERT_TRUE(session_end_completed); | 713 ASSERT_TRUE(session_end_completed); |
| 713 | 714 |
| 714 // Make sure session restore says we didn't crash. | 715 // Make sure session restore says we didn't crash. |
| 715 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences()); | 716 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences()); |
| 716 ASSERT_TRUE(profile_prefs.get()); | 717 ASSERT_TRUE(profile_prefs.get()); |
| 717 std::string exit_type; | 718 std::string exit_type; |
| 718 ASSERT_TRUE(profile_prefs->GetString(prefs::kSessionExitedCleanly, | 719 ASSERT_TRUE(profile_prefs->GetString(prefs::kSessionExitedCleanly, |
| 719 &exit_type)); | 720 &exit_type)); |
| 720 EXPECT_EQ(ProfileImpl::kPrefExitTypeNormal, exit_type); | 721 EXPECT_EQ(ProfileImpl::kPrefExitTypeNormal, exit_type); |
| 721 } | 722 } |
| OLD | NEW |