diff options
Diffstat (limited to 'chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc')
-rw-r--r-- | chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc b/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc index 64c84e4..5be081c 100644 --- a/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc +++ b/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc @@ -5,6 +5,7 @@ #include "chrome/browser/tab_contents/tab_specific_content_settings.h" #include "chrome/test/testing_profile.h" +#include "net/base/cookie_options.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -39,6 +40,7 @@ TEST(TabSpecificContentSettingsTest, BlockedContent) { TestContentSettingsDelegate test_delegate; TestingProfile profile; TabSpecificContentSettings content_settings(&test_delegate, &profile); + net::CookieOptions options; // Check that after initializing, nothing is blocked. EXPECT_FALSE(content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES)); @@ -51,7 +53,8 @@ TEST(TabSpecificContentSettingsTest, BlockedContent) { EXPECT_FALSE(content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS)); // Set a cookie, block access to images, block a popup. - content_settings.OnCookieAccessed(GURL("http://google.com"), "A=B", false); + content_settings.OnCookieAccessed( + GURL("http://google.com"), "A=B", options, false); EXPECT_TRUE(test_delegate.SettingsChanged()); EXPECT_FALSE(test_delegate.ContentBlocked()); test_delegate.Reset(); @@ -74,10 +77,12 @@ TEST(TabSpecificContentSettingsTest, BlockedContent) { EXPECT_FALSE( content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); EXPECT_TRUE(content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS)); - content_settings.OnCookieAccessed(GURL("http://google.com"), "A=B", false); + content_settings.OnCookieAccessed( + GURL("http://google.com"), "A=B", options, false); // Block a cookie. - content_settings.OnCookieAccessed(GURL("http://google.com"), "C=D", true); + content_settings.OnCookieAccessed( + GURL("http://google.com"), "C=D", options, true); EXPECT_TRUE( content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); @@ -111,6 +116,7 @@ TEST(TabSpecificContentSettingsTest, AllowedContent) { TestContentSettingsDelegate test_delegate; TestingProfile profile; TabSpecificContentSettings content_settings(&test_delegate, &profile); + net::CookieOptions options; ASSERT_FALSE( content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_IMAGES)); @@ -118,12 +124,14 @@ TEST(TabSpecificContentSettingsTest, AllowedContent) { content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); ASSERT_FALSE( content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); - content_settings.OnCookieAccessed(GURL("http://google.com"), "A=B", false); + content_settings.OnCookieAccessed( + GURL("http://google.com"), "A=B", options, false); ASSERT_TRUE( content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); ASSERT_FALSE( content_settings.IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); - content_settings.OnCookieAccessed(GURL("http://google.com"), "C=D", true); + content_settings.OnCookieAccessed( + GURL("http://google.com"), "C=D", options, true); ASSERT_TRUE( content_settings.IsContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES)); ASSERT_TRUE( |