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

Unified Diff: base/service_utils_unittest.cc

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/service_utils.cc ('k') | base/shared_any.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/service_utils_unittest.cc
diff --git a/base/service_utils_unittest.cc b/base/service_utils_unittest.cc
deleted file mode 100644
index 00fe871229e6b64a6ac3900992093d3b4dbe1db8..0000000000000000000000000000000000000000
--- a/base/service_utils_unittest.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2007-2009 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ========================================================================
-
-#include "omaha/base/service_utils.h"
-#include <lmsname.h>
-#include "omaha/testing/unit_test.h"
-
-namespace omaha {
-
-// Set to true when the test callback sees the service indicated in the
-// context parameter.
-bool found_service = false;
-
-HRESULT TestEnumCallback(void* context, const wchar_t* service_name) {
- EXPECT_TRUE(context);
-
- const wchar_t* find_service_name = reinterpret_cast<const wchar_t*>(context);
- if (lstrcmpW(service_name, find_service_name) == 0) {
- found_service = true;
- }
-
- return S_OK;
-}
-
-TEST(ServiceUtilsTest, ScmDatabaseEnumerateServices) {
- found_service = false;
- EXPECT_TRUE(SUCCEEDED(ScmDatabase::EnumerateServices(TestEnumCallback,
- reinterpret_cast<void*>(_T("RpcSs")))));
- EXPECT_TRUE(found_service);
-}
-
-TEST(ServiceUtilsTest, IsServiceInstalled) {
- EXPECT_TRUE(ServiceInstall::IsServiceInstalled(SERVICE_SCHEDULE));
- EXPECT_FALSE(ServiceInstall::IsServiceInstalled(_T("FooBar")));
-}
-
-TEST(ServiceUtilsTest, IsServiceRunning) {
- EXPECT_TRUE(ServiceUtils::IsServiceRunning(SERVICE_SCHEDULE));
- EXPECT_FALSE(ServiceUtils::IsServiceRunning(_T("FooBar")));
-}
-
-TEST(ServiceUtilsTest, IsServiceDisabled) {
- EXPECT_FALSE(ServiceUtils::IsServiceDisabled(SERVICE_SCHEDULE));
-}
-
-} // namespace omaha
-
« no previous file with comments | « base/service_utils.cc ('k') | base/shared_any.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698