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

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

Issue 843463002: Add print and getSelectedText functions to the OOP PDF scripting API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@postMessage-api
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 1e0d7e62902f8e7dfedbaac9c79cd63b9004198a..42b0e1da1ad5eb97bdfe1c3e07f604ac59ef92ce 100644
--- a/chrome/test/data/pdf/basic_plugin_test.js
+++ b/chrome/test/data/pdf/basic_plugin_test.js
@@ -45,7 +45,15 @@ var tests = [
chrome.test.assertEq('some more text',
dict.textBox[1].textNodes[0].text);
}), 0);
- }
+ },
+
+ function testGetSelectedText() {
+ var client = new PDFScriptingAPI(window, window);
+ client.selectAll();
+ client.getSelectedText(chrome.test.callbackPass(function(selectedText) {
+ chrome.test.assertEq('this is some text\nsome more text', selectedText);
+ }));
+ },
];
var client = new PDFScriptingAPI(window, window);

Powered by Google App Engine
This is Rietveld 408576698