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

Side by Side Diff: chrome/browser/content_settings/permission_queue_controller_unittest.cc

Issue 1166603002: Move PermissionRequestID to chrome/browser/permissions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_rfh
Patch Set: fix build Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/content_settings/permission_queue_controller.h" 5 #include "chrome/browser/content_settings/permission_queue_controller.h"
6 6
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/infobars/infobar_service.h" 9 #include "chrome/browser/infobars/infobar_service.h"
10 #include "chrome/browser/permissions/permission_request_id.h"
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 11 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
11 #include "chrome/test/base/testing_profile.h" 12 #include "chrome/test/base/testing_profile.h"
12 #include "components/content_settings/core/common/content_settings_types.h" 13 #include "components/content_settings/core/common/content_settings_types.h"
13 #include "components/content_settings/core/common/permission_request_id.h"
14 #include "content/public/browser/render_frame_host.h" 14 #include "content/public/browser/render_frame_host.h"
15 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 #include "content/public/test/mock_render_process_host.h" 16 #include "content/public/test/mock_render_process_host.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 19
20 // PermissionQueueControllerTests --------------------------------------------- 20 // PermissionQueueControllerTests ---------------------------------------------
21 21
22 class PermissionQueueControllerTests : public ChromeRenderViewHostTestHarness { 22 class PermissionQueueControllerTests : public ChromeRenderViewHostTestHarness {
23 protected: 23 protected:
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 TEST_F(PermissionQueueControllerTests, FailOnBadPattern) { 108 TEST_F(PermissionQueueControllerTests, FailOnBadPattern) {
109 ObservationCountingQueueController queue_controller(profile()); 109 ObservationCountingQueueController queue_controller(profile());
110 GURL url("chrome://settings"); 110 GURL url("chrome://settings");
111 base::Callback<void(ContentSetting)> callback; 111 base::Callback<void(ContentSetting)> callback;
112 queue_controller.CreateInfoBarRequest( 112 queue_controller.CreateInfoBarRequest(
113 RequestID(0), url, url, callback); 113 RequestID(0), url, url, callback);
114 queue_controller.CancelInfoBarRequest(RequestID(0)); 114 queue_controller.CancelInfoBarRequest(RequestID(0));
115 EXPECT_EQ(0, queue_controller.call_count()); 115 EXPECT_EQ(0, queue_controller.call_count());
116 } 116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698