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

Unified Diff: base/win/win_util_unittest.cc

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/win_util.cc ('k') | base/win/windows_version.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/win_util_unittest.cc
diff --git a/base/win/win_util_unittest.cc b/base/win/win_util_unittest.cc
deleted file mode 100644
index 24141cd68a03022af0af7dc1abf9c81d2e68802f..0000000000000000000000000000000000000000
--- a/base/win/win_util_unittest.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <windows.h>
-
-#include "base/basictypes.h"
-#include "base/strings/string_util.h"
-#include "base/win/win_util.h"
-#include "base/win/windows_version.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace base {
-namespace win {
-
-namespace {
-
-// Saves the current thread's locale ID when initialized, and restores it when
-// the instance is going out of scope.
-class ThreadLocaleSaver {
- public:
- ThreadLocaleSaver() : original_locale_id_(GetThreadLocale()) {}
- ~ThreadLocaleSaver() { SetThreadLocale(original_locale_id_); }
-
- private:
- LCID original_locale_id_;
-
- DISALLOW_COPY_AND_ASSIGN(ThreadLocaleSaver);
-};
-
-} // namespace
-
-// The test is somewhat silly, because the Vista bots some have UAC enabled
-// and some have it disabled. At least we check that it does not crash.
-TEST(BaseWinUtilTest, TestIsUACEnabled) {
- if (GetVersion() >= base::win::VERSION_VISTA) {
- UserAccountControlIsEnabled();
- } else {
- EXPECT_TRUE(UserAccountControlIsEnabled());
- }
-}
-
-TEST(BaseWinUtilTest, TestGetUserSidString) {
- std::wstring user_sid;
- EXPECT_TRUE(GetUserSidString(&user_sid));
- EXPECT_TRUE(!user_sid.empty());
-}
-
-TEST(BaseWinUtilTest, TestGetNonClientMetrics) {
- NONCLIENTMETRICS_XP metrics = {0};
- GetNonClientMetrics(&metrics);
- EXPECT_GT(metrics.cbSize, 0u);
- EXPECT_GT(metrics.iScrollWidth, 0);
- EXPECT_GT(metrics.iScrollHeight, 0);
-}
-
-} // namespace win
-} // namespace base
« no previous file with comments | « base/win/win_util.cc ('k') | base/win/windows_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698