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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/input-events/input-events-typing-data-manual.html

Issue 2919603002: [WPT] Add automated manual test for InputEvent typing (Closed)
Patch Set: foolip's comments: Fix nits 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/LayoutTests/external/wpt_automation/input-events/input-events-typing-data-manual-automation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/input-events/input-events-typing-data-manual.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/input-events/input-events-typing-data-manual.html b/third_party/WebKit/LayoutTests/external/wpt/input-events/input-events-typing-data-manual.html
new file mode 100644
index 0000000000000000000000000000000000000000..2b4a80984d87492c4eae17374bdb25f78f0eb916
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/input-events/input-events-typing-data-manual.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>InputEvent have data when typing on textarea and contenteditable</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<p>To manually run this test, please follow the steps below:<br/>
+1. Focus the first box and press key 'a' and then 'b'.<br/>
+2. Focus the second box and press key 'c' and then 'd'.<br/>
+<br/>
+If a "PASS" result appears the test passes, otherwise it fails</p>
+<textarea id='plain'></textarea>
+<div id='rich' style='border-style: solid;' contenteditable></div>
+<script>
+async_test(t => {
+ const expectedResult = [
+ 'plain-beforeinput-a',
+ 'plain-input-a',
+ 'plain-beforeinput-b',
+ 'plain-input-b',
+ 'rich-beforeinput-c',
+ 'rich-input-c',
+ 'rich-beforeinput-d',
+ 'rich-input-d',
+ ];
+ let eventCounter = 0;
+
+ for (const targetId of ['plain', 'rich']) {
+ for (const eventType of ['beforeinput', 'input']) {
+ document.getElementById(targetId).addEventListener(eventType, t.step_func(e => {
+ assert_equals(`${targetId}-${eventType}-${e.data}`, expectedResult[eventCounter]);
+ ++eventCounter;
+ if (eventCounter === expectedResult.length)
+ t.done();
+ }));
+ }
+ }
+})
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt_automation/input-events/input-events-typing-data-manual-automation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698