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

Unified Diff: chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.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, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
index 9323be7470409a4450f676928cd8b4f04338521e..1011242366f5c11d051c575cced59919a10c7423 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
@@ -226,7 +226,7 @@ TEST_F(SpellcheckCustomDictionaryTest, LegacyEmptyDictionaryShouldBeConverted) {
profile_.GetPath().Append(chrome::kCustomDictionaryFileName);
std::string content;
- file_util::WriteFile(path, content.c_str(), content.length());
+ base::WriteFile(path, content.c_str(), content.length());
WordList loaded_custom_words = LoadDictionaryFile(path);
EXPECT_TRUE(loaded_custom_words.empty());
}
@@ -239,7 +239,7 @@ TEST_F(SpellcheckCustomDictionaryTest,
profile_.GetPath().Append(chrome::kCustomDictionaryFileName);
std::string content = "foo\nbar\nfoo\n";
- file_util::WriteFile(path, content.c_str(), content.length());
+ base::WriteFile(path, content.c_str(), content.length());
WordList loaded_custom_words = LoadDictionaryFile(path);
WordList expected;
expected.push_back("bar");
@@ -257,7 +257,7 @@ TEST_F(SpellcheckCustomDictionaryTest,
std::string content = "foo\n foo bar \n\n \nbar\n"
"01234567890123456789012345678901234567890123456789"
"01234567890123456789012345678901234567890123456789";
- file_util::WriteFile(path, content.c_str(), content.length());
+ base::WriteFile(path, content.c_str(), content.length());
WordList loaded_custom_words = LoadDictionaryFile(path);
WordList expected;
expected.push_back("bar");
@@ -274,7 +274,7 @@ TEST_F(SpellcheckCustomDictionaryTest, CorruptedWriteShouldBeRecovered) {
profile_.GetPath().Append(chrome::kCustomDictionaryFileName);
std::string content = "foo\nbar";
- file_util::WriteFile(path, content.c_str(), content.length());
+ base::WriteFile(path, content.c_str(), content.length());
WordList loaded_custom_words = LoadDictionaryFile(path);
WordList expected;
expected.push_back("bar");
@@ -287,7 +287,7 @@ TEST_F(SpellcheckCustomDictionaryTest, CorruptedWriteShouldBeRecovered) {
content.clear();
base::ReadFileToString(path, &content);
content.append("corruption");
- file_util::WriteFile(path, content.c_str(), content.length());
+ base::WriteFile(path, content.c_str(), content.length());
loaded_custom_words = LoadDictionaryFile(path);
EXPECT_EQ(expected, loaded_custom_words);
}
« no previous file with comments | « chrome/browser/shell_integration_linux_unittest.cc ('k') | chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698