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

Unified Diff: third_party/WebKit/LayoutTests/editing/inserting/insert-on-unfocused-element.html

Issue 2889763003: Accept text input only if selection has focus. (Closed)
Patch Set: update Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditorKeyBindings.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/inserting/insert-on-unfocused-element.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-on-unfocused-element.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-on-unfocused-element.html
new file mode 100644
index 0000000000000000000000000000000000000000..6abd3eeb3db1155d0c4d5af5050751b40de4529e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-on-unfocused-element.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div id="outer" tabindex="-1">
+ <div id="input" contenteditable>foo</div>
+</div>
+<script>
+test(() => {
+ if (window.eventSender === undefined)
yosin_UTC9 2017/05/19 05:50:33 nit: we found new way. assert_not_exists(window,
yoichio 2017/05/19 08:00:33 Done.
+ assert_unreached('required window.eventSender');
+ input.focus();
+ assert_equals(document.activeElement, input);
+ outer.focus();
+ assert_equals(document.activeElement, outer, 'outer is focued.');
+ eventSender.keyDown('a');
+ assert_equals(input.textContent, 'foo', 'Input value should not change.');
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditorKeyBindings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698