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

Side by Side Diff: chrome/browser/ui/pdf/pdf_browsertest.cc

Issue 318043003: Roll pdfium to get (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « DEPS ('k') | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698