gecko-dev/testing/web-platform/tests/editing
Masayuki Nakano ad65eafe7c Bug 1547869 - Make IsCommandEnabled() of HTML editor command classes return false if given editor is TextEditor r=smaug
Currently, this bug does not occur actually because nobody has not accessed
these command classes directly and they are registered only in command table
for HTML editor.  However, once rewriting `nsHTMLDocument::ExecCommand()` with
these classes, its `IsCommandEnabled()` should return false if given editor
is `TextEditor`.  The reason why we need this fix is, when we make
`ExecCommand()` call `IsCommandEnabled()` and it returns `true`, `ExecCommand()`
needs to call `DoCommand()`.  Then, it throws exception if given editor is not
an `HTMLEditor` but the command class is only for `HTMLEditor`.

This patch adds new WPT for testing whether `document.execCommand()` works
with `<input>` and `<textarea>`.  The behavior has not been standardized, but
Chromium handles some commands even in it.  So, I write the expectations from
the point of view of web developers.  (Chrome fails in "cut", "copy" and
"removeformat" cases.)

Differential Revision: https://phabricator.services.mozilla.com/D29473

--HG--
extra : moz-landing-system : lando
2019-05-03 02:15:18 +00:00
..
data Bug 1539527 [wpt PR 16069] - [Editing] Preserve inserted content's original style when inserted into an empty block, a=testonly 2019-04-24 11:30:56 +01:00
include Bug 1467936 [wpt PR 11436] - Split up editing/run/* with variant, a=testonly 2018-08-29 10:08:38 +00:00
manual Bug 1476264 [wpt PR 12021] - Rename *.manual.html as *-manual.html, a=testonly 2018-07-29 18:49:23 +01:00
other Bug 1547869 - Make IsCommandEnabled() of HTML editor command classes return false if given editor is TextEditor r=smaug 2019-05-03 02:15:18 +00:00
run Bug 1488651 [wpt PR 12838] - Set longer timeout to all tests in wpt/editing/run/, a=testonly 2018-09-10 10:12:08 +00:00
event.html
META.yml Bug 1476293 [wpt PR 12024] - Add spec links to META.yml, a=testonly 2018-07-29 18:49:42 +01:00
README

Most of this directory tests conformance to the editing spec written long ago
by Aryeh Gregor.  Nobody actually implements the spec, but the tests are still
useful for regression testing.  The files in data/ were generated from a
JavaScript implementation of the specification using a complex procedure that
can't actually be replicated right now as-is.  Editing them manually is
possible, but they're not really meant to be human-readable.  If anyone is
interested, it would be possible for Aryeh to get the test generation procedure
working again.  Or you could look into the repository history and figure out
how to do it yourself, if you're brave.

There is also a directory other/ that contains additional editor-related tests.
They aren't necessarily based on any specification, but try to specify sensible
behavior, and are meant to be helpful with regression testing for existing
implementations and finding bugs in new implementations.