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

Side by Side Diff: chrome/test/data/pdf/basic_plugin_test.js

Issue 1303103003: PDF: Use PDF metadata for the title instead of the last path element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | chrome/test/data/pdf/test-title.pdf » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 var scriptingAPI; 5 var scriptingAPI;
6 6
7 /** 7 /**
8 * These tests require that the PDF plugin be available to run correctly. 8 * These tests require that the PDF plugin be available to run correctly.
9 */ 9 */
10 var tests = [ 10 var tests = [
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }), 0); 48 }), 0);
49 }, 49 },
50 50
51 function testGetSelectedText() { 51 function testGetSelectedText() {
52 var client = new PDFScriptingAPI(window, window); 52 var client = new PDFScriptingAPI(window, window);
53 client.selectAll(); 53 client.selectAll();
54 client.getSelectedText(chrome.test.callbackPass(function(selectedText) { 54 client.getSelectedText(chrome.test.callbackPass(function(selectedText) {
55 chrome.test.assertEq('this is some text\nsome more text', selectedText); 55 chrome.test.assertEq('this is some text\nsome more text', selectedText);
56 })); 56 }));
57 }, 57 },
58
59 /**
60 * Test that the filename is used as the title.pdf.
61 */
62 function testHasCorrectTitle() {
63 chrome.test.assertEq('test.pdf', document.title);
64
65 chrome.test.succeed();
66 },
58 ]; 67 ];
59 68
60 var scriptingAPI = new PDFScriptingAPI(window, window); 69 var scriptingAPI = new PDFScriptingAPI(window, window);
61 scriptingAPI.setLoadCallback(function() { 70 scriptingAPI.setLoadCallback(function() {
62 chrome.test.runTests(tests); 71 chrome.test.runTests(tests);
63 }); 72 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | chrome/test/data/pdf/test-title.pdf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698