tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

user-interaction-editing-designMode.html (1311B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <title>Editing: designMode attribute test</title>
      5  <link rel="author" title="Baidu" href="mailto: guopengcheng@baidu.com"/>
      6  <link rel="help" href="https://html.spec.whatwg.org/multipage/#making-entire-documents-editable:-the-designmode-idl-attribute"/>
      7  <script src="/resources/testharness.js"></script>
      8  <script src="/resources/testharnessreport.js"></script>
      9  <div id="log"></div>
     10 </head>
     11 <body>
     12  <script type="text/javascript">
     13   test(function() {
     14    assert_equals(document.designMode, "off", "check for designMode value");
     15    assert_true(document.queryCommandSupported("delete"));
     16    assert_false(document.queryCommandEnabled("delete"));
     17   }, "initial designMode attribute");
     18   document.designMode="on";
     19   test(function() {
     20    assert_equals(document.designMode, "on", "check for designMode value");
     21    assert_true(document.queryCommandSupported("delete"));
     22    assert_true(document.queryCommandEnabled("delete"));
     23   }, "set designMode = \"on\"");
     24   document.designMode="off";
     25   test(function() {
     26    assert_equals(document.designMode,"off", "check for designMode value");
     27    assert_true(document.queryCommandSupported("delete"));
     28    assert_false(document.queryCommandEnabled("delete"));
     29   }, "set designMode = \"off\"");
     30  </script>
     31 </body>
     32 </html>