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 <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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 GURL("some url")); | 99 GURL("some url")); |
100 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, | 100 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, |
101 "application/x-futuresplash", | 101 "application/x-futuresplash", |
102 GURL("some url")); | 102 GURL("some url")); |
103 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, | 103 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, |
104 "application/shockwave-flash", | 104 "application/shockwave-flash", |
105 GURL("some url")); | 105 GURL("some url")); |
106 } | 106 } |
107 | 107 |
108 TEST_F(PluginUMATest, WidevineCdm) { | 108 TEST_F(PluginUMATest, WidevineCdm) { |
| 109 #if defined(ENABLE_PEPPER_CDMS) |
109 ExpectPluginType(PluginUMAReporter::WIDEVINE_CDM, | 110 ExpectPluginType(PluginUMAReporter::WIDEVINE_CDM, |
| 111 #else |
| 112 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, |
| 113 #endif |
110 "application/x-ppapi-widevine-cdm", | 114 "application/x-ppapi-widevine-cdm", |
111 GURL("some url")); | 115 GURL("some url")); |
112 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, | 116 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, |
113 "application/x-ppapi-widevine-cdm-sufix", | 117 "application/x-ppapi-widevine-cdm-sufix", |
114 GURL("some url")); | 118 GURL("some url")); |
115 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, | 119 ExpectPluginType(PluginUMAReporter::UNSUPPORTED_MIMETYPE, |
116 "prefix-application/x-ppapi-widevine-cdm", | 120 "prefix-application/x-ppapi-widevine-cdm", |
117 GURL("some url")); | 121 GURL("some url")); |
118 } | 122 } |
119 | 123 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 PluginUMAReporter::UNSUPPORTED_EXTENSION, std::string(), GURL("mov")); | 157 PluginUMAReporter::UNSUPPORTED_EXTENSION, std::string(), GURL("mov")); |
154 } | 158 } |
155 | 159 |
156 TEST_F(PluginUMATest, CaseSensitivity) { | 160 TEST_F(PluginUMATest, CaseSensitivity) { |
157 ExpectPluginType(PluginUMAReporter::QUICKTIME, | 161 ExpectPluginType(PluginUMAReporter::QUICKTIME, |
158 "video/QUICKTIME", | 162 "video/QUICKTIME", |
159 GURL("http://file.aaa")); | 163 GURL("http://file.aaa")); |
160 ExpectPluginType( | 164 ExpectPluginType( |
161 PluginUMAReporter::QUICKTIME, std::string(), GURL("http://file.MoV")); | 165 PluginUMAReporter::QUICKTIME, std::string(), GURL("http://file.MoV")); |
162 } | 166 } |
OLD | NEW |