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

Side by Side Diff: chrome/browser/geolocation/geolocation_infobar_queue_controller_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
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 "base/synchronization/waitable_event.h" 5 #include "base/synchronization/waitable_event.h"
6 #include "chrome/browser/geolocation/geolocation_infobar_queue_controller.h" 6 #include "chrome/browser/geolocation/geolocation_infobar_queue_controller.h"
7 #include "chrome/browser/geolocation/geolocation_permission_request_id.h" 7 #include "chrome/browser/geolocation/geolocation_permission_request_id.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 9 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
(...skipping 13 matching lines...) Expand all
24 private: 24 private:
25 // ChromeRenderViewHostTestHarness: 25 // ChromeRenderViewHostTestHarness:
26 virtual void SetUp() OVERRIDE; 26 virtual void SetUp() OVERRIDE;
27 27
28 content::TestBrowserThread ui_thread_; 28 content::TestBrowserThread ui_thread_;
29 29
30 DISALLOW_COPY_AND_ASSIGN(GeolocationInfoBarQueueControllerTests); 30 DISALLOW_COPY_AND_ASSIGN(GeolocationInfoBarQueueControllerTests);
31 }; 31 };
32 32
33 GeolocationInfoBarQueueControllerTests::GeolocationInfoBarQueueControllerTests() 33 GeolocationInfoBarQueueControllerTests::GeolocationInfoBarQueueControllerTests()
34 : ui_thread_(content::BrowserThread::UI, MessageLoop::current()) { 34 : ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()) {
35 } 35 }
36 36
37 GeolocationPermissionRequestID 37 GeolocationPermissionRequestID
38 GeolocationInfoBarQueueControllerTests::RequestID(int bridge_id) { 38 GeolocationInfoBarQueueControllerTests::RequestID(int bridge_id) {
39 return GeolocationPermissionRequestID( 39 return GeolocationPermissionRequestID(
40 web_contents()->GetRenderProcessHost()->GetID(), 40 web_contents()->GetRenderProcessHost()->GetID(),
41 web_contents()->GetRenderViewHost()->GetRoutingID(), 41 web_contents()->GetRenderViewHost()->GetRoutingID(),
42 bridge_id); 42 bridge_id);
43 } 43 }
44 44
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 ObservationCountingQueueController infobar_queue_controller(profile()); 106 ObservationCountingQueueController infobar_queue_controller(profile());
107 GURL url("http://www.example.com/geolocation"); 107 GURL url("http://www.example.com/geolocation");
108 base::Callback<void(bool)> callback; 108 base::Callback<void(bool)> callback;
109 infobar_queue_controller.CreateInfoBarRequest(RequestID(0), url, url, 109 infobar_queue_controller.CreateInfoBarRequest(RequestID(0), url, url,
110 callback); 110 callback);
111 infobar_queue_controller.CreateInfoBarRequest(RequestID(1), url, url, 111 infobar_queue_controller.CreateInfoBarRequest(RequestID(1), url, url,
112 callback); 112 callback);
113 infobar_queue_controller.CancelInfoBarRequest(RequestID(0)); 113 infobar_queue_controller.CancelInfoBarRequest(RequestID(0));
114 EXPECT_EQ(1, infobar_queue_controller.call_count()); 114 EXPECT_EQ(1, infobar_queue_controller.call_count());
115 }; 115 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698