OLD | NEW |
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 "chrome/browser/content_settings/tab_specific_content_settings.h" | 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
6 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 6 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
7 #include "chrome/test/base/testing_profile.h" | 7 #include "chrome/test/base/testing_profile.h" |
8 #include "content/browser/tab_contents/test_tab_contents.h" | |
9 #include "content/test/test_browser_thread.h" | 8 #include "content/test/test_browser_thread.h" |
10 #include "net/cookies/cookie_monster.h" | 9 #include "net/cookies/cookie_monster.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
12 | 11 |
13 using content::BrowserThread; | 12 using content::BrowserThread; |
14 | 13 |
15 class TabSpecificContentSettingsTest : public ChromeRenderViewHostTestHarness { | 14 class TabSpecificContentSettingsTest : public ChromeRenderViewHostTestHarness { |
16 public: | 15 public: |
17 TabSpecificContentSettingsTest() | 16 TabSpecificContentSettingsTest() |
18 : browser_thread_(BrowserThread::UI, &message_loop_) {} | 17 : browser_thread_(BrowserThread::UI, &message_loop_) {} |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); | 128 content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); |
130 ASSERT_FALSE( | 129 ASSERT_FALSE( |
131 content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); | 130 content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); |
132 content_settings.OnCookiesRead( | 131 content_settings.OnCookiesRead( |
133 GURL("http://google.com"), net::CookieList(), true); | 132 GURL("http://google.com"), net::CookieList(), true); |
134 ASSERT_FALSE( | 133 ASSERT_FALSE( |
135 content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); | 134 content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); |
136 ASSERT_FALSE( | 135 ASSERT_FALSE( |
137 content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); | 136 content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); |
138 } | 137 } |
OLD | NEW |