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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-execcommand.html

Issue 2141133003: [InputEvent] Fire 'beforeinput'/'input' for 6 text styling actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-execcommand.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-execcommand.html b/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-execcommand.html
index c1b23b230ffb4ccbc959c4c59253e3170624936c..e1de02f38136833190bc648c018bcec6595c5097 100644
--- a/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-execcommand.html
+++ b/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-execcommand.html
@@ -38,15 +38,24 @@ test(function() {
// InsertText
testExecCommandInputType('insertText', 'a', 'insertText');
testExecCommandInputType('insertText', 'bc', 'insertText');
- assert_equals('abc', txt.innerHTML);
+ assert_equals(txt.innerHTML, 'abc');
// Styling
var selection = window.getSelection();
selection.collapse(txt, 0);
selection.extend(txt, 1);
- // TODO(chongz): Add |inputType| for 'bold'.
- testExecCommandInputType('bold', 'bc', '');
- assert_equals('<b>abc</b>', txt.innerHTML);
+ testExecCommandInputType('bold', null, 'bold');
+ assert_equals(txt.innerHTML, '<b>abc</b>');
+ testExecCommandInputType('italic', null, 'italic');
+ assert_equals(txt.innerHTML, '<b><i>abc</i></b>');
+ testExecCommandInputType('underline', null, 'underline');
+ assert_equals(txt.innerHTML, '<b><i><u>abc</u></i></b>');
+ testExecCommandInputType('strikeThrough', null, 'strikeThrough');
+ assert_equals(txt.innerHTML, '<b><i><u><strike>abc</strike></u></i></b>');
+ testExecCommandInputType('superscript', null, 'superscript');
+ assert_equals(txt.innerHTML, '<b><i><u><strike><sup>abc</sup></strike></u></i></b>');
+ testExecCommandInputType('subscript', null, 'subscript');
+ assert_equals(txt.innerHTML, '<b><i><u><strike><sub>abc</sub></strike></u></i></b>');
// Copy shouldn't fire 'input'.
testExecCommandInputType('copy', null, kNoInputEventFired);

Powered by Google App Engine
This is Rietveld 408576698