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