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

Side by Side Diff: content/public/test/ppapi_test_utils.cc

Issue 2361453004: Add browsertest for Flash permission prompt (Closed)
Patch Set: Add browesrtest for Flash permission prompt Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/public/test/ppapi_test_utils.h" 5 #include "content/public/test/ppapi_test_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 extra_registration_parameters); 88 extra_registration_parameters);
89 } 89 }
90 90
91 bool RegisterPowerSaverTestPlugin(base::CommandLine* command_line) { 91 bool RegisterPowerSaverTestPlugin(base::CommandLine* command_line) {
92 base::FilePath::StringType library_name = 92 base::FilePath::StringType library_name =
93 base::FilePath::FromUTF8Unsafe(ppapi::kPowerSaverTestPluginName).value(); 93 base::FilePath::FromUTF8Unsafe(ppapi::kPowerSaverTestPluginName).value();
94 return RegisterPluginWithDefaultMimeType(command_line, library_name, 94 return RegisterPluginWithDefaultMimeType(command_line, library_name,
95 FILE_PATH_LITERAL("")); 95 FILE_PATH_LITERAL(""));
96 } 96 }
97 97
98 bool RegisterFlashTestPlugin(base::CommandLine* command_line) {
99 base::FilePath::StringType library_name =
100 base::FilePath::FromUTF8Unsafe(ppapi::kPowerSaverTestPluginName).value();
101 std::vector<PluginInfo> plugins;
102 plugins.push_back(
103 PluginInfo(library_name, FILE_PATH_LITERAL("#Shockwave Flash#"),
tommycli 2016/09/26 22:54:49 I noticed that if I didn't set the version to 100.
raymes 2016/09/27 04:05:41 Done.
104 FILE_PATH_LITERAL("application/x-shockwave-flash")));
105 return RegisterPlugins(command_line, plugins);
106 }
107
98 bool RegisterBlinkTestPlugin(base::CommandLine* command_line) { 108 bool RegisterBlinkTestPlugin(base::CommandLine* command_line) {
99 #if defined(OS_WIN) 109 #if defined(OS_WIN)
100 static const CharType kPluginLibrary[] = L"blink_test_plugin.dll"; 110 static const CharType kPluginLibrary[] = L"blink_test_plugin.dll";
101 static const CharType kDeprecatedPluginLibrary[] = 111 static const CharType kDeprecatedPluginLibrary[] =
102 L"blink_deprecated_test_plugin.dll"; 112 L"blink_deprecated_test_plugin.dll";
103 #elif defined(OS_MACOSX) 113 #elif defined(OS_MACOSX)
104 static const CharType kPluginLibrary[] = "blink_test_plugin.plugin"; 114 static const CharType kPluginLibrary[] = "blink_test_plugin.plugin";
105 static const CharType kDeprecatedPluginLibrary[] = 115 static const CharType kDeprecatedPluginLibrary[] =
106 "blink_deprecated_test_plugin.plugin"; 116 "blink_deprecated_test_plugin.plugin";
107 #elif defined(OS_POSIX) 117 #elif defined(OS_POSIX)
(...skipping 12 matching lines...) Expand all
120 FILE_PATH_LITERAL("application/x-blink-test-plugin#blinktestplugin"))); 130 FILE_PATH_LITERAL("application/x-blink-test-plugin#blinktestplugin")));
121 plugins.push_back( 131 plugins.push_back(
122 PluginInfo(kDeprecatedPluginLibrary, kDeprecatedExtraParameters, 132 PluginInfo(kDeprecatedPluginLibrary, kDeprecatedExtraParameters,
123 FILE_PATH_LITERAL("application/" 133 FILE_PATH_LITERAL("application/"
124 "x-blink-deprecated-test-plugin#" 134 "x-blink-deprecated-test-plugin#"
125 "blinkdeprecatedtestplugin"))); 135 "blinkdeprecatedtestplugin")));
126 return RegisterPlugins(command_line, plugins); 136 return RegisterPlugins(command_line, plugins);
127 } 137 }
128 138
129 } // namespace ppapi 139 } // namespace ppapi
OLDNEW
« content/public/test/ppapi_test_utils.h ('K') | « content/public/test/ppapi_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698