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

Side by Side Diff: chrome/browser/metrics/variations/resource_request_allowed_notifier_unittest.cc

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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
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/metrics/variations/resource_request_allowed_notifier_te st_util.h" 5 #include "chrome/browser/metrics/variations/resource_request_allowed_notifier_te st_util.h"
6 #include "chrome/common/chrome_notification_types.h" 6 #include "chrome/common/chrome_notification_types.h"
7 #include "chrome/test/base/testing_browser_process.h" 7 #include "chrome/test/base/testing_browser_process.h"
8 #include "chrome/test/base/testing_pref_service.h" 8 #include "chrome/test/base/testing_pref_service.h"
9 #include "content/public/browser/notification_service.h" 9 #include "content/public/browser/notification_service.h"
10 #include "content/public/test/test_browser_thread.h" 10 #include "content/public/test/test_browser_thread.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public: 49 public:
50 ResourceRequestAllowedNotifierTest() 50 ResourceRequestAllowedNotifierTest()
51 : ui_thread(content::BrowserThread::UI, &message_loop), 51 : ui_thread(content::BrowserThread::UI, &message_loop),
52 was_notified_(false) { 52 was_notified_(false) {
53 #if defined(OS_CHROMEOS) 53 #if defined(OS_CHROMEOS)
54 // Set this flag to true so the Init call sets up the wait on the EULA. 54 // Set this flag to true so the Init call sets up the wait on the EULA.
55 SetNeedsEulaAcceptance(true); 55 SetNeedsEulaAcceptance(true);
56 #endif 56 #endif
57 resource_request_allowed_notifier_.Init(this); 57 resource_request_allowed_notifier_.Init(this);
58 } 58 }
59 ~ResourceRequestAllowedNotifierTest() { } 59 virtual ~ResourceRequestAllowedNotifierTest() { }
60 60
61 bool was_notified() const { return was_notified_; } 61 bool was_notified() const { return was_notified_; }
62 62
63 // ResourceRequestAllowedNotifier::Observer override: 63 // ResourceRequestAllowedNotifier::Observer override:
64 virtual void OnResourceRequestsAllowed() OVERRIDE { 64 virtual void OnResourceRequestsAllowed() OVERRIDE {
65 was_notified_ = true; 65 was_notified_ = true;
66 } 66 }
67 67
68 // Network manipulation methods: 68 // Network manipulation methods:
69 void SetWasWaitingForNetwork(bool waiting) { 69 void SetWasWaitingForNetwork(bool waiting) {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 DisableEulaAndNetwork(); 235 DisableEulaAndNetwork();
236 236
237 SimulateNetworkConnectionChange( 237 SimulateNetworkConnectionChange(
238 net::NetworkChangeNotifier::CONNECTION_WIFI); 238 net::NetworkChangeNotifier::CONNECTION_WIFI);
239 EXPECT_FALSE(was_notified()); 239 EXPECT_FALSE(was_notified());
240 240
241 SimulateEulaAccepted(); 241 SimulateEulaAccepted();
242 EXPECT_FALSE(was_notified()); 242 EXPECT_FALSE(was_notified());
243 } 243 }
244 #endif // OS_CHROMEOS 244 #endif // OS_CHROMEOS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698