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

Unified Diff: chrome/test/data/pdf/navigator_test.js

Issue 918953002: Fix for PDFs with lots of named destinations take a long time to load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | chrome/test/data/pdf/params_parser_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/pdf/navigator_test.js
diff --git a/chrome/test/data/pdf/navigator_test.js b/chrome/test/data/pdf/navigator_test.js
index d068a96ec81dc350ff6995ff313a7fdb8dc36b4b..21c6bb954305344307059fe374372c0bbd4e167c 100644
--- a/chrome/test/data/pdf/navigator_test.js
+++ b/chrome/test/data/pdf/navigator_test.js
@@ -34,9 +34,14 @@ var tests = [
var viewport = new Viewport(mockWindow, mockSizer, mockCallback.callback,
function() {}, function() {}, 0, 0);
- var paramsParser = new OpenPDFParamsParser();
- paramsParser.namedDestinations['US'] = 0;
- paramsParser.namedDestinations['UY'] = 2;
+ var paramsParser = new OpenPDFParamsParser(function(name) {
+ if (name == 'US')
+ paramsParser.onNamedDestinationReceived(0);
+ else if (name == 'UY')
+ paramsParser.onNamedDestinationReceived(2);
+ else
+ paramsParser.onNamedDestinationReceived(-1);
+ });
var url = "http://xyz.pdf";
var navigateInCurrentTabCallback = new NavigateInCurrentTabCallback();
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | chrome/test/data/pdf/params_parser_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698