OLD | NEW |
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/registry.h" | 7 #include "base/registry.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 10 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 ASSERT_TRUE(rlz_lib::SetAccessPointRlz(rlz_lib::GD_DESKBAND, "rlz_apitest")); | 64 ASSERT_TRUE(rlz_lib::SetAccessPointRlz(rlz_lib::GD_DESKBAND, "rlz_apitest")); |
65 | 65 |
66 // Now run all the tests. | 66 // Now run all the tests. |
67 ASSERT_TRUE(RunExtensionTest("rlz")) << message_; | 67 ASSERT_TRUE(RunExtensionTest("rlz")) << message_; |
68 | 68 |
69 ASSERT_EQ(1, MockRlzSendFinancialPingFunction::expected_count()); | 69 ASSERT_EQ(1, MockRlzSendFinancialPingFunction::expected_count()); |
70 ExtensionFunctionDispatcher::ResetFunctions(); | 70 ExtensionFunctionDispatcher::ResetFunctions(); |
71 | 71 |
72 // Now make sure we recorded what was expected. If the code in test.js | 72 // Now make sure we recorded what was expected. If the code in test.js |
73 // changes, need to make appropriate changes here. | 73 // changes, need to make appropriate changes here. |
74 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\N"); | 74 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\N", |
| 75 KEY_READ); |
75 ASSERT_TRUE(key.Valid()); | 76 ASSERT_TRUE(key.Valid()); |
76 | 77 |
77 DWORD value; | 78 DWORD value; |
78 ASSERT_TRUE(key.ReadValueDW(L"D3I", &value)); | 79 ASSERT_TRUE(key.ReadValueDW(L"D3I", &value)); |
79 ASSERT_EQ(1, value); | 80 ASSERT_EQ(1, value); |
80 ASSERT_TRUE(key.ReadValueDW(L"D3S", &value)); | 81 ASSERT_TRUE(key.ReadValueDW(L"D3S", &value)); |
81 ASSERT_EQ(1, value); | 82 ASSERT_EQ(1, value); |
82 ASSERT_TRUE(key.ReadValueDW(L"D3F", &value)); | 83 ASSERT_TRUE(key.ReadValueDW(L"D3F", &value)); |
83 ASSERT_EQ(1, value); | 84 ASSERT_EQ(1, value); |
84 | 85 |
85 ASSERT_TRUE(key.ReadValueDW(L"D4I", &value)); | 86 ASSERT_TRUE(key.ReadValueDW(L"D4I", &value)); |
86 ASSERT_EQ(1, value); | 87 ASSERT_EQ(1, value); |
87 | 88 |
88 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D"); | 89 key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D", |
| 90 KEY_READ); |
89 ASSERT_FALSE(key.Valid()); | 91 ASSERT_FALSE(key.Valid()); |
90 | 92 |
91 // Cleanup. | 93 // Cleanup. |
92 rlz_lib::ClearProductState(rlz_lib::PINYIN_IME, access_points); | 94 rlz_lib::ClearProductState(rlz_lib::PINYIN_IME, access_points); |
93 } | 95 } |
OLD | NEW |