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

Unified Diff: chrome/installer/util/master_preferences_unittest.cc

Issue 10035042: Rewrite base::JSONReader to be 35-40% faster, depending on the input string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix Windows, address comments Created 8 years, 7 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
« no previous file with comments | « chrome/common/net/gaia/oauth2_mint_token_flow_unittest.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/master_preferences_unittest.cc
diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc
index 01b9a0bd321fb1d74c2363de1c1e95ec74d8acd0..f0ecd6d8ce18f765dcbbfa30a35c89ce2377f3da 100644
--- a/chrome/installer/util/master_preferences_unittest.cc
+++ b/chrome/installer/util/master_preferences_unittest.cc
@@ -68,7 +68,7 @@ TEST_F(MasterPreferencesTest, ParseDistroParams) {
" }\n"
"} \n";
- EXPECT_TRUE(file_util::WriteFile(prefs_file(), text, sizeof(text)));
+ EXPECT_TRUE(file_util::WriteFile(prefs_file(), text, strlen(text)));
installer::MasterPreferences prefs(prefs_file());
const char* expected_true[] = {
@@ -125,7 +125,7 @@ TEST_F(MasterPreferencesTest, ParseMissingDistroParams) {
" }\n"
"} \n";
- EXPECT_TRUE(file_util::WriteFile(prefs_file(), text, sizeof(text)));
+ EXPECT_TRUE(file_util::WriteFile(prefs_file(), text, strlen(text)));
installer::MasterPreferences prefs(prefs_file());
ExpectedBooleans expected_bool[] = {
@@ -185,7 +185,7 @@ TEST_F(MasterPreferencesTest, FirstRunTabs) {
" ]\n"
"} \n";
- EXPECT_TRUE(file_util::WriteFile(prefs_file(), text, sizeof(text)));
+ EXPECT_TRUE(file_util::WriteFile(prefs_file(), text, strlen(text)));
installer::MasterPreferences prefs(prefs_file());
typedef std::vector<GURL> TabsVector;
TabsVector tabs = prefs.GetFirstRunTabs();
@@ -243,7 +243,7 @@ TEST_F(MasterPreferencesTest, GetInstallPreferencesTest) {
" \"verbose_logging\": false\n"
" }\n"
"} \n";
- EXPECT_TRUE(file_util::WriteFile(prefs_file, text, sizeof(text)));
+ EXPECT_TRUE(file_util::WriteFile(prefs_file, text, strlen(text)));
// Make sure command line values override the values in master preferences.
std::wstring cmd_str(
« no previous file with comments | « chrome/common/net/gaia/oauth2_mint_token_flow_unittest.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698