Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: chrome/browser/extensions/extension_resource_request_policy_apitest.cc

Issue 8825015: Create a LegacyExtensionBrowserTest class that lets us test extensions with (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extension_icon_source_apitest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_icon_source_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698