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 |
11 | 11 |
12 #include <set> | 12 #include <set> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/base_switches.h" | 15 #include "base/base_switches.h" |
16 #include "base/bind.h" | 16 #include "base/bind.h" |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/environment.h" | 18 #include "base/environment.h" |
19 #include "base/file_path.h" | 19 #include "base/file_path.h" |
20 #include "base/file_util.h" | 20 #include "base/file_util.h" |
| 21 #include "base/files/scoped_temp_dir.h" |
21 #include "base/json/json_file_value_serializer.h" | 22 #include "base/json/json_file_value_serializer.h" |
22 #include "base/logging.h" | 23 #include "base/logging.h" |
23 #include "base/memory/scoped_ptr.h" | 24 #include "base/memory/scoped_ptr.h" |
24 #include "base/path_service.h" | 25 #include "base/path_service.h" |
25 #include "base/process_util.h" | 26 #include "base/process_util.h" |
26 #include "base/scoped_temp_dir.h" | |
27 #include "base/string_number_conversions.h" | 27 #include "base/string_number_conversions.h" |
28 #include "base/string_split.h" | 28 #include "base/string_split.h" |
29 #include "base/test/test_file_util.h" | 29 #include "base/test/test_file_util.h" |
30 #include "base/test/test_timeouts.h" | 30 #include "base/test/test_timeouts.h" |
31 #include "base/threading/platform_thread.h" | 31 #include "base/threading/platform_thread.h" |
32 #include "base/time.h" | 32 #include "base/time.h" |
33 #include "base/utf_string_conversions.h" | 33 #include "base/utf_string_conversions.h" |
34 #include "chrome/app/chrome_command_ids.h" | 34 #include "chrome/app/chrome_command_ids.h" |
35 #include "chrome/browser/net/url_fixer_upper.h" | 35 #include "chrome/browser/net/url_fixer_upper.h" |
36 #include "chrome/browser/profiles/profile_impl.h" | 36 #include "chrome/browser/profiles/profile_impl.h" |
37 #include "chrome/common/automation_messages.h" | 37 #include "chrome/common/automation_messages.h" |
38 #include "chrome/common/chrome_constants.h" | 38 #include "chrome/common/chrome_constants.h" |
39 #include "chrome/common/chrome_paths.h" | 39 #include "chrome/common/chrome_paths.h" |
40 #include "chrome/common/chrome_switches.h" | 40 #include "chrome/common/chrome_switches.h" |
41 #include "chrome/common/logging_chrome.h" | 41 #include "chrome/common/logging_chrome.h" |
42 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
43 #include "chrome/common/url_constants.h" | 43 #include "chrome/common/url_constants.h" |
44 #include "chrome/test/automation/automation_proxy.h" | 44 #include "chrome/test/automation/automation_proxy.h" |
45 #include "chrome/test/automation/browser_proxy.h" | 45 #include "chrome/test/automation/browser_proxy.h" |
46 #include "chrome/test/automation/proxy_launcher.h" | 46 #include "chrome/test/automation/proxy_launcher.h" |
47 #include "chrome/test/automation/tab_proxy.h" | 47 #include "chrome/test/automation/tab_proxy.h" |
48 #include "chrome/test/automation/window_proxy.h" | 48 #include "chrome/test/automation/window_proxy.h" |
49 #include "chrome/test/base/chrome_process_util.h" | 49 #include "chrome/test/base/chrome_process_util.h" |
50 #include "chrome/test/base/testing_profile.h" | |
51 #include "chrome/test/base/test_launcher_utils.h" | 50 #include "chrome/test/base/test_launcher_utils.h" |
52 #include "chrome/test/base/test_switches.h" | 51 #include "chrome/test/base/test_switches.h" |
| 52 #include "chrome/test/base/testing_profile.h" |
53 #include "googleurl/src/gurl.h" | 53 #include "googleurl/src/gurl.h" |
54 #include "net/base/net_util.h" | 54 #include "net/base/net_util.h" |
55 #include "ui/gl/gl_implementation.h" | 55 #include "ui/gl/gl_implementation.h" |
56 | 56 |
57 #if defined(OS_WIN) | 57 #if defined(OS_WIN) |
58 #include "base/win/windows_version.h" | 58 #include "base/win/windows_version.h" |
59 #endif | 59 #endif |
60 | 60 |
61 #if defined(USE_AURA) | 61 #if defined(USE_AURA) |
62 #include "ui/compositor/compositor_switches.h" | 62 #include "ui/compositor/compositor_switches.h" |
(...skipping 649 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 |