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 3fdc90878d57b661cf14714e4c407a5741bab4db..1e0d7e62902f8e7dfedbaac9c79cd63b9004198a 100644 |
| --- a/chrome/test/data/pdf/basic_plugin_test.js |
| +++ b/chrome/test/data/pdf/basic_plugin_test.js |
| @@ -21,8 +21,7 @@ var tests = [ |
| }, |
| function testAccessibility() { |
| - var client = new PDFScriptingAPI(window, window.location.origin); |
| - client.setDestinationWindow(window); |
| + var client = new PDFScriptingAPI(window, window); |
|
Sam McNally
2015/01/08 03:50:26
Can the tests reuse the client created before star
raymes
2015/01/08 22:08:21
Done.
|
| client.getAccessibilityJSON(chrome.test.callbackPass(function(json) { |
| var dict = JSON.parse(json); |
| chrome.test.assertEq(true, dict.copyable); |
| @@ -32,8 +31,7 @@ var tests = [ |
| }, |
| function testAccessibilityWithPage() { |
| - var client = new PDFScriptingAPI(window, window.location.origin); |
| - client.setDestinationWindow(window); |
| + var client = new PDFScriptingAPI(window, window); |
| client.getAccessibilityJSON(chrome.test.callbackPass(function(json) { |
| var dict = JSON.parse(json); |
| chrome.test.assertEq(612, dict.width); |
| @@ -50,10 +48,7 @@ var tests = [ |
| } |
| ]; |
| -if (viewer.loaded) { |
| +var client = new PDFScriptingAPI(window, window); |
| +client.setLoadCallback(function() { |
| chrome.test.runTests(tests); |
| -} else { |
| - window.addEventListener('pdfload', function() { |
| - chrome.test.runTests(tests); |
| - }); |
| -} |
| +}); |