Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* vim: set ts=2 et sw=2 tw=80: */ |
michael@0 | 2 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 4 | |
michael@0 | 5 | "use strict"; |
michael@0 | 6 | |
michael@0 | 7 | function test() { |
michael@0 | 8 | waitForExplicitFinish(); |
michael@0 | 9 | setup((ed, win) => { |
michael@0 | 10 | ok(ed.isClean(), "default isClean"); |
michael@0 | 11 | ok(!ed.canUndo(), "default canUndo"); |
michael@0 | 12 | ok(!ed.canRedo(), "default canRedo"); |
michael@0 | 13 | |
michael@0 | 14 | ed.setText("Hello, World!"); |
michael@0 | 15 | ok(!ed.isClean(), "isClean"); |
michael@0 | 16 | ok(ed.canUndo(), "canUndo"); |
michael@0 | 17 | ok(!ed.canRedo(), "canRedo"); |
michael@0 | 18 | |
michael@0 | 19 | ed.undo(); |
michael@0 | 20 | ok(ed.isClean(), "isClean after undo"); |
michael@0 | 21 | ok(!ed.canUndo(), "canUndo after undo"); |
michael@0 | 22 | ok(ed.canRedo(), "canRedo after undo"); |
michael@0 | 23 | |
michael@0 | 24 | ed.setText("What's up?"); |
michael@0 | 25 | ed.setClean(); |
michael@0 | 26 | ok(ed.isClean(), "isClean after setClean"); |
michael@0 | 27 | ok(ed.canUndo(), "canUndo after setClean"); |
michael@0 | 28 | ok(!ed.canRedo(), "canRedo after setClean"); |
michael@0 | 29 | |
michael@0 | 30 | teardown(ed, win); |
michael@0 | 31 | }); |
michael@0 | 32 | } |