| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/json/json_writer.h" | 6 #include "base/json/json_writer.h" |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/extensions/api/storage/settings_frontend.h" | 10 #include "chrome/browser/extensions/api/storage/settings_frontend.h" |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 EXPECT_FALSE( | 244 EXPECT_FALSE( |
| 245 settings_service->ProcessSyncChanges(FROM_HERE, change_list).IsSet()); | 245 settings_service->ProcessSyncChanges(FROM_HERE, change_list).IsSet()); |
| 246 } | 246 } |
| 247 | 247 |
| 248 protected: | 248 protected: |
| 249 #if defined(ENABLE_CONFIGURATION_POLICY) | 249 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 250 policy::MockConfigurationPolicyProvider policy_provider_; | 250 policy::MockConfigurationPolicyProvider policy_provider_; |
| 251 #endif | 251 #endif |
| 252 }; | 252 }; |
| 253 | 253 |
| 254 // Flaky. http://crbug.com/248032 | 254 IN_PROC_BROWSER_TEST_F(ExtensionSettingsApiTest, SimpleTest) { |
| 255 IN_PROC_BROWSER_TEST_F(ExtensionSettingsApiTest, DISABLED_SimpleTest) { | |
| 256 ASSERT_TRUE(RunExtensionTest("settings/simple_test")) << message_; | 255 ASSERT_TRUE(RunExtensionTest("settings/simple_test")) << message_; |
| 257 } | 256 } |
| 258 | 257 |
| 259 // Structure of this test taken from IncognitoSplitMode. | 258 // Structure of this test taken from IncognitoSplitMode. |
| 260 // Note that only split-mode incognito is tested, because spanning mode | 259 // Note that only split-mode incognito is tested, because spanning mode |
| 261 // incognito looks the same as normal mode when the only API activity comes | 260 // incognito looks the same as normal mode when the only API activity comes |
| 262 // from background pages. | 261 // from background pages. |
| 263 IN_PROC_BROWSER_TEST_F(ExtensionSettingsApiTest, SplitModeIncognito) { | 262 IN_PROC_BROWSER_TEST_F(ExtensionSettingsApiTest, SplitModeIncognito) { |
| 264 // We need 2 ResultCatchers because we'll be running the same test in both | 263 // We need 2 ResultCatchers because we'll be running the same test in both |
| 265 // regular and incognito mode. | 264 // regular and incognito mode. |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 SettingsFrontend* frontend = | 614 SettingsFrontend* frontend = |
| 616 browser()->profile()->GetExtensionService()->settings_frontend(); | 615 browser()->profile()->GetExtensionService()->settings_frontend(); |
| 617 frontend->DisableStorageForTesting(MANAGED); | 616 frontend->DisableStorageForTesting(MANAGED); |
| 618 EXPECT_FALSE(frontend->IsStorageEnabled(MANAGED)); | 617 EXPECT_FALSE(frontend->IsStorageEnabled(MANAGED)); |
| 619 // Now run the extension. | 618 // Now run the extension. |
| 620 ASSERT_TRUE(RunExtensionTest("settings/managed_storage_disabled")) | 619 ASSERT_TRUE(RunExtensionTest("settings/managed_storage_disabled")) |
| 621 << message_; | 620 << message_; |
| 622 } | 621 } |
| 623 | 622 |
| 624 } // namespace extensions | 623 } // namespace extensions |
| OLD | NEW |