| Index: chrome/test/data/pdf/basic_plugin_test.js
|
| diff --git a/chrome/test/data/pdf/basic_plugin_test.js b/chrome/test/data/pdf/basic_plugin_test.js
|
| index 0413d46378f23fafb487e18e72045a09a08bdccf..8413c52e1bd1d9837825fa3214d5fd470e98b6c4 100644
|
| --- a/chrome/test/data/pdf/basic_plugin_test.js
|
| +++ b/chrome/test/data/pdf/basic_plugin_test.js
|
| @@ -18,6 +18,33 @@ var tests = [
|
| chrome.test.assertEq(1066, sizer.offsetHeight);
|
| chrome.test.succeed();
|
| },
|
| +
|
| + function testAccessibility() {
|
| + var client = new PDFScriptingAPI(window, window.location.origin);
|
| + client.setDestinationWindow(window);
|
| + client.getAccessibilityJSON(chrome.test.callbackPass(function(json) {
|
| + chrome.test.assertEq('{"copyable":true,"loaded":true,"numberOfPages":1}',
|
| + json);
|
| + }));
|
| + },
|
| +
|
| + function testAccessibilityWithPage() {
|
| + var client = new PDFScriptingAPI(window, window.location.origin);
|
| + client.setDestinationWindow(window);
|
| + client.getAccessibilityJSON(chrome.test.callbackPass(function(json) {
|
| + var dict = JSON.parse(json);
|
| + chrome.test.assertEq(612, dict.width);
|
| + chrome.test.assertEq(792, dict.height);
|
| + chrome.test.assertEq(1.0, dict.textBox[0].fontSize);
|
| + chrome.test.assertEq('text', dict.textBox[0].textNodes[0].type);
|
| + chrome.test.assertEq('this is some text',
|
| + dict.textBox[0].textNodes[0].text);
|
| + chrome.test.assertEq(1.0, dict.textBox[1].fontSize);
|
| + chrome.test.assertEq('text', dict.textBox[1].textNodes[0].type);
|
| + chrome.test.assertEq('some more text',
|
| + dict.textBox[1].textNodes[0].text);
|
| + }), 0);
|
| + }
|
| ];
|
|
|
| window.addEventListener('pdfload', function() {
|
|
|