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 "base/string16.h" | 5 #include "base/strings/string16.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "content/public/test/test_browser_thread.h" | 10 #include "content/public/test/test_browser_thread.h" |
11 #include "net/cookies/canonical_cookie.h" | 11 #include "net/cookies/canonical_cookie.h" |
12 #include "net/cookies/cookie_options.h" | 12 #include "net/cookies/cookie_options.h" |
13 #include "net/cookies/parsed_cookie.h" | 13 #include "net/cookies/parsed_cookie.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 TabSpecificContentSettings* content_settings = | 271 TabSpecificContentSettings* content_settings = |
272 TabSpecificContentSettings::FromWebContents(web_contents()); | 272 TabSpecificContentSettings::FromWebContents(web_contents()); |
273 ContentSettingsType type = CONTENT_SETTINGS_TYPE_MEDIASTREAM; | 273 ContentSettingsType type = CONTENT_SETTINGS_TYPE_MEDIASTREAM; |
274 content_settings->OnContentAllowed(type); | 274 content_settings->OnContentAllowed(type); |
275 EXPECT_TRUE(content_settings->IsContentAllowed(type)); | 275 EXPECT_TRUE(content_settings->IsContentAllowed(type)); |
276 EXPECT_FALSE(content_settings->IsContentBlocked(type)); | 276 EXPECT_FALSE(content_settings->IsContentBlocked(type)); |
277 content_settings->OnContentBlocked(type, std::string()); | 277 content_settings->OnContentBlocked(type, std::string()); |
278 EXPECT_TRUE(content_settings->IsContentBlocked(type)); | 278 EXPECT_TRUE(content_settings->IsContentBlocked(type)); |
279 EXPECT_FALSE(content_settings->IsContentAllowed(type)); | 279 EXPECT_FALSE(content_settings->IsContentAllowed(type)); |
280 } | 280 } |
OLD | NEW |