Chromium Code Reviews| 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..aaf035f6095e4449750d78be115748a0ee0610f6 100644 |
| --- a/chrome/test/data/pdf/basic_plugin_test.js |
| +++ b/chrome/test/data/pdf/basic_plugin_test.js |
| @@ -18,6 +18,32 @@ 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) { |
| + chrome.test.assertEq( |
| + '{"height":792.0,"textBox":[{"fontSize":1.0,' + |
| + '"height":8.8680419921875,"left":77.13200378417969,' + |
|
Lei Zhang
2014/05/08 06:42:53
Are these values going to work cross-platform?
raymes
2014/05/09 06:19:45
Good point - I got rid of the checks for floating
|
| + '"textNodes":[{"text":"this is some text","type":"text"}],' + |
| + '"top":74.3599853515625,"width":85.58399963378906},' + |
| + '{"fontSize":1.0,"height":8.25604248046875,' + |
| + '"left":77.38400268554688,' + |
| + '"textNodes":[{"text":"some more text","type":"text"}],' + |
| + '"top":88.97198486328125,"width":82.30081176757812}],"width":612.0}', |
| + json); |
| + }), 0); |
| + } |
| ]; |
| window.addEventListener('pdfload', function() { |