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

Unified Diff: chrome/test/data/pdf/basic_plugin_test.js

Issue 823813002: Modify pdf_scripting_api.js to support postMessage using BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
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..197bb771e7487a87b6e98f55691d11f4634ec1ba 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, window.location.origin);
Sam McNally 2015/01/06 05:31:04 Remove window.location.origin.
raymes 2015/01/07 03:17:58 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, window.location.origin);
Sam McNally 2015/01/06 05:31:04 Same here.
raymes 2015/01/07 03:17:58 Done.
client.getAccessibilityJSON(chrome.test.callbackPass(function(json) {
var dict = JSON.parse(json);
chrome.test.assertEq(612, dict.width);
@@ -53,7 +51,8 @@ var tests = [
if (viewer.loaded) {
chrome.test.runTests(tests);
} else {
- window.addEventListener('pdfload', function() {
+ var client = new PDFScriptingAPI(window, window, window.location.origin);
Sam McNally 2015/01/06 05:31:04 And here.
raymes 2015/01/07 03:17:58 Done.
+ client.setLoadCallback(function() {
chrome.test.runTests(tests);
});
}

Powered by Google App Engine
This is Rietveld 408576698