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

Unified Diff: chrome/browser/google_update_settings_mac_unittest.mm

Issue 173020: Make Mac first run store sentinel in Profile directory. (Closed)
Patch Set: spelling Created 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google_update_settings_mac_unittest.mm
diff --git a/chrome/browser/google_update_settings_mac_unittest.mm b/chrome/browser/google_update_settings_mac_unittest.mm
deleted file mode 100644
index d24c843c194d4c40f8daa3120d3acce560a2983c..0000000000000000000000000000000000000000
--- a/chrome/browser/google_update_settings_mac_unittest.mm
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2009 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 <Foundation/Foundation.h>
-
-#include "base/basictypes.h"
-#include "base/logging.h"
-#include "base/sys_string_conversions.h"
-#include "chrome/installer/util/google_update_constants.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "testing/platform_test.h"
-
-namespace google_update {
-
-bool GetCollectStatsConsentFromDictionary(NSDictionary* dict);
-
-} // namespace google_update
-
-
-class GoogleUpdateTest : public PlatformTest {
-};
-
-TEST_F(GoogleUpdateTest, StatsConstent) {
- using google_update::GetCollectStatsConsentFromDictionary;
-
- // Stats are off by default.
- NSDictionary* empty_dict = [NSDictionary dictionary];
- ASSERT_FALSE(GetCollectStatsConsentFromDictionary(empty_dict));
-
- NSString* collect_stats_key = base::SysWideToNSString(
- google_update::kRegUsageStatsField);
-
- // Stats reporting is ON.
- NSNumber* stats_enabled = [NSNumber numberWithBool:YES];
- NSDictionary* enabled_dict = [NSDictionary
- dictionaryWithObject:stats_enabled
- forKey:collect_stats_key];
- ASSERT_TRUE(GetCollectStatsConsentFromDictionary(enabled_dict));
-
- // Stats reporting is OFF.
- NSNumber* stats_disabled = [NSNumber numberWithBool:NO];
- NSDictionary* disabled_dict = [NSDictionary
- dictionaryWithObject:stats_disabled
- forKey:collect_stats_key];
- ASSERT_FALSE(GetCollectStatsConsentFromDictionary(disabled_dict));
-
- // Check that we fail gracefully if an object of the wrong type is present.
- NSDictionary* wrong_type_dict = [NSDictionary
- dictionaryWithObject:empty_dict
- forKey:collect_stats_key];
- ASSERT_FALSE(GetCollectStatsConsentFromDictionary(wrong_type_dict));
-}

Powered by Google App Engine
This is Rietveld 408576698