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

Side by Side Diff: chrome/browser/first_run/first_run_browsertest.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 public: 82 public:
83 FirstRunMasterPrefsBrowserTestBase() {} 83 FirstRunMasterPrefsBrowserTestBase() {}
84 84
85 protected: 85 protected:
86 virtual void SetUp() OVERRIDE { 86 virtual void SetUp() OVERRIDE {
87 // All users of this test class need to call SetMasterPreferencesForTest() 87 // All users of this test class need to call SetMasterPreferencesForTest()
88 // before this class' SetUp() is invoked. 88 // before this class' SetUp() is invoked.
89 ASSERT_TRUE(text_.get()); 89 ASSERT_TRUE(text_.get());
90 90
91 ASSERT_TRUE(base::CreateTemporaryFile(&prefs_file_)); 91 ASSERT_TRUE(base::CreateTemporaryFile(&prefs_file_));
92 EXPECT_TRUE(file_util::WriteFile(prefs_file_, text_->c_str(), 92 EXPECT_TRUE(base::WriteFile(prefs_file_, text_->c_str(), text_->size()));
93 text_->size()));
94 first_run::SetMasterPrefsPathForTesting(prefs_file_); 93 first_run::SetMasterPrefsPathForTesting(prefs_file_);
95 94
96 // This invokes BrowserMain, and does the import, so must be done last. 95 // This invokes BrowserMain, and does the import, so must be done last.
97 InProcessBrowserTest::SetUp(); 96 InProcessBrowserTest::SetUp();
98 } 97 }
99 98
100 virtual void TearDown() OVERRIDE { 99 virtual void TearDown() OVERRIDE {
101 EXPECT_TRUE(base::DeleteFile(prefs_file_, false)); 100 EXPECT_TRUE(base::DeleteFile(prefs_file_, false));
102 InProcessBrowserTest::TearDown(); 101 InProcessBrowserTest::TearDown();
103 } 102 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 INSTANTIATE_TEST_CASE_P( 284 INSTANTIATE_TEST_CASE_P(
286 FirstRunMasterPrefsWithTrackedPreferencesInstance, 285 FirstRunMasterPrefsWithTrackedPreferencesInstance,
287 FirstRunMasterPrefsWithTrackedPreferences, 286 FirstRunMasterPrefsWithTrackedPreferences,
288 testing::Values( 287 testing::Values(
289 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement, 288 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement,
290 chrome_prefs::internals::kSettingsEnforcementGroupEnforceOnload, 289 chrome_prefs::internals::kSettingsEnforcementGroupEnforceOnload,
291 chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways)); 290 chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways));
292 291
293 292
294 #endif // !defined(OS_CHROMEOS) 293 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/first_run/first_run_internal_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698