| 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_helpers.h" | 5 #include "base/bind_helpers.h" |
| 6 #include "base/location.h" | 6 #include "base/location.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "content/public/test/test_utils.h" | 29 #include "content/public/test/test_utils.h" |
| 30 #include "extensions/browser/extension_registry.h" | 30 #include "extensions/browser/extension_registry.h" |
| 31 #include "extensions/browser/test_extension_registry_observer.h" | 31 #include "extensions/browser/test_extension_registry_observer.h" |
| 32 | 32 |
| 33 namespace extensions { | 33 namespace extensions { |
| 34 | 34 |
| 35 class ExtensionContentSettingsApiTest : public ExtensionApiTest { | 35 class ExtensionContentSettingsApiTest : public ExtensionApiTest { |
| 36 public: | 36 public: |
| 37 ExtensionContentSettingsApiTest() : profile_(NULL) {} | 37 ExtensionContentSettingsApiTest() : profile_(NULL) {} |
| 38 | 38 |
| 39 void SetUpCommandLine(base::CommandLine* command_line) override { | |
| 40 ExtensionApiTest::SetUpCommandLine(command_line); | |
| 41 command_line->AppendSwitch(switches::kDisablePluginsDiscovery); | |
| 42 } | |
| 43 | |
| 44 void SetUpOnMainThread() override { | 39 void SetUpOnMainThread() override { |
| 45 ExtensionApiTest::SetUpOnMainThread(); | 40 ExtensionApiTest::SetUpOnMainThread(); |
| 46 | 41 |
| 47 // The browser might get closed later (and therefore be destroyed), so we | 42 // The browser might get closed later (and therefore be destroyed), so we |
| 48 // save the profile. | 43 // save the profile. |
| 49 profile_ = browser()->profile(); | 44 profile_ = browser()->profile(); |
| 50 | 45 |
| 51 // Closing the last browser window also releases a KeepAlive. Make | 46 // Closing the last browser window also releases a KeepAlive. Make |
| 52 // sure it's not the last one, so the message loop doesn't quit | 47 // sure it's not the last one, so the message loop doesn't quit |
| 53 // unexpectedly. | 48 // unexpectedly. |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 << message_; | 292 << message_; |
| 298 } | 293 } |
| 299 | 294 |
| 300 IN_PROC_BROWSER_TEST_F(ExtensionContentSettingsApiTest, | 295 IN_PROC_BROWSER_TEST_F(ExtensionContentSettingsApiTest, |
| 301 UnsupportedDefaultSettings) { | 296 UnsupportedDefaultSettings) { |
| 302 const char kExtensionPath[] = "content_settings/unsupporteddefaultsettings"; | 297 const char kExtensionPath[] = "content_settings/unsupporteddefaultsettings"; |
| 303 EXPECT_TRUE(RunExtensionSubtest(kExtensionPath, "test.html")) << message_; | 298 EXPECT_TRUE(RunExtensionSubtest(kExtensionPath, "test.html")) << message_; |
| 304 } | 299 } |
| 305 | 300 |
| 306 } // namespace extensions | 301 } // namespace extensions |
| OLD | NEW |