| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" | 8 #include "content/browser/tab_contents/test_tab_contents.h" |
| 9 #include "content/test/test_browser_thread.h" | 9 #include "content/test/test_browser_thread.h" |
| 10 #include "net/base/cookie_monster.h" | 10 #include "net/base/cookie_monster.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 using content::BrowserThread; |
| 14 |
| 13 class TabSpecificContentSettingsTest : public ChromeRenderViewHostTestHarness { | 15 class TabSpecificContentSettingsTest : public ChromeRenderViewHostTestHarness { |
| 14 public: | 16 public: |
| 15 TabSpecificContentSettingsTest() | 17 TabSpecificContentSettingsTest() |
| 16 : browser_thread_(BrowserThread::UI, &message_loop_) {} | 18 : browser_thread_(BrowserThread::UI, &message_loop_) {} |
| 17 | 19 |
| 18 private: | 20 private: |
| 19 content::TestBrowserThread browser_thread_; | 21 content::TestBrowserThread browser_thread_; |
| 20 | 22 |
| 21 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettingsTest); | 23 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettingsTest); |
| 22 }; | 24 }; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); | 129 content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); |
| 128 ASSERT_FALSE( | 130 ASSERT_FALSE( |
| 129 content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); | 131 content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); |
| 130 content_settings.OnCookiesRead( | 132 content_settings.OnCookiesRead( |
| 131 GURL("http://google.com"), net::CookieList(), true); | 133 GURL("http://google.com"), net::CookieList(), true); |
| 132 ASSERT_FALSE( | 134 ASSERT_FALSE( |
| 133 content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); | 135 content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); |
| 134 ASSERT_FALSE( | 136 ASSERT_FALSE( |
| 135 content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); | 137 content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); |
| 136 } | 138 } |
| OLD | NEW |