Download this file
| 1 | //go:build browser |
| 2 | |
| 3 | package docs_test |
| 4 | |
| 5 | import "testing" |
| 6 | |
| 7 | // Three behaviours from the richer-UI pass, in Chromium and WebKit |
| 8 | // (fixtures/engines/richer.mjs; Fable's branch review on #105): |
| 9 | // |
| 10 | // - the toolbar's Undo and Redo stay current through keyboard undo and |
| 11 | // redo, which never touch the toolbar (the buttons used to keep the |
| 12 | // state of the last toolbar-driven change); |
| 13 | // - an empty document opens with the caret in it, and one with text |
| 14 | // does not take focus; |
| 15 | // - on the list, emptying a search with Backspace stays on the |
| 16 | // results, and only clearing it (the field's own ×, or Escape) goes |
| 17 | // back to the whole list. |
| 18 | func TestEnginesRicherUIBehaviours(t *testing.T) { |
| 19 | if out, err := runEngines(t, "richer.mjs"); err != nil { |
| 20 | t.Fatalf("a richer-UI behaviour failed in an engine: %v\n%s", err, out) |
| 21 | } |
| 22 | } |
| 23 | |