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

Side by Side Diff: chrome/common/pref_service_uitest.cc

Issue 159658: Remove duplication of DieFileDie, and move it to proper location. (Closed)
Patch Set: Created 11 years, 4 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
« no previous file with comments | « chrome/browser/download/save_page_uitest.cc ('k') | chrome/test/in_process_browser_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/test_file_util.h"
9 #include "base/values.h" 10 #include "base/values.h"
10 #include "build/build_config.h" 11 #include "build/build_config.h"
11 #include "chrome/common/chrome_constants.h" 12 #include "chrome/common/chrome_constants.h"
12 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/json_value_serializer.h" 14 #include "chrome/common/json_value_serializer.h"
14 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
15 #include "chrome/test/automation/browser_proxy.h" 16 #include "chrome/test/automation/browser_proxy.h"
16 #include "chrome/test/automation/window_proxy.h" 17 #include "chrome/test/automation/window_proxy.h"
17 #include "chrome/test/ui/ui_test.h" 18 #include "chrome/test/ui/ui_test.h"
18 19
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 bool LaunchAppWithProfile() { 54 bool LaunchAppWithProfile() {
54 if (!file_util::PathExists(tmp_pref_file_)) 55 if (!file_util::PathExists(tmp_pref_file_))
55 return false; 56 return false;
56 UITest::SetUp(); 57 UITest::SetUp();
57 return true; 58 return true;
58 } 59 }
59 60
60 void TearDown() { 61 void TearDown() {
61 UITest::TearDown(); 62 UITest::TearDown();
62 63
63 EXPECT_TRUE(DieFileDie(tmp_profile_, true)); 64 EXPECT_TRUE(file_util::DieFileDie(tmp_profile_, true));
64 } 65 }
65 66
66 public: 67 public:
67 FilePath tmp_pref_file_; 68 FilePath tmp_pref_file_;
68 FilePath tmp_profile_; 69 FilePath tmp_profile_;
69 }; 70 };
70 71
71 #if defined(OS_WIN) 72 #if defined(OS_WIN)
72 // This test verifies that the window position from the prefs file is restored 73 // This test verifies that the window position from the prefs file is restored
73 // when the app restores. This doesn't really make sense on Linux, where 74 // when the app restores. This doesn't really make sense on Linux, where
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 // Find if launched window is maximized 127 // Find if launched window is maximized
127 bool is_window_maximized = (window_placement.showCmd == SW_MAXIMIZE); 128 bool is_window_maximized = (window_placement.showCmd == SW_MAXIMIZE);
128 129
129 bool is_maximized = false; 130 bool is_maximized = false;
130 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + L".maximized", 131 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + L".maximized",
131 &is_maximized)); 132 &is_maximized));
132 EXPECT_EQ(is_maximized, is_window_maximized); 133 EXPECT_EQ(is_maximized, is_window_maximized);
133 } 134 }
134 #endif 135 #endif
OLDNEW
« no previous file with comments | « chrome/browser/download/save_page_uitest.cc ('k') | chrome/test/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698