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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 495 |
496 void UITestBase::AppendBrowserLaunchSwitch(const char* name) { | 496 void UITestBase::AppendBrowserLaunchSwitch(const char* name) { |
497 launch_arguments_.AppendSwitch(name); | 497 launch_arguments_.AppendSwitch(name); |
498 } | 498 } |
499 | 499 |
500 void UITestBase::AppendBrowserLaunchSwitch(const char* name, | 500 void UITestBase::AppendBrowserLaunchSwitch(const char* name, |
501 const char* value) { | 501 const char* value) { |
502 launch_arguments_.AppendSwitchASCII(name, value); | 502 launch_arguments_.AppendSwitchASCII(name, value); |
503 } | 503 } |
504 | 504 |
505 bool UITestBase::BeginTracing(const std::string& categories) { | 505 bool UITestBase::BeginTracing(const std::string& category_patterns) { |
506 return automation()->BeginTracing(categories); | 506 return automation()->BeginTracing(category_patterns); |
507 } | 507 } |
508 | 508 |
509 std::string UITestBase::EndTracing() { | 509 std::string UITestBase::EndTracing() { |
510 std::string json_trace_output; | 510 std::string json_trace_output; |
511 if (!automation()->EndTracing(&json_trace_output)) | 511 if (!automation()->EndTracing(&json_trace_output)) |
512 return ""; | 512 return ""; |
513 return json_trace_output; | 513 return json_trace_output; |
514 } | 514 } |
515 | 515 |
516 // UITest methods | 516 // UITest methods |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 ASSERT_TRUE(session_end_completed); | 714 ASSERT_TRUE(session_end_completed); |
715 | 715 |
716 // Make sure session restore says we didn't crash. | 716 // Make sure session restore says we didn't crash. |
717 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences()); | 717 scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences()); |
718 ASSERT_TRUE(profile_prefs.get()); | 718 ASSERT_TRUE(profile_prefs.get()); |
719 std::string exit_type; | 719 std::string exit_type; |
720 ASSERT_TRUE(profile_prefs->GetString(prefs::kSessionExitedCleanly, | 720 ASSERT_TRUE(profile_prefs->GetString(prefs::kSessionExitedCleanly, |
721 &exit_type)); | 721 &exit_type)); |
722 EXPECT_EQ(ProfileImpl::kPrefExitTypeNormal, exit_type); | 722 EXPECT_EQ(ProfileImpl::kPrefExitTypeNormal, exit_type); |
723 } | 723 } |
OLD | NEW |