OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_version_info.h" | 5 #include "base/file_version_info.h" |
6 #include "chrome_frame/test/chrome_frame_unittests.h" | |
7 #include "chrome_frame/utils.h" | 6 #include "chrome_frame/utils.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 const wchar_t kChannelName[] = L"-dev"; | 9 const wchar_t kChannelName[] = L"-dev"; |
10 const wchar_t kSuffix[] = L"-fix"; | 10 const wchar_t kSuffix[] = L"-fix"; |
11 | 11 |
12 TEST(UtilTests, GetModuleVersionTest) { | 12 TEST(UtilTests, GetModuleVersionTest) { |
13 HMODULE mod = GetModuleHandle(L"kernel32.dll"); | 13 HMODULE mod = GetModuleHandle(L"kernel32.dll"); |
14 EXPECT_NE(mod, static_cast<HMODULE>(NULL)); | 14 EXPECT_NE(mod, static_cast<HMODULE>(NULL)); |
15 wchar_t path[MAX_PATH] = {0}; | 15 wchar_t path[MAX_PATH] = {0}; |
16 GetModuleFileName(mod, path, arraysize(path)); | 16 GetModuleFileName(mod, path, arraysize(path)); |
17 | 17 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 { L"ftp://www.google.ca", true, false }, | 84 { L"ftp://www.google.ca", true, false }, |
85 { L"file://www.google.ca", true, false }, | 85 { L"file://www.google.ca", true, false }, |
86 { L"file://C:\boot.ini", true, false }, | 86 { L"file://C:\boot.ini", true, false }, |
87 }; | 87 }; |
88 | 88 |
89 for (int i = 0; i < arraysize(test_cases); ++i) { | 89 for (int i = 0; i < arraysize(test_cases); ++i) { |
90 const Cases& test = test_cases[i]; | 90 const Cases& test = test_cases[i]; |
91 EXPECT_EQ(test.expected, IsValidUrlScheme(test.url, test.is_privileged)); | 91 EXPECT_EQ(test.expected, IsValidUrlScheme(test.url, test.is_privileged)); |
92 } | 92 } |
93 } | 93 } |
OLD | NEW |