OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/logging.h" | 5 #include "base/logging.h" |
6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/common/chrome_switches.h" |
8 #include "chrome/test/base/ui_test_utils.h" | 9 #include "chrome/test/base/ui_test_utils.h" |
9 #include "content/browser/tab_contents/tab_contents.h" | 10 #include "content/browser/tab_contents/tab_contents.h" |
10 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
11 #include "net/base/mock_host_resolver.h" | 12 #include "net/base/mock_host_resolver.h" |
12 | 13 |
13 class ExtensionResourceRequestPolicyTest : public ExtensionApiTest { | 14 class ExtensionResourceRequestPolicyTest : public ExtensionApiTest { |
| 15 protected: |
| 16 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 17 ExtensionApiTest::SetUpCommandLine(command_line); |
| 18 command_line->AppendSwitch(switches::kAllowLegacyExtensionManifests); |
| 19 } |
14 }; | 20 }; |
15 | 21 |
16 // Note, this mostly tests the logic of chrome/renderer/extensions/ | 22 // Note, this mostly tests the logic of chrome/renderer/extensions/ |
17 // extension_resource_request_policy.*, but we have it as a browser test so that | 23 // extension_resource_request_policy.*, but we have it as a browser test so that |
18 // can make sure it works end-to-end. | 24 // can make sure it works end-to-end. |
19 IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, OriginPrivileges) { | 25 IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, OriginPrivileges) { |
20 host_resolver()->AddRule("*", "127.0.0.1"); | 26 host_resolver()->AddRule("*", "127.0.0.1"); |
21 ASSERT_TRUE(test_server()->Start()); | 27 ASSERT_TRUE(test_server()->Start()); |
22 ASSERT_TRUE(LoadExtension(test_data_dir_ | 28 ASSERT_TRUE(LoadExtension(test_data_dir_ |
23 .AppendASCII("extension_resource_request_policy") | 29 .AppendASCII("extension_resource_request_policy") |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 #define MAYBE_Video FLAKY_Video | 115 #define MAYBE_Video FLAKY_Video |
110 #else | 116 #else |
111 #define MAYBE_Video Video | 117 #define MAYBE_Video Video |
112 #endif | 118 #endif |
113 | 119 |
114 IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, MAYBE_Video) { | 120 IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, MAYBE_Video) { |
115 EXPECT_TRUE(RunExtensionSubtest( | 121 EXPECT_TRUE(RunExtensionSubtest( |
116 "extension_resource_request_policy/extension2", | 122 "extension_resource_request_policy/extension2", |
117 "video.html")); | 123 "video.html")); |
118 } | 124 } |
OLD | NEW |