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 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>nsIAccessibleEditableText chrome tests</title> |
michael@0 | 5 | <link rel="stylesheet" type="text/css" |
michael@0 | 6 | href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript" |
michael@0 | 9 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="../common.js"></script> |
michael@0 | 13 | <script type="application/javascript" |
michael@0 | 14 | src="../events.js"></script> |
michael@0 | 15 | <script type="application/javascript" |
michael@0 | 16 | src="editabletext.js"></script> |
michael@0 | 17 | |
michael@0 | 18 | <script type="application/javascript"> |
michael@0 | 19 | function doTest() |
michael@0 | 20 | { |
michael@0 | 21 | var et = new editableTextTest("input"); |
michael@0 | 22 | |
michael@0 | 23 | // 'ee' insertion/removal at 1 or 2 offset of 'hello'/'heeello' string |
michael@0 | 24 | // reports 'ee' text was inserted/removed at 2 offset. |
michael@0 | 25 | et.scheduleTest(et.insertText, "ee", 1, "heeello", 2); |
michael@0 | 26 | et.scheduleTest(et.copyText, 1, 3, "ee"); |
michael@0 | 27 | et.scheduleTest(et.cutText, 1, 3, "hello", 2, 4); |
michael@0 | 28 | et.scheduleTest(et.insertText, "ee", 2, "heeello", 2); |
michael@0 | 29 | et.scheduleTest(et.cutText, 2, 4, "hello", 2, 4); |
michael@0 | 30 | |
michael@0 | 31 | et.scheduleTest(et.deleteText, 1, 3, "hlo"); |
michael@0 | 32 | et.scheduleTest(et.pasteText, 1, "heelo"); |
michael@0 | 33 | |
michael@0 | 34 | var testRun = new editableTextTestRun(); |
michael@0 | 35 | testRun.add(et); |
michael@0 | 36 | testRun.run(); // Will call SimpleTest.finish(); |
michael@0 | 37 | } |
michael@0 | 38 | |
michael@0 | 39 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 40 | addA11yLoadEvent(doTest); |
michael@0 | 41 | </script> |
michael@0 | 42 | </head> |
michael@0 | 43 | <body> |
michael@0 | 44 | |
michael@0 | 45 | <a target="_blank" |
michael@0 | 46 | title="HyperText accessible should get focus when the caret is positioned inside of it, text is changed or copied into clipboard by ATs" |
michael@0 | 47 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=524115"> |
michael@0 | 48 | Mozilla Bug 524115 |
michael@0 | 49 | </a> |
michael@0 | 50 | <a target="_blank" |
michael@0 | 51 | title="Cache rendered text on a11y side" |
michael@0 | 52 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=626660"> |
michael@0 | 53 | Mozilla Bug 626660 |
michael@0 | 54 | </a> |
michael@0 | 55 | <p id="display"></p> |
michael@0 | 56 | <div id="content" style="display: none"></div> |
michael@0 | 57 | <pre id="test"> |
michael@0 | 58 | </pre> |
michael@0 | 59 | |
michael@0 | 60 | <input id="input" value="hello"/> |
michael@0 | 61 | |
michael@0 | 62 | </body> |
michael@0 | 63 | </html> |