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 "base/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_version_info.h" | 6 #include "base/file_version_info.h" |
7 #include "base/file_version_info_win.h" | 7 #include "base/file_version_info_win.h" |
8 #include "base/registry.h" | 8 #include "base/win/registry.h" |
9 #include "chrome_frame/utils.h" | 9 #include "chrome_frame/utils.h" |
10 | 10 |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
13 | 13 |
| 14 using base::win::RegKey; |
| 15 |
14 const wchar_t kChannelName[] = L"-dev"; | 16 const wchar_t kChannelName[] = L"-dev"; |
15 const wchar_t kSuffix[] = L"-fix"; | 17 const wchar_t kSuffix[] = L"-fix"; |
16 | 18 |
17 TEST(UtilTests, GetModuleVersionTest) { | 19 TEST(UtilTests, GetModuleVersionTest) { |
18 HMODULE mod = GetModuleHandle(L"kernel32.dll"); | 20 HMODULE mod = GetModuleHandle(L"kernel32.dll"); |
19 EXPECT_NE(mod, static_cast<HMODULE>(NULL)); | 21 EXPECT_NE(mod, static_cast<HMODULE>(NULL)); |
20 wchar_t path[MAX_PATH] = {0}; | 22 wchar_t path[MAX_PATH] = {0}; |
21 GetModuleFileName(mod, path, arraysize(path)); | 23 GetModuleFileName(mod, path, arraysize(path)); |
22 | 24 |
23 // Use the method that goes to disk | 25 // Use the method that goes to disk |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 RendererTypeForUrl(kTestUrl)); | 349 RendererTypeForUrl(kTestUrl)); |
348 opt_for_host.WriteValue(kTestFilter, L""); | 350 opt_for_host.WriteValue(kTestFilter, L""); |
349 EXPECT_EQ(RENDERER_TYPE_UNDETERMINED, RendererTypeForUrl(kTestUrl)); | 351 EXPECT_EQ(RENDERER_TYPE_UNDETERMINED, RendererTypeForUrl(kTestUrl)); |
350 | 352 |
351 // Cleanup. | 353 // Cleanup. |
352 opt_for_gcf.DeleteValue(kTestFilter); | 354 opt_for_gcf.DeleteValue(kTestFilter); |
353 opt_for_host.DeleteValue(kTestFilter); | 355 opt_for_host.DeleteValue(kTestFilter); |
354 config_key.WriteValue(kEnableGCFRendererByDefault, saved_default_renderer); | 356 config_key.WriteValue(kEnableGCFRendererByDefault, saved_default_renderer); |
355 } | 357 } |
356 | 358 |
OLD | NEW |