accessible/tests/mochitest/editabletext/test_2.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/editabletext/test_2.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>nsIAccessibleEditableText chrome tests</title>
     1.8 +  <link rel="stylesheet" type="text/css"
     1.9 +        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    1.10 +
    1.11 +  <script type="application/javascript"
    1.12 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +
    1.14 +  <script type="application/javascript"
    1.15 +          src="../common.js"></script>
    1.16 +  <script type="application/javascript"
    1.17 +          src="../events.js"></script>
    1.18 +  <script type="application/javascript"
    1.19 +          src="editabletext.js"></script>
    1.20 +
    1.21 +  <script type="application/javascript">
    1.22 +    function doTest()
    1.23 +    {
    1.24 +      var et = new editableTextTest("input");
    1.25 +
    1.26 +      // 'ee' insertion/removal at 1 or 2 offset of 'hello'/'heeello' string
    1.27 +      // reports 'ee' text was inserted/removed at 2 offset.
    1.28 +      et.scheduleTest(et.insertText, "ee", 1, "heeello", 2);
    1.29 +      et.scheduleTest(et.copyText, 1, 3, "ee");
    1.30 +      et.scheduleTest(et.cutText, 1, 3, "hello", 2, 4);
    1.31 +      et.scheduleTest(et.insertText, "ee", 2, "heeello", 2);
    1.32 +      et.scheduleTest(et.cutText, 2, 4, "hello", 2, 4);
    1.33 +
    1.34 +      et.scheduleTest(et.deleteText, 1, 3, "hlo");
    1.35 +      et.scheduleTest(et.pasteText, 1, "heelo");
    1.36 +
    1.37 +      var testRun = new editableTextTestRun();
    1.38 +      testRun.add(et);
    1.39 +      testRun.run(); // Will call SimpleTest.finish();
    1.40 +    }
    1.41 +
    1.42 +    SimpleTest.waitForExplicitFinish();
    1.43 +    addA11yLoadEvent(doTest);
    1.44 +  </script>
    1.45 +</head>
    1.46 +<body>
    1.47 +
    1.48 +  <a target="_blank"
    1.49 +     title="HyperText accessible should get focus when the caret is positioned inside of it, text is changed or copied into clipboard by ATs"
    1.50 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=524115">
    1.51 +    Mozilla Bug 524115
    1.52 +  </a>
    1.53 +  <a target="_blank"
    1.54 +     title="Cache rendered text on a11y side"
    1.55 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=626660">
    1.56 +    Mozilla Bug 626660
    1.57 +  </a>
    1.58 +  <p id="display"></p>
    1.59 +  <div id="content" style="display: none"></div>
    1.60 +  <pre id="test">
    1.61 +  </pre>
    1.62 +
    1.63 +  <input id="input" value="hello"/>
    1.64 +
    1.65 +</body>
    1.66 +</html>

mercurial