| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 (*count)++; | 182 (*count)++; |
| 183 } | 183 } |
| 184 } | 184 } |
| 185 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, quit_task); | 185 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, quit_task); |
| 186 } | 186 } |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 // Tests a bunch of basic scenarios with Flash. | 189 // Tests a bunch of basic scenarios with Flash. |
| 190 // This test fails under ASan on Mac, see http://crbug.com/147004. | 190 // This test fails under ASan on Mac, see http://crbug.com/147004. |
| 191 // It fails elsewhere, too. See http://crbug.com/152071. | 191 // It fails elsewhere, too. See http://crbug.com/152071. |
| 192 #if defined(ADDRESS_SANITIZER) || defined(OS_MACOSX) || defined(OS_WIN) | 192 IN_PROC_BROWSER_TEST_F(ChromePluginTest, DISABLED_Flash) { |
| 193 #define MAYBE_Flash DISABLED_Flash | |
| 194 #else | |
| 195 #define MAYBE_Flash Flash | |
| 196 #endif | |
| 197 IN_PROC_BROWSER_TEST_F(ChromePluginTest, MAYBE_Flash) { | |
| 198 // Official builds always have bundled Flash. | 193 // Official builds always have bundled Flash. |
| 199 #if !defined(OFFICIAL_BUILD) | 194 #if !defined(OFFICIAL_BUILD) |
| 200 std::vector<FilePath> flash_paths; | 195 std::vector<FilePath> flash_paths; |
| 201 GetFlashPath(&flash_paths); | 196 GetFlashPath(&flash_paths); |
| 202 if (flash_paths.empty()) { | 197 if (flash_paths.empty()) { |
| 203 LOG(INFO) << "Test not running because couldn't find Flash."; | 198 LOG(INFO) << "Test not running because couldn't find Flash."; |
| 204 return; | 199 return; |
| 205 } | 200 } |
| 206 #endif | 201 #endif |
| 207 | 202 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 std::vector<webkit::WebPluginInfo> plugins = GetPlugins(); | 253 std::vector<webkit::WebPluginInfo> plugins = GetPlugins(); |
| 259 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) { | 254 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) { |
| 260 size_t j = 0; | 255 size_t j = 0; |
| 261 for (; j < plugins.size(); ++j) { | 256 for (; j < plugins.size(); ++j) { |
| 262 if (plugins[j].name == ASCIIToUTF16(expected[i])) | 257 if (plugins[j].name == ASCIIToUTF16(expected[i])) |
| 263 break; | 258 break; |
| 264 } | 259 } |
| 265 ASSERT_TRUE(j != plugins.size()) << "Didn't find " << expected[i]; | 260 ASSERT_TRUE(j != plugins.size()) << "Didn't find " << expected[i]; |
| 266 } | 261 } |
| 267 } | 262 } |
| OLD | NEW |