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

Side by Side Diff: base/win_util_unittest.cc

Issue 3119022: Header cleanup in base.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <windows.h> 5 #include <windows.h>
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "base/string_util.h"
9 #include "base/win_util.h" 8 #include "base/win_util.h"
10 9
11 // The test is somewhat silly, because the Vista bots some have UAC enabled 10 // The test is somewhat silly, because the Vista bots some have UAC enabled
12 // and some have it disabled. At least we check that it does not crash. 11 // and some have it disabled. At least we check that it does not crash.
13 TEST(BaseWinUtilTest, TestIsUACEnabled) { 12 TEST(BaseWinUtilTest, TestIsUACEnabled) {
14 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { 13 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) {
15 win_util::UserAccountControlIsEnabled(); 14 win_util::UserAccountControlIsEnabled();
16 } else { 15 } else {
17 EXPECT_TRUE(win_util::UserAccountControlIsEnabled()); 16 EXPECT_TRUE(win_util::UserAccountControlIsEnabled());
18 } 17 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ASSERT_TRUE(string_buffer); 77 ASSERT_TRUE(string_buffer);
79 78
80 // Verify the string is the same by different calls 79 // Verify the string is the same by different calls
81 EXPECT_EQ(win_util::FormatLastWin32Error(), std::wstring(string_buffer)); 80 EXPECT_EQ(win_util::FormatLastWin32Error(), std::wstring(string_buffer));
82 EXPECT_EQ(win_util::FormatMessage(kAccessDeniedErrorCode), 81 EXPECT_EQ(win_util::FormatMessage(kAccessDeniedErrorCode),
83 std::wstring(string_buffer)); 82 std::wstring(string_buffer));
84 83
85 // Done with the buffer allocated by ::FormatMessage() 84 // Done with the buffer allocated by ::FormatMessage()
86 LocalFree(string_buffer); 85 LocalFree(string_buffer);
87 } 86 }
OLDNEW
« base/tracked.cc ('K') | « base/win_util.cc ('k') | base/worker_pool_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698