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

Side by Side Diff: chrome/renderer/plugins/plugin_uma_unittest.cc

Issue 23606022: Move renderer plugin code into a new component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move renderer plugin code into a new component - fix ios builds Created 7 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
« no previous file with comments | « chrome/renderer/plugins/plugin_uma.cc ('k') | chrome/renderer/plugins/webview_plugin.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) 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 <gtest/gtest.h> 5 #include <gtest/gtest.h>
6 6
7 #include "chrome/renderer/plugins/plugin_uma.h" 7 #include "chrome/renderer/plugins/plugin_uma.h"
8 8
9 class PluginUMATest : public testing::Test { 9 class PluginUMATest : public testing::Test {
10 public: 10 public:
(...skipping 25 matching lines...) Expand all
36 GURL("aaaa")); 36 GURL("aaaa"));
37 ExpectPluginType(PluginUMAReporter::SILVERLIGHT, 37 ExpectPluginType(PluginUMAReporter::SILVERLIGHT,
38 "application/x-silverlight-some-sufix", 38 "application/x-silverlight-some-sufix",
39 GURL("aaaa")); 39 GURL("aaaa"));
40 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, 40 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE,
41 "some-prefix-application/x-silverlight", 41 "some-prefix-application/x-silverlight",
42 GURL("aaaa")); 42 GURL("aaaa"));
43 } 43 }
44 44
45 TEST_F(PluginUMATest, RealPlayer) { 45 TEST_F(PluginUMATest, RealPlayer) {
46 ExpectPluginType(PluginUMAReporter::REALPLAYER, 46 ExpectPluginType(
47 "audio/x-pn-realaudio", 47 PluginUMAReporter::REALPLAYER, "audio/x-pn-realaudio", GURL("some url"));
48 GURL("some url"));
49 ExpectPluginType(PluginUMAReporter::REALPLAYER, 48 ExpectPluginType(PluginUMAReporter::REALPLAYER,
50 "audio/x-pn-realaudio-some-sufix", 49 "audio/x-pn-realaudio-some-sufix",
51 GURL("some url")); 50 GURL("some url"));
52 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, 51 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE,
53 "some-prefix-audio/x-pn-realaudio", 52 "some-prefix-audio/x-pn-realaudio",
54 GURL("some url")); 53 GURL("some url"));
55 } 54 }
56 55
57 TEST_F(PluginUMATest, Java) { 56 TEST_F(PluginUMATest, Java) {
58 ExpectPluginType(PluginUMAReporter::JAVA, 57 ExpectPluginType(
59 "application/x-java-applet", 58 PluginUMAReporter::JAVA, "application/x-java-applet", GURL("some url"));
60 GURL("some url"));
61 ExpectPluginType(PluginUMAReporter::JAVA, 59 ExpectPluginType(PluginUMAReporter::JAVA,
62 "application/x-java-applet-some-sufix", 60 "application/x-java-applet-some-sufix",
63 GURL("some url")); 61 GURL("some url"));
64 ExpectPluginType(PluginUMAReporter::JAVA, 62 ExpectPluginType(PluginUMAReporter::JAVA,
65 "some-prefix-application/x-java-applet-sufix", 63 "some-prefix-application/x-java-applet-sufix",
66 GURL("some url")); 64 GURL("some url"));
67 } 65 }
68 66
69 TEST_F(PluginUMATest, QuickTime) { 67 TEST_F(PluginUMATest, QuickTime) {
70 ExpectPluginType(PluginUMAReporter::QUICKTIME, 68 ExpectPluginType(
71 "video/quicktime", 69 PluginUMAReporter::QUICKTIME, "video/quicktime", GURL("some url"));
72 GURL("some url"));
73 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, 70 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE,
74 "video/quicktime-sufix", 71 "video/quicktime-sufix",
75 GURL("some url")); 72 GURL("some url"));
76 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, 73 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE,
77 "prefix-video/quicktime", 74 "prefix-video/quicktime",
78 GURL("some url")); 75 GURL("some url"));
79 } 76 }
80 77
81 TEST_F(PluginUMATest, BrowserPlugin) { 78 TEST_F(PluginUMATest, BrowserPlugin) {
82 ExpectPluginType(PluginUMAReporter::BROWSER_PLUGIN, 79 ExpectPluginType(PluginUMAReporter::BROWSER_PLUGIN,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_EXTENSION, 148 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_EXTENSION,
152 std::string(), 149 std::string(),
153 GURL("http://file.unknown_extension")); 150 GURL("http://file.unknown_extension"));
154 ExpectPluginType( 151 ExpectPluginType(
155 PluginUMAReporter::UNSUPPORTED_EXTENSION, std::string(), GURL("http://")); 152 PluginUMAReporter::UNSUPPORTED_EXTENSION, std::string(), GURL("http://"));
156 ExpectPluginType( 153 ExpectPluginType(
157 PluginUMAReporter::UNSUPPORTED_EXTENSION, std::string(), GURL("mov")); 154 PluginUMAReporter::UNSUPPORTED_EXTENSION, std::string(), GURL("mov"));
158 } 155 }
159 156
160 TEST_F(PluginUMATest, CaseSensitivity) { 157 TEST_F(PluginUMATest, CaseSensitivity) {
161 ExpectPluginType(PluginUMAReporter::QUICKTIME, 158 ExpectPluginType(
162 "video/QUICKTIME", 159 PluginUMAReporter::QUICKTIME, "video/QUICKTIME", GURL("http://file.aaa"));
163 GURL("http://file.aaa"));
164 ExpectPluginType( 160 ExpectPluginType(
165 PluginUMAReporter::QUICKTIME, std::string(), GURL("http://file.MoV")); 161 PluginUMAReporter::QUICKTIME, std::string(), GURL("http://file.MoV"));
166 } 162 }
OLDNEW
« no previous file with comments | « chrome/renderer/plugins/plugin_uma.cc ('k') | chrome/renderer/plugins/webview_plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698