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

Side by Side Diff: chrome/browser/extensions/extension_rlz_apitest.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <map> 5 #include <map>
6 6
7 #include "base/win/registry.h" 7 #include "base/win/registry.h"
8 #include "chrome/browser/extensions/extension_function.h" 8 #include "chrome/browser/extensions/extension_function.h"
9 #include "chrome/browser/extensions/extension_function_dispatcher.h" 9 #include "chrome/browser/extensions/extension_function_dispatcher.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 ASSERT_EQ(3, MockRlzSendFinancialPingFunction::expected_count()); 73 ASSERT_EQ(3, MockRlzSendFinancialPingFunction::expected_count());
74 ExtensionFunctionDispatcher::ResetFunctions(); 74 ExtensionFunctionDispatcher::ResetFunctions();
75 75
76 // Now make sure we recorded what was expected. If the code in test.js 76 // Now make sure we recorded what was expected. If the code in test.js
77 // changes, need to make appropriate changes here. 77 // changes, need to make appropriate changes here.
78 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\N", 78 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\N",
79 KEY_READ); 79 KEY_READ);
80 ASSERT_TRUE(key.Valid()); 80 ASSERT_TRUE(key.Valid());
81 81
82 DWORD value; 82 DWORD value;
83 ASSERT_TRUE(key.ReadValueDW(L"D3I", &value)); 83 ASSERT_EQ(ERROR_SUCCESS, key.ReadValueDW(L"D3I", &value));
84 ASSERT_EQ(1, value); 84 ASSERT_EQ(1, value);
85 ASSERT_TRUE(key.ReadValueDW(L"D3S", &value)); 85 ASSERT_EQ(ERROR_SUCCESS, key.ReadValueDW(L"D3S", &value));
86 ASSERT_EQ(1, value); 86 ASSERT_EQ(1, value);
87 ASSERT_TRUE(key.ReadValueDW(L"D3F", &value)); 87 ASSERT_EQ(ERROR_SUCCESS, key.ReadValueDW(L"D3F", &value));
88 ASSERT_EQ(1, value); 88 ASSERT_EQ(1, value);
89 89
90 ASSERT_TRUE(key.ReadValueDW(L"D4I", &value)); 90 ASSERT_EQ(ERROR_SUCCESS, key.ReadValueDW(L"D4I", &value));
91 ASSERT_EQ(1, value); 91 ASSERT_EQ(1, value);
92 92
93 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D", 93 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D",
94 KEY_READ); 94 KEY_READ);
95 ASSERT_FALSE(key.Valid()); 95 ASSERT_FALSE(key.Valid());
96 96
97 // Cleanup. 97 // Cleanup.
98 rlz_lib::ClearProductState(rlz_lib::PINYIN_IME, access_points); 98 rlz_lib::ClearProductState(rlz_lib::PINYIN_IME, access_points);
99 } 99 }
OLDNEW
« no previous file with comments | « chrome/browser/enumerate_modules_model_win.cc ('k') | chrome/browser/extensions/external_registry_extension_loader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698