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

Side by Side Diff: base/win_util_unittest.cc

Issue 3071012: Cleanup: Remove unneeded headers from base/ (part 1) (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
« no previous file with comments | « base/trace_event_win.cc ('k') | chrome/app/breakpad_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/registry.h"
9 #include "base/string_util.h" 8 #include "base/string_util.h"
10 #include "base/win_util.h" 9 #include "base/win_util.h"
11 10
12 // The test is somewhat silly, because the Vista bots some have UAC enabled 11 // The test is somewhat silly, because the Vista bots some have UAC enabled
13 // and some have it disabled. At least we check that it does not crash. 12 // and some have it disabled. At least we check that it does not crash.
14 TEST(BaseWinUtilTest, TestIsUACEnabled) { 13 TEST(BaseWinUtilTest, TestIsUACEnabled) {
15 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { 14 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) {
16 win_util::UserAccountControlIsEnabled(); 15 win_util::UserAccountControlIsEnabled();
17 } else { 16 } else {
18 EXPECT_TRUE(win_util::UserAccountControlIsEnabled()); 17 EXPECT_TRUE(win_util::UserAccountControlIsEnabled());
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 ASSERT_TRUE(string_buffer); 78 ASSERT_TRUE(string_buffer);
80 79
81 // Verify the string is the same by different calls 80 // Verify the string is the same by different calls
82 EXPECT_EQ(win_util::FormatLastWin32Error(), std::wstring(string_buffer)); 81 EXPECT_EQ(win_util::FormatLastWin32Error(), std::wstring(string_buffer));
83 EXPECT_EQ(win_util::FormatMessage(kAccessDeniedErrorCode), 82 EXPECT_EQ(win_util::FormatMessage(kAccessDeniedErrorCode),
84 std::wstring(string_buffer)); 83 std::wstring(string_buffer));
85 84
86 // Done with the buffer allocated by ::FormatMessage() 85 // Done with the buffer allocated by ::FormatMessage()
87 LocalFree(string_buffer); 86 LocalFree(string_buffer);
88 } 87 }
OLDNEW
« no previous file with comments | « base/trace_event_win.cc ('k') | chrome/app/breakpad_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698