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

Side by Side Diff: chrome/browser/policy/device_status_collector_browsertest.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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
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 "chrome/browser/policy/device_status_collector.h" 5 #include "chrome/browser/policy/device_status_collector.h"
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // Convenience method. 224 // Convenience method.
225 int64 ActivePeriodMilliseconds() { 225 int64 ActivePeriodMilliseconds() {
226 return policy::DeviceStatusCollector::kIdlePollIntervalSeconds * 1000; 226 return policy::DeviceStatusCollector::kIdlePollIntervalSeconds * 1000;
227 } 227 }
228 228
229 MessageLoop message_loop_; 229 MessageLoop message_loop_;
230 content::TestBrowserThread ui_thread_; 230 content::TestBrowserThread ui_thread_;
231 content::TestBrowserThread file_thread_; 231 content::TestBrowserThread file_thread_;
232 content::TestBrowserThread io_thread_; 232 content::TestBrowserThread io_thread_;
233 233
234 TestingPrefService prefs_; 234 TestingPrefServiceSimple prefs_;
235 chromeos::system::MockStatisticsProvider statistics_provider_; 235 chromeos::system::MockStatisticsProvider statistics_provider_;
236 scoped_ptr<TestingDeviceStatusCollector> status_collector_; 236 scoped_ptr<TestingDeviceStatusCollector> status_collector_;
237 em::DeviceStatusReportRequest status_; 237 em::DeviceStatusReportRequest status_;
238 chromeos::CrosSettings* cros_settings_; 238 chromeos::CrosSettings* cros_settings_;
239 chromeos::CrosSettingsProvider* device_settings_provider_; 239 chromeos::CrosSettingsProvider* device_settings_provider_;
240 chromeos::StubCrosSettingsProvider stub_settings_provider_; 240 chromeos::StubCrosSettingsProvider stub_settings_provider_;
241 }; 241 };
242 242
243 TEST_F(DeviceStatusCollectorTest, AllIdle) { 243 TEST_F(DeviceStatusCollectorTest, AllIdle) {
244 IdleState test_states[] = { 244 IdleState test_states[] = {
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // Check that after enabling location reporting again, an error is reported 564 // Check that after enabling location reporting again, an error is reported
565 // if no valid fix is available. 565 // if no valid fix is available.
566 SetMockPositionToReturnNext(invalid_fix); 566 SetMockPositionToReturnNext(invalid_fix);
567 cros_settings_->SetBoolean(chromeos::kReportDeviceLocation, true); 567 cros_settings_->SetBoolean(chromeos::kReportDeviceLocation, true);
568 // Allow the new pref to propagate to the status collector. 568 // Allow the new pref to propagate to the status collector.
569 message_loop_.RunUntilIdle(); 569 message_loop_.RunUntilIdle();
570 CheckThatALocationErrorIsReported(); 570 CheckThatALocationErrorIsReported();
571 } 571 }
572 572
573 } // namespace policy 573 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_status_collector.cc ('k') | chrome/browser/policy/policy_prefs_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698