| OLD | NEW |
| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/plugins/plugin_prefs.h" | 10 #include "chrome/browser/plugins/plugin_prefs.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 // Verify that the official builds have the known set of plugins. | 194 // Verify that the official builds have the known set of plugins. |
| 195 IN_PROC_BROWSER_TEST_F(ChromePluginTest, InstalledPlugins) { | 195 IN_PROC_BROWSER_TEST_F(ChromePluginTest, InstalledPlugins) { |
| 196 #if !defined(OFFICIAL_BUILD) | 196 #if !defined(OFFICIAL_BUILD) |
| 197 return; | 197 return; |
| 198 #endif | 198 #endif |
| 199 const char* expected[] = { | 199 const char* expected[] = { |
| 200 "Chrome PDF Viewer", | 200 "Chrome PDF Viewer", |
| 201 "Shockwave Flash", | 201 "Shockwave Flash", |
| 202 "Native Client", | 202 "Native Client", |
| 203 "Chrome Remote Desktop Viewer", |
| 203 #if defined(OS_CHROMEOS) | 204 #if defined(OS_CHROMEOS) |
| 204 "Chrome Remote Desktop Viewer", | |
| 205 "Google Talk Plugin", | 205 "Google Talk Plugin", |
| 206 "Google Talk Plugin Video Accelerator", | 206 "Google Talk Plugin Video Accelerator", |
| 207 "Netflix", | 207 "Netflix", |
| 208 #endif | 208 #endif |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 std::vector<webkit::WebPluginInfo> plugins = GetPlugins(); | 211 std::vector<webkit::WebPluginInfo> plugins = GetPlugins(); |
| 212 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) { | 212 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) { |
| 213 size_t j = 0; | 213 size_t j = 0; |
| 214 for (; j < plugins.size(); ++j) { | 214 for (; j < plugins.size(); ++j) { |
| 215 if (plugins[j].name == ASCIIToUTF16(expected[i])) | 215 if (plugins[j].name == ASCIIToUTF16(expected[i])) |
| 216 break; | 216 break; |
| 217 } | 217 } |
| 218 ASSERT_TRUE(j != plugins.size()) << "Didn't find " << expected[i]; | 218 ASSERT_TRUE(j != plugins.size()) << "Didn't find " << expected[i]; |
| 219 } | 219 } |
| 220 } | 220 } |
| OLD | NEW |