Browserscope

What are the Rich Text Tests?

These tests cover browers' implementations of contenteditable for basic rich text formatting commands. Most browser implementations do very well at editing the HTML which is generated by their own execCommands. But a big problem happens when developers try to make cross-browser web applications using contenteditable - most browsers are not able to correctly change formatting generated by other browsers. On top of that, most browsers allow users to to paste arbitrary HTML from other webpages into a contenteditable region, which is even harder for browsers to properly format. These tests check how well the execCommand, queryCommandState, and queryCommandValue functions work with different types of HTML.

More About Each Test

Selection

These tests verify that selection commands are honored correctly. The expected and actual outputs are shown.

Apply Format

These tests use execCommand to apply formatting to plain text, with styleWithCSS being set to false. The expected and actual outputs are shown.

Apply Format, styleWithCSS

These tests use execCommand to apply formatting to plain text, with styleWithCSS being set to true. The expected and actual outputs are shown.

Change Format

These tests are similar to the unapply tests, except that they're for execCommands which take an argument (fontname, fontsize, etc.). They apply the execCommand to text which already has some formatting, in order to change it. styleWithCSS is being set to false. The expected and actual outputs are shown.

Change Format, styleWithCSS

These tests are similar to the unapply tests, except that they're for execCommands which take an argument (fontname, fontsize, etc.). They apply the execCommand to text which already has some formatting, in order to change it. styleWithCSS is being set to true. The expected and actual outputs are shown.

Unapply Format

These tests put different combinations of HTML into a contenteditable iframe, and then run an execCommand to attempt to remove the formatting the HTML applies. For example, there are tests to check if bold styling from <b>, <strong>, and <span style="font-weight:normal"> are all removed by the bold execCommand. It is important that browsers can remove all variations of a style, not just the variation the browser applies on its own, because it's quite possible that a web application could allow editing with multiple browsers, or that users could paste content into the contenteditable region. For these tests, styleWithCSS is set to false. The expected and actual outputs are shown.

Unapply Format, styleWithCSS

These tests put different combinations of HTML into a contenteditable iframe, and then run an execCommand to attempt to remove the formatting the HTML applies. For example, there are tests to check if bold styling from <b>, <strong>, and <span style="font-weight:normal"> are all removed by the bold execCommand. It is important that browsers can remove all variations of a style, not just the variation the browser applies on its own, because it's quite possible that a web application could allow editing with multiple browsers, or that users could paste content into the contenteditable region. For these tests, styleWithCSS is set to true. The expected and actual outputs are shown.

Delete Content

These tests verify that 'delete' commands are executed correctly. Note that 'delete' commands are supposed to have the same result as if the user had hit the 'BackSpace' (NOT 'Delete'!) key. The expected and actual outputs are shown.

Forward-Delete Content

These tests verify that 'forwarddelete' commands are executed correctly. Note that 'forwarddelete' commands are supposed to have the same result as if the user had hit the 'Delete' key. The expected and actual outputs are shown.

Insert Content

These tests verify that the various 'insert' and 'create' commands, that create a single HTML element, rather than wrapping existing content, are executed correctly. (Commands that wrap existing HTML are part of the 'apply' and 'applyCSS' categories.) The expected and actual outputs are shown.

Selection Results

Number of cases within those tests that manipulate HTML (categories 'Apply', 'Change', 'Unapply', 'Delete', 'ForwardDelete', 'Insert') where the result selection matched the expectation.

q.C.Supported Function

These tests verify that the 'queryCommandSupported()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown.

q.C.Enabled Function

These tests verify that the 'queryCommandEnabled()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown.

q.C.Indeterm Function

These tests verify that the 'queryCommandIndeterm()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown.

q.C.State Function

These tests verify that the 'queryCommandState()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown.

q.C.State Function, styleWithCSS

These tests verify that the 'queryCommandState()' function return a correct result given a certain set-up. styleWithCSS is being set to true. The expected and actual results are shown.

q.C.Value Function

These tests verify that the 'queryCommandValue()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown.

q.C.Value Function, styleWithCSS

These tests verify that the 'queryCommandValue()' function return a correct result given a certain set-up. styleWithCSS is being set to true. The expected and actual results are shown.

CC0 | Home | FAQ | API | UA Parser | News | Browser Resources | Code | Submit a Bug | Downloads | Mailing List | Contact