editor/composer/test/test_bug738440.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!doctype html>
     2 <!--
     3 https://bugzilla.mozilla.org/show_bug.cgi?id=738440
     4 -->
     5 <title>Test for Bug 738440</title>
     6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
     7 <link rel="stylesheet" href="/tests/SimpleTest/test.css" />
     8 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=738440">Mozilla Bug 738440</a>
     9 <div contenteditable></div>
    10 <script>
    12 /** Test for Bug 738440 **/
    13 document.execCommand("stylewithcss", false, "true");
    14 is(document.queryCommandState("stylewithcss"), true,
    15    "setting stylewithcss to true should cause its state to be true");
    16 is(document.queryCommandState("usecss"), false,
    17    "usecss state should always be false");
    19 document.execCommand("stylewithcss", false, "false");
    20 is(document.queryCommandState("stylewithcss"), false,
    21    "setting stylewithcss to false should cause its state to be false");
    22 is(document.queryCommandState("usecss"), false,
    23    "usecss state should always be false");
    25 document.execCommand("usecss", false, "true");
    26 is(document.queryCommandState("stylewithcss"), false,
    27    "setting usecss to true should cause stylewithcss state to be false");
    28 is(document.queryCommandState("usecss"), false,
    29    "usecss state should always be false");
    31 document.execCommand("usecss", false, "false");
    32 is(document.queryCommandState("stylewithcss"), true,
    33    "setting usecss to false should cause stylewithcss state to be true");
    34 is(document.queryCommandState("usecss"), false,
    35    "usecss state should always be false");
    37 </script>

mercurial