| 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/test/ppapi/ppapi_test.h" | 5 #include "chrome/test/ppapi/ppapi_test.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 10 #include "components/content_settings/core/browser/host_content_settings_map.h" | 11 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 11 | 12 |
| 12 // | 13 // |
| 13 // Interface tests. | 14 // Interface tests. |
| 14 // | 15 // |
| 15 | 16 |
| 16 // Disable tests under ASAN. http://crbug.com/104832. | 17 // Disable tests under ASAN. http://crbug.com/104832. |
| 17 // This is a bit heavy handed, but the majority of these tests fail under ASAN. | 18 // This is a bit heavy handed, but the majority of these tests fail under ASAN. |
| 18 // See bug for history. | 19 // See bug for history. |
| 19 #if !defined(ADDRESS_SANITIZER) && !defined(SYZYASAN) | 20 #if !defined(ADDRESS_SANITIZER) && !defined(SYZYASAN) |
| 20 | 21 |
| 21 // Disabled due to timeouts: http://crbug.com/136548 | 22 // Disabled due to timeouts: http://crbug.com/136548 |
| 22 IN_PROC_BROWSER_TEST_F( | 23 IN_PROC_BROWSER_TEST_F( |
| 23 OutOfProcessPPAPITest, DISABLED_MouseLock_SucceedWhenAllowed) { | 24 OutOfProcessPPAPITest, DISABLED_MouseLock_SucceedWhenAllowed) { |
| 24 HostContentSettingsMap* settings_map = | 25 HostContentSettingsMap* settings_map = |
| 25 browser()->profile()->GetHostContentSettingsMap(); | 26 HostContentSettingsMapFactory::GetForProfile(browser()->profile()); |
| 26 | 27 |
| 27 settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_MOUSELOCK, | 28 settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_MOUSELOCK, |
| 28 CONTENT_SETTING_ALLOW); | 29 CONTENT_SETTING_ALLOW); |
| 29 | 30 |
| 30 RunTestViaHTTP("MouseLock_SucceedWhenAllowed"); | 31 RunTestViaHTTP("MouseLock_SucceedWhenAllowed"); |
| 31 } | 32 } |
| 32 | 33 |
| 33 // Disabled due to flaky timeouts: http://crbug.com/137421 | 34 // Disabled due to flaky timeouts: http://crbug.com/137421 |
| 34 IN_PROC_BROWSER_TEST_F( | 35 IN_PROC_BROWSER_TEST_F( |
| 35 OutOfProcessPPAPITest, DISABLED_MouseLock_FailWhenBlocked) { | 36 OutOfProcessPPAPITest, DISABLED_MouseLock_FailWhenBlocked) { |
| 36 HostContentSettingsMap* settings_map = | 37 HostContentSettingsMap* settings_map = |
| 37 browser()->profile()->GetHostContentSettingsMap(); | 38 HostContentSettingsMapFactory::GetForProfile(browser()->profile()); |
| 38 | 39 |
| 39 settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_MOUSELOCK, | 40 settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_MOUSELOCK, |
| 40 CONTENT_SETTING_BLOCK); | 41 CONTENT_SETTING_BLOCK); |
| 41 | 42 |
| 42 RunTestViaHTTP("MouseLock_FailWhenBlocked"); | 43 RunTestViaHTTP("MouseLock_FailWhenBlocked"); |
| 43 } | 44 } |
| 44 | 45 |
| 45 #endif // ADDRESS_SANITIZER | 46 #endif // ADDRESS_SANITIZER |
| OLD | NEW |