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

Unified Diff: chrome/browser/prefs/pref_notifier_impl_unittest.cc

Issue 7719007: Add a gyp flag to enable dcheck by default in release without (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/prefs/pref_notifier_impl_unittest.cc
===================================================================
--- chrome/browser/prefs/pref_notifier_impl_unittest.cc (revision 101967)
+++ chrome/browser/prefs/pref_notifier_impl_unittest.cc (working copy)
@@ -104,13 +104,13 @@
// Re-adding the same observer for the same pref doesn't change anything.
// Skip this in debug mode, since it hits a DCHECK and death tests aren't
// thread-safe.
-#if defined(NDEBUG)
+#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
notifier.AddPrefObserver(pref_name, &obs1_);
ASSERT_EQ(1u, notifier.CountObserver(pref_name, &obs1_));
ASSERT_EQ(0u, notifier.CountObserver(pref_name2, &obs1_));
ASSERT_EQ(0u, notifier.CountObserver(pref_name, &obs2_));
ASSERT_EQ(0u, notifier.CountObserver(pref_name2, &obs2_));
-#endif // NDEBUG
+#endif
// Ensure that we can add the same observer to a different pref.
notifier.AddPrefObserver(pref_name2, &obs1_);

Powered by Google App Engine
This is Rietveld 408576698