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

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

Issue 1568723002: Improve extraction of accessible text from PDF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_pdf
Patch Set: Get rid of unneccessary assertion in test Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_page.h » ('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 23 matching lines...) Expand all
34 34
35 function testAccessibilityWithPage() { 35 function testAccessibilityWithPage() {
36 scriptingAPI.getAccessibilityJSON(chrome.test.callbackPass(function(json) { 36 scriptingAPI.getAccessibilityJSON(chrome.test.callbackPass(function(json) {
37 var dict = JSON.parse(json); 37 var dict = JSON.parse(json);
38 chrome.test.assertEq(612, dict.width); 38 chrome.test.assertEq(612, dict.width);
39 chrome.test.assertEq(792, dict.height); 39 chrome.test.assertEq(792, dict.height);
40 chrome.test.assertEq(1.0, dict.textBox[0].fontSize); 40 chrome.test.assertEq(1.0, dict.textBox[0].fontSize);
41 chrome.test.assertEq('text', dict.textBox[0].textNodes[0].type); 41 chrome.test.assertEq('text', dict.textBox[0].textNodes[0].type);
42 chrome.test.assertEq('this is some text', 42 chrome.test.assertEq('this is some text',
43 dict.textBox[0].textNodes[0].text); 43 dict.textBox[0].textNodes[0].text);
44 chrome.test.assertEq(1.0, dict.textBox[1].fontSize);
45 chrome.test.assertEq('text', dict.textBox[1].textNodes[0].type); 44 chrome.test.assertEq('text', dict.textBox[1].textNodes[0].type);
46 chrome.test.assertEq('some more text', 45 chrome.test.assertEq('some more text',
47 dict.textBox[1].textNodes[0].text); 46 dict.textBox[1].textNodes[0].text);
48 }), 0); 47 }), 0);
49 }, 48 },
50 49
51 function testGetSelectedText() { 50 function testGetSelectedText() {
52 var client = new PDFScriptingAPI(window, window); 51 var client = new PDFScriptingAPI(window, window);
53 client.selectAll(); 52 client.selectAll();
54 client.getSelectedText(chrome.test.callbackPass(function(selectedText) { 53 client.getSelectedText(chrome.test.callbackPass(function(selectedText) {
(...skipping 23 matching lines...) Expand all
78 e.initEvent('keydown'); 77 e.initEvent('keydown');
79 e.keyCode = 27; 78 e.keyCode = 27;
80 document.dispatchEvent(e); 79 document.dispatchEvent(e);
81 } 80 }
82 ]; 81 ];
83 82
84 var scriptingAPI = new PDFScriptingAPI(window, window); 83 var scriptingAPI = new PDFScriptingAPI(window, window);
85 scriptingAPI.setLoadCallback(function() { 84 scriptingAPI.setLoadCallback(function() {
86 chrome.test.runTests(tests); 85 chrome.test.runTests(tests);
87 }); 86 });
OLDNEW
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698