| 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/strings/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" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 MOCK_METHOD0(OnSiteDataAccessed, void()); | 31 MOCK_METHOD0(OnSiteDataAccessed, void()); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(MockSiteDataObserver); | 34 DISALLOW_COPY_AND_ASSIGN(MockSiteDataObserver); |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace | 37 } // namespace |
| 38 | 38 |
| 39 class TabSpecificContentSettingsTest : public ChromeRenderViewHostTestHarness { | 39 class TabSpecificContentSettingsTest : public ChromeRenderViewHostTestHarness { |
| 40 public: | 40 public: |
| 41 virtual void SetUp() OVERRIDE { | 41 virtual void SetUp() override { |
| 42 ChromeRenderViewHostTestHarness::SetUp(); | 42 ChromeRenderViewHostTestHarness::SetUp(); |
| 43 TabSpecificContentSettings::CreateForWebContents(web_contents()); | 43 TabSpecificContentSettings::CreateForWebContents(web_contents()); |
| 44 } | 44 } |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 TEST_F(TabSpecificContentSettingsTest, BlockedContent) { | 47 TEST_F(TabSpecificContentSettingsTest, BlockedContent) { |
| 48 TabSpecificContentSettings* content_settings = | 48 TabSpecificContentSettings* content_settings = |
| 49 TabSpecificContentSettings::FromWebContents(web_contents()); | 49 TabSpecificContentSettings::FromWebContents(web_contents()); |
| 50 net::CookieOptions options; | 50 net::CookieOptions options; |
| 51 | 51 |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 base::UTF8ToUTF16("text"), | 403 base::UTF8ToUTF16("text"), |
| 404 blocked_by_policy); | 404 blocked_by_policy); |
| 405 content_settings->OnLocalStorageAccessed(GURL("http://google.com"), | 405 content_settings->OnLocalStorageAccessed(GURL("http://google.com"), |
| 406 true, | 406 true, |
| 407 blocked_by_policy); | 407 blocked_by_policy); |
| 408 content_settings->OnWebDatabaseAccessed(GURL("http://google.com"), | 408 content_settings->OnWebDatabaseAccessed(GURL("http://google.com"), |
| 409 base::UTF8ToUTF16("name"), | 409 base::UTF8ToUTF16("name"), |
| 410 base::UTF8ToUTF16("display_name"), | 410 base::UTF8ToUTF16("display_name"), |
| 411 blocked_by_policy); | 411 blocked_by_policy); |
| 412 } | 412 } |
| OLD | NEW |