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

Side by Side Diff: chrome/browser/prefs/incognito_mode_prefs_unittest.cc

Issue 9658001: Fix incognito_mode_prefs_unittest compile on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/prefs/incognito_mode_prefs.h" 5 #include "chrome/browser/prefs/incognito_mode_prefs.h"
6 6
7 #include "chrome/common/pref_names.h" 7 #include "chrome/common/pref_names.h"
8 #include "chrome/test/base/testing_pref_service.h" 8 #include "chrome/test/base/testing_pref_service.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 typedef IncognitoModePrefsTest IncognitoModePrefsDeathTest; 56 typedef IncognitoModePrefsTest IncognitoModePrefsDeathTest;
57 57
58 // Takes too long to execute on Mac. http://crbug.com/101109 58 // Takes too long to execute on Mac. http://crbug.com/101109
59 #if defined(OS_MACOSX) 59 #if defined(OS_MACOSX)
60 #define MAYBE_GetAvailabilityBadValue DISABLED_GetAvailabilityBadValue 60 #define MAYBE_GetAvailabilityBadValue DISABLED_GetAvailabilityBadValue
61 #else 61 #else
62 #define MAYBE_GetAvailabilityBadValue GetAvailabilityBadValue 62 #define MAYBE_GetAvailabilityBadValue GetAvailabilityBadValue
63 #endif 63 #endif
64 64
65 #if GTEST_HAS_DEATH_TEST
65 TEST_F(IncognitoModePrefsDeathTest, MAYBE_GetAvailabilityBadValue) { 66 TEST_F(IncognitoModePrefsDeathTest, MAYBE_GetAvailabilityBadValue) {
66 prefs_.SetUserPref(prefs::kIncognitoModeAvailability, 67 prefs_.SetUserPref(prefs::kIncognitoModeAvailability,
67 Value::CreateIntegerValue(-1)); 68 Value::CreateIntegerValue(-1));
68 #if defined(NDEBUG) && defined(DCHECK_ALWAYS_ON) 69 #if defined(NDEBUG) && defined(DCHECK_ALWAYS_ON)
69 EXPECT_DEATH({ 70 EXPECT_DEATH({
70 IncognitoModePrefs::Availability availability = 71 IncognitoModePrefs::Availability availability =
71 IncognitoModePrefs::GetAvailability(&prefs_); 72 IncognitoModePrefs::GetAvailability(&prefs_);
72 EXPECT_EQ(IncognitoModePrefs::ENABLED, availability); 73 EXPECT_EQ(IncognitoModePrefs::ENABLED, availability);
73 }, ""); 74 }, "");
74 #else 75 #else
75 EXPECT_DEBUG_DEATH({ 76 EXPECT_DEBUG_DEATH({
76 IncognitoModePrefs::Availability availability = 77 IncognitoModePrefs::Availability availability =
77 IncognitoModePrefs::GetAvailability(&prefs_); 78 IncognitoModePrefs::GetAvailability(&prefs_);
78 EXPECT_EQ(IncognitoModePrefs::ENABLED, availability); 79 EXPECT_EQ(IncognitoModePrefs::ENABLED, availability);
79 }, ""); 80 }, "");
80 #endif 81 #endif
81 } 82 }
83 #endif // GTEST_HAS_DEATH_TEST
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698