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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/files/file.h" | 6 #include "base/files/file.h" |
7 #include "base/files/file_enumerator.h" | 7 #include "base/files/file_enumerator.h" |
8 #include "base/hash.h" | 8 #include "base/hash.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 for (base::FilePath file_path = file_enumerator.Next(); | 322 for (base::FilePath file_path = file_enumerator.Next(); |
323 !file_path.empty(); | 323 !file_path.empty(); |
324 file_path = file_enumerator.Next()) { | 324 file_path = file_enumerator.Next()) { |
325 std::string filename = file_path.BaseName().MaybeAsASCII(); | 325 std::string filename = file_path.BaseName().MaybeAsASCII(); |
326 ASSERT_FALSE(filename.empty()); | 326 ASSERT_FALSE(filename.empty()); |
327 | 327 |
328 #if defined(OS_POSIX) | 328 #if defined(OS_POSIX) |
329 if (filename == "sample.pdf") | 329 if (filename == "sample.pdf") |
330 continue; // Crashes on Mac and Linux. http://crbug.com/63549 | 330 continue; // Crashes on Mac and Linux. http://crbug.com/63549 |
331 #endif | 331 #endif |
332 #if defined(OS_MACOSX) | |
333 if (filename == "MVGD_sample_form.pdf") // http://crbug.com/373619 | |
334 continue; | |
335 #endif | |
336 | 332 |
337 // Split the test into smaller sub-tests. Each one only loads | 333 // Split the test into smaller sub-tests. Each one only loads |
338 // every k-th file. | 334 // every k-th file. |
339 if (static_cast<int>(base::Hash(filename) % kLoadingNumberOfParts) != | 335 if (static_cast<int>(base::Hash(filename) % kLoadingNumberOfParts) != |
340 GetParam()) { | 336 GetParam()) { |
341 continue; | 337 continue; |
342 } | 338 } |
343 | 339 |
344 LOG(WARNING) << "PDFBrowserTest.Loading: " << filename; | 340 LOG(WARNING) << "PDFBrowserTest.Loading: " << filename; |
345 | 341 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 browser()->tab_strip_model()->GetActiveWebContents(), | 417 browser()->tab_strip_model()->GetActiveWebContents(), |
422 "reloadPDF();")); | 418 "reloadPDF();")); |
423 observer.Wait(); | 419 observer.Wait(); |
424 | 420 |
425 ASSERT_EQ("success", | 421 ASSERT_EQ("success", |
426 browser()->tab_strip_model()->GetActiveWebContents()-> | 422 browser()->tab_strip_model()->GetActiveWebContents()-> |
427 GetURL().query()); | 423 GetURL().query()); |
428 } | 424 } |
429 | 425 |
430 } // namespace | 426 } // namespace |
OLD | NEW |