VisualEditor/IME Testing

VisualEditor's editing environment is a browser ContentEditable element. Consistency, canonicity and correctness is imposed by performing numerous Javascript fixups on the native behaviour, with reference to the underlying document model. The possible fixups are drastically constrained by the way IMEs work in web browsers; e.g.: IMEs vary wildly in the sequences of events and changes they cause in a browser DOM. Each IME+browser+OS combination needs testing; but automated testing frameworks do not provide an easy way to operate IME software directly. Some VisualEditor automated tests do emulate the behaviour of various IMEs, but manual testing is also important.
 * It is unsafe to fixup when an IME window has uncommitted candidate text. But there is no way to detect whether there is uncommitted candidate text.
 * Cursoring needs fixups sometimes. But we can't tell how far the cursor will move (because of complex glyphs) or in which direction (because of bidirectionality).
 * Selections need fixups sometimes. But on some browsers we cannot set a reverse selection (end-to-start) from Javascript.

Where to test
"http://wikimedia.github.io/VisualEditor/demos/ve/desktop-dist.html#!pages/simple.html" $ git clone https://gerrit.wikimedia.org/r/VisualEditor/VisualEditor $ firefox VisualEditor/demos/ve/desktop.html $ chromium-browser --allow-file-access-from-files VisualEditor/demos/ve/desktop.html $ git clone https://gerrit.wikimedia.org/r/VisualEditor/VisualEditor $ php -S localhost:8000  *or*  python -m SimpleHTTPServer $ firefox http://localhost:8000/VisualEditor/demos/ve/desktop.html $ chromium-browser http://localhost:8000/VisualEditor/demos/ve/desktop.html
 * Demonstration server:
 * Standalone, no server required (file:// URLs):
 * Standalone, through a minimal static HTTP fileserver (required for some javascript IMEs that won't work on file:// URLs):
 * Labs instances (http://en.wikipedia.beta.wmflabs.org/ etc)


 * Local mediawiki instance

Text entry

 * into a paragraph (at start/middle/end/into empty paragraph) - then press ENTER to force a re-render
 * into a bold or italic (at start/middle/end/into empty annotation) - then press ENTER to force a re-render.
 * as regular text immediately after bold or italic (e.g. xxx HERE) - then press ENTER to force a re-render
 * (N.B. We know typing at the end of links is broken, even in English: this is *not* an IME bug. https://phabricator.wikimedia.org/T74108 And typing before an annotation at the start of a paragraph is also broken, and not an IME bug)

Uncommitted candidate handling
These tests are applicable if your IME has uncommitted candidates (whether or not those candidates actually appear in the DOM as temporary insertions).
 * Change candidate - then continue typing, then press ENTER to force a re-render
 * Press left/right/up/down (whether or not the IME swallows the keypresses), then continue typing, then press ENTER to force a re-render
 * Press backspace and delete (whether or not the IME swallows the keypresses), then continue typing, then press ENTER to force a re-render
 * Mouse click / touch to select a different piece of text (check the behaviour is reasonable), then press ENTER to force a re-render

How to report problems

 * Remember the software engineer probably can't read your language: you have to be really patient and explain exactly what is wrong :-)
 * Specify exactly the OS version / browser version / IME software version / language / input method settings
 * State the exact keypresses to reproduce the problem (fewer is better)
 * Give the exact expected text (i.e. what should appear)
 * Give the exact observed text (i.e. what actually appears)

Where to report
If there's a problem, Phabricator ; if not, add to the next section of this page :-)

Working well

 * Ubuntu 14.04.2 LTS firefox 35.0.1 ibus-pinyin (master 2015-02-24 dchan)
 * Ubuntu 14.04.2 LTS chromium 40.0.2214.111 ibus-pinyin (master 2015-02-24 dchan)
 * Ubuntu 14.04.2 LTS chromium 40.0.2214.111 Google Input Tools 3.10.0.0 Cantonese (master 2015-02-24 dchan)
 * Windows 8.1 firefox 36.0 hindi Inscript (master 2015-02-27 dchan)
 * Windows 8.1 chromium 40.0.2214.115 hindi Inscript (master 2015-02-27 dchan)

Provisionally working
These seem to work OK but could do with more testing from someone who knows the script well.
 * Ubuntu 14.04.2 LTS firefox 35.0.1 ibus-m17n Hindi phonetic (master 2015-02-24 dchan)
 * Ubuntu 14.04.2 LTS chromium 40.0.2214.111 ibus-m17n Hindi phonetic (master 2015-02-24 dchan)
 * Ubuntu 14.04.2 LTS firefox 35.0.1 ibus-m17n Malayalam Swanalekha (master 2015-02-24 dchan)
 * Ubuntu 14.04.2 LTS chromium 40.0.2214.111 ibus-m17n Malayalam Swanalekha (master 2015-02-24 dchan)
 * Ubuntu 14.04.2 LTS firefox 35.0.1 ibus-m17n Korean han2 (master 2015-02-24 dchan)
 * Ubuntu 14.04.2 LTS chromium 40.0.2214.111 ibus-m17n Korean han2 (master 2015-02-24 dchan)

Partially working
These have some specified issues, but are not completely unusable.
 * Ubuntu 14.04.2 LTS chromium 40.0.2214.111 Wikimedia input tools 0.1 Hindi (master 2015-02-25 dchan)
 * Mostly working
 * Typing into an empty annotation (e.g. clicking 'bold' in normal text then typing) jumps to the start of the paragraph.
 * Typing into an empty un-annotation (e.g. clicking 'bold' in bold text then typing) jumps to the start of the paragraph.

Not working
These are completely unusable because of specified issues.
 * ANY_OS firefox 35.0.1 Wikimedia input tools 0.1.4 ANY_LANGUAGE (master 2015-02-25 dchan)
 * The language selector does not appear. This is expected behaviour, because unlike the chromium extension, the firefox extension's initializeIME function does not select '[contenteditable]' for IME input (only inputs and textareas).