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

Unified Diff: ceee/ie/common/ie_util_unittest.cc

Issue 6090006: Regkey functions return error code instead of bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « ceee/ie/common/ie_util.cc ('k') | ceee/ie/plugin/toolband/toolband_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ceee/ie/common/ie_util_unittest.cc
===================================================================
--- ceee/ie/common/ie_util_unittest.cc (revision 71761)
+++ ceee/ie/common/ie_util_unittest.cc (working copy)
@@ -70,11 +70,11 @@
base::win::RegKey stats_key(HKEY_CURRENT_USER, kAddonStatsRegPath, KEY_WRITE);
ASSERT_TRUE(stats_key.Valid());
- ASSERT_TRUE(stats_key.WriteValue(L"LoadTime", L"time"));
+ ASSERT_EQ(ERROR_SUCCESS, stats_key.WriteValue(L"LoadTime", L"time"));
EXPECT_EQ(-1, GetAverageAddonLoadTimeMs(kAddonGuid));
DWORD time = 11;
- ASSERT_TRUE(stats_key.WriteValue(L"LoadTime", time));
+ ASSERT_EQ(ERROR_SUCCESS, stats_key.WriteValue(L"LoadTime", time));
EXPECT_EQ(11, GetAverageAddonLoadTimeMs(kAddonGuid));
}
@@ -89,24 +89,25 @@
base::win::RegKey stats_key(HKEY_CURRENT_USER, kAddonStatsRegPath, KEY_WRITE);
ASSERT_TRUE(stats_key.Valid());
- ASSERT_TRUE(stats_key.WriteValue(L"LoadTimeArray", L"time"));
+ ASSERT_EQ(ERROR_SUCCESS, stats_key.WriteValue(L"LoadTimeArray", L"time"));
EXPECT_EQ(-1, GetAverageAddonLoadTimeMs(kAddonGuid));
DWORD time[] = {1, 2, 3, 4, -1, 10};
- ASSERT_TRUE(stats_key.WriteValue(L"LoadTimeArray", &time, sizeof(time[0]),
- REG_BINARY));
+ ASSERT_EQ(ERROR_SUCCESS, stats_key.WriteValue(L"LoadTimeArray", &time,
+ sizeof(time[0]), REG_BINARY));
EXPECT_EQ(-1, GetAverageAddonLoadTimeMs(kAddonGuid));
- ASSERT_TRUE(stats_key.WriteValue(L"LoadTimeArray", &time, 10, REG_BINARY));
+ ASSERT_EQ(ERROR_SUCCESS,
+ stats_key.WriteValue(L"LoadTimeArray", &time, 10, REG_BINARY));
EXPECT_EQ(-1, GetAverageAddonLoadTimeMs(kAddonGuid));
- ASSERT_TRUE(stats_key.WriteValue(L"LoadTimeArray", &time, 4 * sizeof(time[0]),
- REG_BINARY));
+ ASSERT_EQ(ERROR_SUCCESS, stats_key.WriteValue(L"LoadTimeArray",
+ &time, 4 * sizeof(time[0]), REG_BINARY));
EXPECT_EQ(2, GetAverageAddonLoadTimeMs(kAddonGuid));
- ASSERT_TRUE(stats_key.WriteValue(L"LoadTimeArray", time, sizeof(time),
- REG_BINARY));
+ ASSERT_EQ(ERROR_SUCCESS, stats_key.WriteValue(L"LoadTimeArray", time,
+ sizeof(time), REG_BINARY));
EXPECT_EQ(4, GetAverageAddonLoadTimeMs(kAddonGuid));
}
« no previous file with comments | « ceee/ie/common/ie_util.cc ('k') | ceee/ie/plugin/toolband/toolband_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698