OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_context_base.h" | 5 #include "chrome/browser/content_settings/permission_context_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/content_settings/host_content_settings_map.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map.h" |
9 #include "chrome/browser/content_settings/permission_queue_controller.h" | 9 #include "chrome/browser/content_settings/permission_queue_controller.h" |
10 #include "chrome/browser/content_settings/permission_request_id.h" | 10 #include "chrome/browser/content_settings/permission_request_id.h" |
11 #include "chrome/browser/infobars/infobar_service.h" | 11 #include "chrome/browser/infobars/infobar_service.h" |
12 #include "chrome/common/content_settings.h" | 12 #include "chrome/common/content_settings.h" |
13 #include "chrome/common/content_settings_types.h" | |
14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
15 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
| 15 #include "components/content_settings/core/common/content_settings_types.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "content/public/test/mock_render_process_host.h" | 17 #include "content/public/test/mock_render_process_host.h" |
18 #include "content/public/test/web_contents_tester.h" | 18 #include "content/public/test/web_contents_tester.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 class PermissionContextBaseTests : public ChromeRenderViewHostTestHarness { | 21 class PermissionContextBaseTests : public ChromeRenderViewHostTestHarness { |
22 protected: | 22 protected: |
23 PermissionContextBaseTests() {} | 23 PermissionContextBaseTests() {} |
24 virtual ~PermissionContextBaseTests() {} | 24 virtual ~PermissionContextBaseTests() {} |
25 | 25 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 EXPECT_TRUE(permission_context.permission_set()); | 132 EXPECT_TRUE(permission_context.permission_set()); |
133 EXPECT_FALSE(permission_context.permission_granted()); | 133 EXPECT_FALSE(permission_context.permission_granted()); |
134 EXPECT_TRUE(permission_context.tab_context_updated()); | 134 EXPECT_TRUE(permission_context.tab_context_updated()); |
135 | 135 |
136 ContentSetting setting = | 136 ContentSetting setting = |
137 profile()->GetHostContentSettingsMap()->GetContentSetting( | 137 profile()->GetHostContentSettingsMap()->GetContentSetting( |
138 url.GetOrigin(), url.GetOrigin(), | 138 url.GetOrigin(), url.GetOrigin(), |
139 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, std::string()); | 139 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, std::string()); |
140 EXPECT_EQ(CONTENT_SETTING_ASK , setting); | 140 EXPECT_EQ(CONTENT_SETTING_ASK , setting); |
141 }; | 141 }; |
OLD | NEW |