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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/prefs/pref_member.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | 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/pref_member.h" 5 #include "chrome/browser/prefs/pref_member.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/prefs/pref_value_store.h" 9 #include "chrome/browser/prefs/pref_value_store.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
11 #include "chrome/test/base/testing_pref_service.h" 11 #include "chrome/test/base/testing_pref_service.h"
12 #include "content/public/browser/notification_details.h" 12 #include "content/public/browser/notification_details.h"
13 #include "content/public/browser/notification_source.h" 13 #include "content/public/browser/notification_source.h"
14 #include "content/test/test_browser_thread.h" 14 #include "content/test/test_browser_thread.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16
17 using content::BrowserThread;
18
16 namespace { 19 namespace {
17 20
18 const char kBoolPref[] = "bool"; 21 const char kBoolPref[] = "bool";
19 const char kIntPref[] = "int"; 22 const char kIntPref[] = "int";
20 const char kDoublePref[] = "double"; 23 const char kDoublePref[] = "double";
21 const char kStringPref[] = "string"; 24 const char kStringPref[] = "string";
22 25
23 void RegisterTestPrefs(PrefService* prefs) { 26 void RegisterTestPrefs(PrefService* prefs) {
24 prefs->RegisterBooleanPref(kBoolPref, false, PrefService::UNSYNCABLE_PREF); 27 prefs->RegisterBooleanPref(kBoolPref, false, PrefService::UNSYNCABLE_PREF);
25 prefs->RegisterIntegerPref(kIntPref, 0, PrefService::UNSYNCABLE_PREF); 28 prefs->RegisterIntegerPref(kIntPref, 0, PrefService::UNSYNCABLE_PREF);
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 callback->Init(kBoolPref, &prefs); 250 callback->Init(kBoolPref, &prefs);
248 251
249 ASSERT_TRUE(callback->FetchValue()); 252 ASSERT_TRUE(callback->FetchValue());
250 EXPECT_FALSE(callback->value()); 253 EXPECT_FALSE(callback->value());
251 254
252 prefs.SetBoolean(kBoolPref, true); 255 prefs.SetBoolean(kBoolPref, true);
253 256
254 ASSERT_TRUE(callback->FetchValue()); 257 ASSERT_TRUE(callback->FetchValue());
255 EXPECT_TRUE(callback->value()); 258 EXPECT_TRUE(callback->value());
256 } 259 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_member.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698