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

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

Issue 9536013: Move |requires_authorization| flag for plug-ins out of webkit/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 years, 9 months 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 | « no previous file | chrome/browser/plugin_finder.h » ('j') | 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) 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/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/content_settings/cookie_settings.h" 6 #include "chrome/browser/content_settings/cookie_settings.h"
7 #include "chrome/browser/content_settings/host_content_settings_map.h" 7 #include "chrome/browser/content_settings/host_content_settings_map.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_content_settings_api.h" 9 #include "chrome/browser/extensions/extension_content_settings_api.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 96 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
97 DISABLED_ContentSettingsGetResourceIdentifiers) { 97 DISABLED_ContentSettingsGetResourceIdentifiers) {
98 CommandLine::ForCurrentProcess()->AppendSwitch( 98 CommandLine::ForCurrentProcess()->AppendSwitch(
99 switches::kEnableExperimentalExtensionApis); 99 switches::kEnableExperimentalExtensionApis);
100 100
101 FilePath::CharType kFooPath[] = FILE_PATH_LITERAL("/plugins/foo.plugin"); 101 FilePath::CharType kFooPath[] = FILE_PATH_LITERAL("/plugins/foo.plugin");
102 FilePath::CharType kBarPath[] = FILE_PATH_LITERAL("/plugins/bar.plugin"); 102 FilePath::CharType kBarPath[] = FILE_PATH_LITERAL("/plugins/bar.plugin");
103 const char* kFooName = "Foo Plugin"; 103 const char* kFooName = "Foo Plugin";
104 const char* kBarName = "Bar Plugin"; 104 const char* kBarName = "Bar Plugin";
105 const webkit::npapi::PluginGroupDefinition kPluginDefinitions[] = { 105 const webkit::npapi::PluginGroupDefinition kPluginDefinitions[] = {
106 { "foo", "Foo", kFooName, NULL, 0, 106 { "foo", "Foo", kFooName, NULL, 0 },
107 "http://example.com/foo" },
108 }; 107 };
109 108
110 webkit::npapi::MockPluginList plugin_list(kPluginDefinitions, 109 webkit::npapi::MockPluginList plugin_list(kPluginDefinitions,
111 arraysize(kPluginDefinitions)); 110 arraysize(kPluginDefinitions));
112 plugin_list.AddPluginToLoad( 111 plugin_list.AddPluginToLoad(
113 webkit::WebPluginInfo(ASCIIToUTF16(kFooName), 112 webkit::WebPluginInfo(ASCIIToUTF16(kFooName),
114 FilePath(kFooPath), 113 FilePath(kFooPath),
115 ASCIIToUTF16("1.2.3"), 114 ASCIIToUTF16("1.2.3"),
116 ASCIIToUTF16("foo"))); 115 ASCIIToUTF16("foo")));
117 plugin_list.AddPluginToLoad( 116 plugin_list.AddPluginToLoad(
118 webkit::WebPluginInfo(ASCIIToUTF16(kBarName), 117 webkit::WebPluginInfo(ASCIIToUTF16(kBarName),
119 FilePath(kBarPath), 118 FilePath(kBarPath),
120 ASCIIToUTF16("2.3.4"), 119 ASCIIToUTF16("2.3.4"),
121 ASCIIToUTF16("bar"))); 120 ASCIIToUTF16("bar")));
122 121
123 std::vector<webkit::npapi::PluginGroup> groups; 122 std::vector<webkit::npapi::PluginGroup> groups;
124 plugin_list.GetPluginGroups(true, &groups); 123 plugin_list.GetPluginGroups(true, &groups);
125 124
126 GetResourceIdentifiersFunction::SetPluginGroupsForTesting(&groups); 125 GetResourceIdentifiersFunction::SetPluginGroupsForTesting(&groups);
127 126
128 EXPECT_TRUE(RunExtensionTest("content_settings/getresourceidentifiers")) 127 EXPECT_TRUE(RunExtensionTest("content_settings/getresourceidentifiers"))
129 << message_; 128 << message_;
130 129
131 GetResourceIdentifiersFunction::SetPluginGroupsForTesting(NULL); 130 GetResourceIdentifiersFunction::SetPluginGroupsForTesting(NULL);
132 } 131 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/plugin_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698