| Test to make sure queryCommandState returns correct values. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| Tests for win |
| PASS queryCommandState("bold") returns false when selecting all of "hello" |
| PASS queryCommandState("bold") returns false when selecting all of "<i>hello</i>" |
| PASS queryCommandState("bold") returns true when selecting all of "<b>hello</b>" |
| PASS queryCommandState("bold") returns false when selecting all of "hello <b>world</b>" |
| PASS queryCommandState("bold") returns false when selecting all of "<b>hello</b> world" |
| PASS queryCommandState("bold") returns false when selecting second word of "hello <b>world</b> WebKit" |
| PASS queryCommandState("bold") returns false when selecting second word of "<b>hello</b> world <b>WebKit</b>" |
| PASS queryCommandState("bold") returns false when selecting second word of "<i>hello <b>hello</b> WebKit</i>" |
| PASS queryCommandState("bold") returns true when selecting second word of "<b>hello <i>hello</i> WebKit</b>" |
| PASS queryCommandState("bold") returns true when selecting second word of "<b><div>hello <i>hello</i> WebKit</div></b>" |
| PASS queryCommandState("bold") returns false when selecting all of "<b style="font-weight: normal;">hello</b>" |
| PASS queryCommandState("bold") returns true when selecting all of "<i style="font-weight: bold;">hello</i>" |
| PASS queryCommandState("bold") returns false when selecting all of "<b>hello</b> world <b>WebKit</b>" |
| PASS queryCommandState("bold") returns true when selecting all of "<b>hello</b><b> world</b>" |
| PASS queryCommandState("bold") returns true when selecting all of "<div><b>hello</b></div><p><b> WebKit</b></p>" |
| PASS queryCommandState("italic") returns false when selecting all of "hello" |
| PASS queryCommandState("italic") returns false when selecting all of "<b>hello</b>" |
| PASS queryCommandState("italic") returns true when selecting all of "<i>hello</i>" |
| PASS queryCommandState("italic") returns false when selecting all of "<i>hello</i> world" |
| PASS queryCommandState("italic") returns false when selecting all of "hello <i>world</i>" |
| PASS queryCommandState("italic") returns true when selecting all of "<i><div>hello world</div></i>" |
| PASS queryCommandState("italic") returns false when selecting all of "<div style="font-style: italic">hello <span style="font-style: normal;">hello</span></div>" |
| PASS queryCommandState("subscript") returns false when selecting all of "hello" |
| PASS queryCommandState("subscript") returns false when selecting all of "<sup>hello</sup>" |
| PASS queryCommandState("subscript") returns true when selecting all of "<sub>hello</sub>" |
| PASS queryCommandState("subscript") returns false when selecting all of "<sub>hello</sub> world" |
| PASS queryCommandState("subscript") returns false when selecting all of "hello <sub>world</sub>" |
| PASS queryCommandState("subscript") returns false when selecting second word of "hello <span style="vertical-align: sub;">world</span> WebKit" |
| PASS queryCommandState("superscript") returns false when selecting all of "hello" |
| PASS queryCommandState("superscript") returns false when selecting all of "<sub>hello</sub>" |
| PASS queryCommandState("superscript") returns true when selecting all of "<sup>hello</sup>" |
| PASS queryCommandState("superscript") returns false when selecting all of "<sup>hello</sup> world" |
| PASS queryCommandState("superscript") returns false when selecting all of "hello <sup>world</sup>" |
| PASS queryCommandState("superscript") returns false when selecting all of "<span style="vertical-align: super;">hello</span><span style="vertical-align: sub;">world</span>" |
| PASS queryCommandState("superscript") returns false when selecting all of "hello<span style="vertical-align: super;">world</span>" |
| PASS queryCommandState("underline") returns false when selecting all of "hello" |
| PASS queryCommandState("underline") returns false when selecting all of "<s>hello</s>" |
| PASS queryCommandState("underline") returns true when selecting all of "<u>hello</u>" |
| PASS queryCommandState("underline") returns false when selecting all of "<u>hello</u> world" |
| PASS queryCommandState("underline") returns false when selecting all of "hello <u>world</u>" |
| PASS queryCommandState("underline") returns true when selecting all of "<u><div>hello world</div></u>" |
| PASS queryCommandState("underline") returns true when selecting second word of "<u><s><div>hello world WebKit</div></s></u>" |
| PASS queryCommandState("underline") returns false when selecting second word of "<s><u>hello</u> world</s> WebKit" |
| PASS queryCommandState("underline") returns false when selecting second word of "<u><s>hello</s> world</u> WebKit" |
| PASS queryCommandState("underline") returns true when selecting second word of "<s>hello <u>world</s> WebKit</u>" |
| PASS queryCommandState("strikeThrough") returns false when selecting all of "hello" |
| PASS queryCommandState("strikeThrough") returns false when selecting all of "<u>hello</u>" |
| PASS queryCommandState("strikeThrough") returns true when selecting all of "<s>hello</s>" |
| PASS queryCommandState("strikeThrough") returns false when selecting all of "<s>hello</s> world" |
| PASS queryCommandState("strikeThrough") returns false when selecting all of "hello <s>world</s>" |
| PASS queryCommandState("strikeThrough") returns true when selecting all of "<s><div>hello world</div></s>" |
| PASS queryCommandState("strikeThrough") returns true when selecting second word of "<s><u><div>hello world WebKit</div></u></s>" |
| PASS queryCommandState("strikeThrough") returns false when selecting second word of "<u><s>hello</s> world</u> WebKit" |
| PASS queryCommandState("strikeThrough") returns true when selecting second word of "hello <s>world WebKit</s>" |
| PASS queryCommandState("strikeThrough") returns true when selecting first two words of "hello <s>world WebKit</s>" |
| |
| Tests for mac |
| PASS queryCommandState("bold") returns false when selecting all of "hello" |
| PASS queryCommandState("bold") returns false when selecting all of "<i>hello</i>" |
| PASS queryCommandState("bold") returns true when selecting all of "<b>hello</b>" |
| PASS queryCommandState("bold") returns false when selecting all of "hello <b>world</b>" |
| PASS queryCommandState("bold") returns true when selecting all of "<b>hello</b> world" |
| PASS queryCommandState("bold") returns true when selecting second word of "hello <b>world</b> WebKit" |
| PASS queryCommandState("bold") returns false when selecting second word of "<b>hello</b> world <b>WebKit</b>" |
| PASS queryCommandState("bold") returns true when selecting second word of "<i>hello <b>hello</b> WebKit</i>" |
| PASS queryCommandState("bold") returns true when selecting second word of "<b>hello <i>hello</i> WebKit</b>" |
| PASS queryCommandState("bold") returns true when selecting second word of "<b><div>hello <i>hello</i> WebKit</div></b>" |
| PASS queryCommandState("bold") returns false when selecting all of "<b style="font-weight: normal;">hello</b>" |
| PASS queryCommandState("bold") returns true when selecting all of "<i style="font-weight: bold;">hello</i>" |
| PASS queryCommandState("bold") returns true when selecting all of "<b>hello</b> world <b>WebKit</b>" |
| PASS queryCommandState("bold") returns true when selecting all of "<b>hello</b><b> world</b>" |
| PASS queryCommandState("bold") returns true when selecting all of "<div><b>hello</b></div><p><b> WebKit</b></p>" |
| PASS queryCommandState("italic") returns false when selecting all of "hello" |
| PASS queryCommandState("italic") returns false when selecting all of "<b>hello</b>" |
| PASS queryCommandState("italic") returns true when selecting all of "<i>hello</i>" |
| PASS queryCommandState("italic") returns true when selecting all of "<i>hello</i> world" |
| PASS queryCommandState("italic") returns false when selecting all of "hello <i>world</i>" |
| PASS queryCommandState("italic") returns true when selecting all of "<i><div>hello world</div></i>" |
| PASS queryCommandState("italic") returns true when selecting all of "<div style="font-style: italic">hello <span style="font-style: normal;">hello</span></div>" |
| PASS queryCommandState("subscript") returns false when selecting all of "hello" |
| PASS queryCommandState("subscript") returns false when selecting all of "<sup>hello</sup>" |
| PASS queryCommandState("subscript") returns true when selecting all of "<sub>hello</sub>" |
| PASS queryCommandState("subscript") returns true when selecting all of "<sub>hello</sub> world" |
| PASS queryCommandState("subscript") returns false when selecting all of "hello <sub>world</sub>" |
| PASS queryCommandState("subscript") returns true when selecting second word of "hello <span style="vertical-align: sub;">world</span> WebKit" |
| PASS queryCommandState("superscript") returns false when selecting all of "hello" |
| PASS queryCommandState("superscript") returns false when selecting all of "<sub>hello</sub>" |
| PASS queryCommandState("superscript") returns true when selecting all of "<sup>hello</sup>" |
| PASS queryCommandState("superscript") returns true when selecting all of "<sup>hello</sup> world" |
| PASS queryCommandState("superscript") returns false when selecting all of "hello <sup>world</sup>" |
| PASS queryCommandState("superscript") returns true when selecting all of "<span style="vertical-align: super;">hello</span><span style="vertical-align: sub;">world</span>" |
| PASS queryCommandState("superscript") returns false when selecting all of "hello<span style="vertical-align: super;">world</span>" |
| PASS queryCommandState("underline") returns false when selecting all of "hello" |
| PASS queryCommandState("underline") returns false when selecting all of "<s>hello</s>" |
| PASS queryCommandState("underline") returns true when selecting all of "<u>hello</u>" |
| PASS queryCommandState("underline") returns true when selecting all of "<u>hello</u> world" |
| PASS queryCommandState("underline") returns false when selecting all of "hello <u>world</u>" |
| PASS queryCommandState("underline") returns true when selecting all of "<u><div>hello world</div></u>" |
| PASS queryCommandState("underline") returns true when selecting second word of "<u><s><div>hello world WebKit</div></s></u>" |
| PASS queryCommandState("underline") returns false when selecting second word of "<s><u>hello</u> world</s> WebKit" |
| PASS queryCommandState("underline") returns true when selecting second word of "<u><s>hello</s> world</u> WebKit" |
| PASS queryCommandState("underline") returns true when selecting second word of "<s>hello <u>world</s> WebKit</u>" |
| PASS queryCommandState("strikeThrough") returns false when selecting all of "hello" |
| PASS queryCommandState("strikeThrough") returns false when selecting all of "<u>hello</u>" |
| PASS queryCommandState("strikeThrough") returns true when selecting all of "<s>hello</s>" |
| PASS queryCommandState("strikeThrough") returns true when selecting all of "<s>hello</s> world" |
| PASS queryCommandState("strikeThrough") returns false when selecting all of "hello <s>world</s>" |
| PASS queryCommandState("strikeThrough") returns true when selecting all of "<s><div>hello world</div></s>" |
| PASS queryCommandState("strikeThrough") returns true when selecting second word of "<s><u><div>hello world WebKit</div></u></s>" |
| PASS queryCommandState("strikeThrough") returns false when selecting second word of "<u><s>hello</s> world</u> WebKit" |
| PASS queryCommandState("strikeThrough") returns true when selecting second word of "hello <s>world WebKit</s>" |
| PASS queryCommandState("strikeThrough") returns false when selecting first two words of "hello <s>world WebKit</s>" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| hello world WebKit |