OLD | NEW |
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 "components/content_settings/core/browser/content_settings_usages_state
.h" | 5 #include "components/content_settings/core/browser/content_settings_usages_state
.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
12 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
13 #include "components/content_settings/core/browser/host_content_settings_map.h" | 13 #include "components/content_settings/core/browser/host_content_settings_map.h" |
14 #include "content/public/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 using content::BrowserThread; | 17 using content::BrowserThread; |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 ContentSettingsUsagesState::CommittedDetails CreateDetailsWithURL( | 21 ContentSettingsUsagesState::CommittedDetails CreateDetailsWithURL( |
22 const GURL& url) { | 22 const GURL& url) { |
23 ContentSettingsUsagesState::CommittedDetails details; | 23 ContentSettingsUsagesState::CommittedDetails details; |
24 details.current_url_valid = true; | |
25 details.current_url = url; | 24 details.current_url = url; |
26 return details; | 25 return details; |
27 } | 26 } |
28 | 27 |
29 class ContentSettingsUsagesStateTests : public testing::Test { | 28 class ContentSettingsUsagesStateTests : public testing::Test { |
30 public: | 29 public: |
31 ContentSettingsUsagesStateTests() | 30 ContentSettingsUsagesStateTests() |
32 : ui_thread_(BrowserThread::UI, &message_loop_) { | 31 : ui_thread_(BrowserThread::UI, &message_loop_) { |
33 } | 32 } |
34 | 33 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 208 |
210 TEST_F(ContentSettingsUsagesStateTests, ShowPortOnSameHostForGeolocation) { | 209 TEST_F(ContentSettingsUsagesStateTests, ShowPortOnSameHostForGeolocation) { |
211 ShowPortOnSameHost(CONTENT_SETTINGS_TYPE_GEOLOCATION); | 210 ShowPortOnSameHost(CONTENT_SETTINGS_TYPE_GEOLOCATION); |
212 } | 211 } |
213 | 212 |
214 TEST_F(ContentSettingsUsagesStateTests, ShowPortOnSameHostForMidi) { | 213 TEST_F(ContentSettingsUsagesStateTests, ShowPortOnSameHostForMidi) { |
215 ShowPortOnSameHost(CONTENT_SETTINGS_TYPE_MIDI_SYSEX); | 214 ShowPortOnSameHost(CONTENT_SETTINGS_TYPE_MIDI_SYSEX); |
216 } | 215 } |
217 | 216 |
218 } // namespace | 217 } // namespace |
OLD | NEW |