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

Side by Side Diff: chrome/browser/metrics/metrics_service_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/metrics/thread_watcher.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <ctype.h> 5 #include <ctype.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/metrics/metrics_service.h" 10 #include "chrome/browser/metrics/metrics_service.h"
(...skipping 12 matching lines...) Expand all
23 MetricsServiceTest() 23 MetricsServiceTest()
24 : ui_thread_(content::BrowserThread::UI, &message_loop_), 24 : ui_thread_(content::BrowserThread::UI, &message_loop_),
25 testing_local_state_(TestingBrowserProcess::GetGlobal()) { 25 testing_local_state_(TestingBrowserProcess::GetGlobal()) {
26 } 26 }
27 27
28 PrefService* GetLocalState() { 28 PrefService* GetLocalState() {
29 return testing_local_state_.Get(); 29 return testing_local_state_.Get();
30 } 30 }
31 31
32 private: 32 private:
33 MessageLoopForUI message_loop_; 33 base::MessageLoopForUI message_loop_;
34 content::TestBrowserThread ui_thread_; 34 content::TestBrowserThread ui_thread_;
35 ScopedTestingLocalState testing_local_state_; 35 ScopedTestingLocalState testing_local_state_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(MetricsServiceTest); 37 DISALLOW_COPY_AND_ASSIGN(MetricsServiceTest);
38 }; 38 };
39 39
40 } // namespace 40 } // namespace
41 41
42 // Ensure the ClientId is formatted as expected. 42 // Ensure the ClientId is formatted as expected.
43 TEST_F(MetricsServiceTest, ClientIdCorrectlyFormatted) { 43 TEST_F(MetricsServiceTest, ClientIdCorrectlyFormatted) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 { 110 {
111 CommandLine::ForCurrentProcess()->AppendSwitch( 111 CommandLine::ForCurrentProcess()->AppendSwitch(
112 switches::kResetVariationState); 112 switches::kResetVariationState);
113 113
114 MetricsService service; 114 MetricsService service;
115 service.GetLowEntropySource(); 115 service.GetLowEntropySource();
116 116
117 EXPECT_TRUE(GetLocalState()->GetString(kCachePrefName).empty()); 117 EXPECT_TRUE(GetLocalState()->GetString(kCachePrefName).empty());
118 } 118 }
119 } 119 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/metrics/thread_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698