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

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

Issue 2543613002: Revert "Don't update TabSpecificContentSettings on same-page navigation" (Closed)
Patch Set: Created 4 years 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 "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;
24 details.current_url = url; 25 details.current_url = url;
25 return details; 26 return details;
26 } 27 }
27 28
28 class ContentSettingsUsagesStateTests : public testing::Test { 29 class ContentSettingsUsagesStateTests : public testing::Test {
29 public: 30 public:
30 ContentSettingsUsagesStateTests() 31 ContentSettingsUsagesStateTests()
31 : ui_thread_(BrowserThread::UI, &message_loop_) { 32 : ui_thread_(BrowserThread::UI, &message_loop_) {
32 } 33 }
33 34
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 209
209 TEST_F(ContentSettingsUsagesStateTests, ShowPortOnSameHostForGeolocation) { 210 TEST_F(ContentSettingsUsagesStateTests, ShowPortOnSameHostForGeolocation) {
210 ShowPortOnSameHost(CONTENT_SETTINGS_TYPE_GEOLOCATION); 211 ShowPortOnSameHost(CONTENT_SETTINGS_TYPE_GEOLOCATION);
211 } 212 }
212 213
213 TEST_F(ContentSettingsUsagesStateTests, ShowPortOnSameHostForMidi) { 214 TEST_F(ContentSettingsUsagesStateTests, ShowPortOnSameHostForMidi) {
214 ShowPortOnSameHost(CONTENT_SETTINGS_TYPE_MIDI_SYSEX); 215 ShowPortOnSameHost(CONTENT_SETTINGS_TYPE_MIDI_SYSEX);
215 } 216 }
216 217
217 } // namespace 218 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/content_settings/tab_specific_content_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698