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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/edit_commands_no_menu/guest.html

Issue 15149006: <webview>: Plumb edit commands (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed fprintf Created 7 years, 7 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/extensions/platform_apps/web_view/edit_commands_no_menu/guest.html
diff --git a/chrome/test/data/extensions/platform_apps/web_view/edit_commands/guest.html b/chrome/test/data/extensions/platform_apps/web_view/edit_commands_no_menu/guest.html
similarity index 63%
copy from chrome/test/data/extensions/platform_apps/web_view/edit_commands/guest.html
copy to chrome/test/data/extensions/platform_apps/web_view/edit_commands_no_menu/guest.html
index 151985ebac585ae71ce417bb7d64dfc6b6a31f07..667eb540f2cc03389f5da497dbf9fa127fcb7f1c 100644
--- a/chrome/test/data/extensions/platform_apps/web_view/edit_commands/guest.html
+++ b/chrome/test/data/extensions/platform_apps/web_view/edit_commands_no_menu/guest.html
@@ -27,30 +27,29 @@
notifyEmbedder(['channel-created']);
return;
}
- if (data[0] == 'select-all') {
- var range = document.createRange();
- range.selectNode(document.body);
- window.getSelection().addRange(range);
- notifyEmbedder(['selected-all']);
+ if (data[0] == 'end-of-line') {
+ window.getSelection().empty();
+ var testinput = document.getElementById('testinput');
+ var length = testinput.value.length;
+ testinput.focus();
+ testinput.selectionStart = length;
+ return;
}
};
window.addEventListener('message', onPostMessageReceived, false);
- window.addEventListener('focus', function(e) {
- notifyEmbedder(['focused', embedderTestName]);
- });
-
- window.addEventListener('blur', function(e) {
- notifyEmbedder(['blurred', embedderTestName]);
- });
-
- window.addEventListener('copy', function(e) {
- notifyEmbedder(['copy', embedderTestName]);
+ window.addEventListener('load', function(e) {
+ document.getElementById('testinput').addEventListener('keyup',
+ function(e) {
+ var response = 'caret-position-' + this.selectionStart;
+ notifyEmbedder([response, embedderTestName]);
+ });
});
</script>
</head>
<body>
- <div>This is a guest that monitors focus.</div>
+ <div>This is a guest that verifies edit commands are sent.</div>
+ <input id='testinput' type="text" value="test">
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698