michael@0: // For the original (development) tests, we want to make a bunch of changes to michael@0: // the page as it loads. We don't want this for the conformance tests, so let michael@0: // them opt out. michael@0: if (typeof testsJsLibraryOnly == "undefined" || !testsJsLibraryOnly) { michael@0: // Alert the reader of egregious Opera bug that will make the specced michael@0: // implementation horribly buggy michael@0: //@{ michael@0: (function() { michael@0: var div = document.createElement("div"); michael@0: div.appendChild(document.createElement("br")); michael@0: document.body.insertBefore(div, document.body.firstChild); michael@0: var range = document.createRange(); michael@0: range.setStart(div, 1); michael@0: div.insertBefore(document.createElement("p"), div.firstChild); michael@0: if (range.startOffset > range.startContainer.childNodes.length) { michael@0: var warningDiv = document.createElement("p"); michael@0: document.body.insertBefore(warningDiv, document.body.firstChild); michael@0: warningDiv.style.fontWeight = "bold"; michael@0: warningDiv.style.fontSize = "2em"; michael@0: warningDiv.style.color = "red"; michael@0: warningDiv.innerHTML = 'Your browser suffers from an egregious bug in range mutation that will give incorrect results for the spec columns in many cases. To ensure that the spec column contains the output actually required by the spec, use a different browser.'; michael@0: } michael@0: div.parentNode.removeChild(div); michael@0: })(); michael@0: //@} michael@0: michael@0: // Insert the toolbar thingie as soon as the script file is loaded michael@0: //@{ michael@0: (function() { michael@0: var toolbarDiv = document.createElement("div"); michael@0: toolbarDiv.id = "toolbar"; michael@0: // Note: this is completely not a hack at all. michael@0: toolbarDiv.innerHTML = "" michael@0: + "" michael@0: + ""; michael@0: michael@0: document.body.appendChild(toolbarDiv); michael@0: })(); michael@0: //@} michael@0: michael@0: // Confusingly, we're storing a string here, not a boolean. michael@0: document.querySelector("#alert-checkbox").checked = localStorage["display-alerts"] != "false"; michael@0: document.querySelector("#browser-checkbox").checked = localStorage["display-browser-tests"] != "false"; michael@0: michael@0: function updateAlertRowStyle() { michael@0: //@{ michael@0: var checked = document.querySelector("#alert-checkbox").checked; michael@0: document.querySelector("#alerts").disabled = checked; michael@0: localStorage["display-alerts"] = checked; michael@0: } michael@0: //@} michael@0: updateAlertRowStyle(); michael@0: michael@0: // Feature-test whether the browser wraps at or not, and set word-wrap: michael@0: // break-word where necessary if not. (IE and Opera don't wrap, Gecko and michael@0: // WebKit do.) word-wrap: break-word will break anywhere at all, so it looks michael@0: // significantly uglier. michael@0: //@{ michael@0: (function() { michael@0: var wordWrapTestDiv = document.createElement("div"); michael@0: wordWrapTestDiv.style.width = "5em"; michael@0: document.body.appendChild(wordWrapTestDiv); michael@0: wordWrapTestDiv.innerHTML = "abc"; michael@0: var height1 = getComputedStyle(wordWrapTestDiv).height; michael@0: wordWrapTestDiv.innerHTML = "abcabcabcabcabcabc"; michael@0: var height2 = getComputedStyle(wordWrapTestDiv).height; michael@0: document.body.removeChild(wordWrapTestDiv); michael@0: if (height1 == height2) { michael@0: document.body.className = (document.body.className + " wbr-workaround").trim(); michael@0: } michael@0: })(); michael@0: //@} michael@0: } michael@0: michael@0: // Now for the meat of the file. michael@0: var tests = { michael@0: backcolor: [ michael@0: //@{ Same as hilitecolor (set below) michael@0: ], michael@0: //@} michael@0: bold: [ michael@0: //@{ michael@0: 'foo[]bar', michael@0: '

[foo

bar]

', michael@0: '[foo bar]', michael@0: '

[foo

bar

baz]

', michael@0: '

[foo


bar]', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo{}bar', michael@0: 'foo[]bar', michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz]qozquz', michael@0: 'foo[barbaz]qozquz', michael@0: '{

foo

}', michael@0: michael@0: 'foo[bar]baz', michael@0: 'fo[obarb]az', michael@0: 'fooba[rb]az', michael@0: 'fo[ob]arbaz', michael@0: 'fo[obarb]az', michael@0: 'foo[bar]baz', michael@0: 'fo[obarb]az', michael@0: 'fooba[rb]az', michael@0: 'fo[ob]arbaz', michael@0: 'fo[obarb]az', michael@0: michael@0: '
foob[a]rbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '{
foobarbaz
}', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foobar[baz]', michael@0: '[foo]barbaz', michael@0: 'foo[bar]baz', michael@0: 'foobar[baz]', michael@0: '[foo]barbaz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: michael@0: 'foo{}baz', michael@0: 'foo{}baz', michael@0: 'foo{}baz', michael@0: 'foo{}baz', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: michael@0: '{

foo

bar

}

baz

', michael@0: '

foo[bar}

baz

', michael@0: michael@0: 'foo [bar baz] qoz quz sic', michael@0: 'foo bar baz [qoz quz] sic', michael@0: michael@0: 'bar [baz] qoz', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: '{foobar]baz', michael@0: '{foobar]baz', michael@0: '{foobar]baz', michael@0: '{foobar]baz', michael@0: 'foo[barbaz}', michael@0: 'foo[barbaz}', michael@0: 'foo[barbaz}', michael@0: 'foo[barbaz}', michael@0: michael@0: '

foo[bar]baz

', michael@0: '{

foobar]baz

', michael@0: '

foo[barbaz

}', michael@0: '

[foobarbaz]

', michael@0: '{

foobarbaz]

', michael@0: '

[foobarbaz

}', michael@0: '{

foobarbaz

}', michael@0: michael@0: 'foobar[baz]quzqoz', michael@0: 'foo[bar]baz', michael@0: michael@0: '{foo bar}', michael@0: '{

foo

bar}', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]', michael@0: michael@0: 'foo{bar}baz', michael@0: '[foobarbaz]', michael@0: '[foo]', michael@0: 'foo[bar]baz', michael@0: michael@0: '

foo[bar]baz

', michael@0: michael@0: // Tests for queryCommandIndeterm() and queryCommandState() michael@0: 'fo[ob]arbaz', michael@0: 'fooba[rb]az', michael@0: 'fo[obarb]az', michael@0: 'foo[b]arbaz', michael@0: 'fooba[r]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo{bar}baz', michael@0: 'fo[ob]arbaz', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: ], michael@0: //@} michael@0: createlink: [ michael@0: //@{ michael@0: 'foo[]bar', michael@0: '

[foo

bar]

', michael@0: '[foo bar]', michael@0: '

[foo

bar

baz]

', michael@0: '

[foo


bar]', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo{}bar', michael@0: 'foo[]bar', michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz]qozquz', michael@0: 'foo[barbaz]qozquz', michael@0: '{

foo

}', michael@0: michael@0: '
foob[a]rbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '{
foobarbaz
}', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz}', michael@0: '{foobar]baz', michael@0: '{foobarbaz}', michael@0: '[foobarbaz]', michael@0: michael@0: 'foo[bar]baz', michael@0: '[foo]barbaz', michael@0: 'foobar[baz]', michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz]', michael@0: '[foobar]baz', michael@0: '[foobarbaz]', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz}', michael@0: '{foobar]baz', michael@0: '{foobarbaz}', michael@0: '[foobarbaz]', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz]', michael@0: '[foobar]baz', michael@0: '[foobarbaz]', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz}', michael@0: '{foobar]baz', michael@0: '[foobarbaz]', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: michael@0: ['', 'foo[bar]baz'], michael@0: ], michael@0: //@} michael@0: // Opera requires this to be quoted, contrary to ES5 11.1.5 which allows michael@0: // PropertyName to be any IdentifierName, and see 7.6 which defines michael@0: // IdentifierName to include ReservedWord; Identifier excludes it. michael@0: "delete": [ michael@0: //@{ michael@0: // Collapsed selection michael@0: // michael@0: // These three commented-out test call Firefox 5.0a2 to blow up, not michael@0: // just throwing exceptions on the tests themselves but on many michael@0: // subsequent tests too. michael@0: //'[]foo', michael@0: //'[]foo', michael@0: //'

[]foo

', michael@0: 'foo[]bar', michael@0: 'foo{}bar', michael@0: 'foo[]bar', michael@0: 'foobar[]baz', michael@0: 'foo[]baz', michael@0: michael@0: 'foö[]bar', michael@0: 'foö[]bar', michael@0: 'foö̧[]bar', michael@0: 'ö[]bar', michael@0: 'ö[]bar', michael@0: 'ö̧[]bar', michael@0: michael@0: 'שָׁ[]לוֹם', michael@0: 'שָׁלוֹ[]ם', michael@0: michael@0: '

foo

[]bar

', michael@0: '

foo

[]bar', michael@0: 'foo

[]bar

', michael@0: '

foo

[]bar

', michael@0: '

foo

[]bar', michael@0: 'foo

[]bar

', michael@0: '

foo

[]bar

', michael@0: '

foo

[]bar', michael@0: 'foo

[]bar

', michael@0: michael@0: '

foo

[]bar

', michael@0: '

foo

[]bar

', michael@0: '

foo

[]bar

', michael@0: '

foo

[]bar', michael@0: 'foo

[]bar

', michael@0: michael@0: '
foo
[]bar
', michael@0: '
foo
[]bar', michael@0: michael@0: 'foo
[]bar', michael@0: 'foo
[]bar', michael@0: 'foo
[]bar', michael@0: '

foo


[]bar', michael@0: '

foo


[]bar

', michael@0: '

foo



[]bar

', michael@0: '

foo

[]bar', michael@0: 'foo[]bar', michael@0: michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: michael@0: 'foo  []', michael@0: ' [] foo', michael@0: 'foo  []bar', michael@0: 'foo  []bar', michael@0: 'foo  []bar', michael@0: 'foo []bar', michael@0: 'foo []  bar', michael@0: 'foo  [] bar', michael@0: 'foo   []bar', michael@0: 'foo []  bar', michael@0: 'foo  [] bar', michael@0: 'foo   []bar', michael@0: 'foo  []bar', michael@0: 'foo  []bar', michael@0: 'foo  []bar', michael@0: 'foo []bar', michael@0: '

foo

[] bar

', michael@0: michael@0: '
foo  []
', michael@0: '
 [] foo
', michael@0: '
foo  []bar
', michael@0: '
foo  []bar
', michael@0: '
foo  []bar
', michael@0: michael@0: '
foo  []
', michael@0: '
 [] foo
', michael@0: '
foo  []bar
', michael@0: '
foo  []bar
', michael@0: '
foo []bar
', michael@0: michael@0: '
foo  []
', michael@0: '
 [] foo
', michael@0: '
foo  []bar
', michael@0: '
foo  []bar
', michael@0: '
foo []bar
', michael@0: michael@0: '
foo  []
', michael@0: '
 [] foo
', michael@0: '
foo  []bar
', michael@0: '
foo  []bar
', michael@0: '
foo []bar
', michael@0: michael@0: '
foo  []
', michael@0: '
 [] foo
', michael@0: '
foo  []bar
', michael@0: '
foo  []bar
', michael@0: '
foo []bar
', michael@0: michael@0: // Tables with collapsed selection michael@0: 'foo
[]bar
baz', michael@0: 'foo
bar
[]baz', michael@0: '

foo
[]bar

baz', michael@0: '

foo
bar

[]baz', michael@0: '
foo[]bar
', michael@0: '
foo
[]bar
', michael@0: michael@0: 'foo
[]bar
baz', michael@0: 'foo
bar
[]baz', michael@0: '

foo
[]bar

baz', michael@0: '

foo
bar

[]baz', michael@0: '
foo
[]bar
', michael@0: '
foo
[]bar
', michael@0: michael@0: 'foo

[]bar
baz', michael@0: 'foo
bar

[]baz', michael@0: '

foo

[]bar

baz', michael@0: '

foo
bar

[]baz', michael@0: '
foo

[]bar
', michael@0: '
foo

[]bar
', michael@0: michael@0: 'foo


[]bar
baz', michael@0: 'foo
bar
[]baz', michael@0: '
foo
[]bar
', michael@0: '
foo
[]bar
', michael@0: michael@0: // Lists with collapsed selection michael@0: 'foo
  1. []bar
  2. baz
', michael@0: 'foo
  1. []bar
  2. baz
', michael@0: 'foo

  1. []bar
  2. baz
', michael@0: '
  1. foo
  2. []bar
', michael@0: '
  1. foo
  2. []bar
', michael@0: '
  1. foo

  2. []bar
', michael@0: '
  1. foo
  2. []bar
    baz
', michael@0: '
  1. foo
    bar
  2. []baz
', michael@0: michael@0: '
  1. foo

    {}bar
', michael@0: michael@0: '
  1. foo

  2. []bar
', michael@0: '
  1. foo
  2. []bar

', michael@0: '
  1. foo

  2. []bar

', michael@0: michael@0: '
  1. foo
', michael@0: 'foo
    1. []bar
', michael@0: 'foo
  1. []bar
', michael@0: michael@0: 'foo
[]bar
baz
', michael@0: 'foo
[]bar
', michael@0: '
foo
[]bar
', michael@0: '
foo
[]bar
baz
', michael@0: '
foo
bar
[]baz
', michael@0: michael@0: '
  1. foo
[]bar', michael@0: '
  1. foo
[]bar', michael@0: '
  1. foo

[]bar', michael@0: '

[]bar', michael@0: '
  1. foo

[]bar', michael@0: michael@0: '
  1. foo

[]bar', michael@0: '

  1. foo

[]bar', michael@0: '

  1. foo

[]bar', michael@0: '


[]bar', michael@0: '

  1. foo

[]bar', michael@0: michael@0: '

  1. foo
{}
', michael@0: '
  1. foo
{}
', michael@0: '
  1. foo

{}
', michael@0: '

{}
', michael@0: '
  1. foo

{}
', michael@0: michael@0: '
  1. foo

{}
', michael@0: '

  1. foo

{}
', michael@0: '

  1. foo

{}
', michael@0: '


{}
', michael@0: '

  1. foo

{}
', michael@0: michael@0: // Indented stuff with collapsed selection michael@0: 'foo

[]bar
', michael@0: 'foo
[]bar
', michael@0: 'foo
[]bar
', michael@0: 'foo
[]bar
', michael@0: michael@0: 'foo

[]bar

baz

', michael@0: 'foo

[]bar

baz

', michael@0: 'foo

[]bar

baz

', michael@0: michael@0: 'foo

[]bar

baz

', michael@0: 'foo

[]bar

baz

', michael@0: 'foo

[]bar

baz

', michael@0: michael@0: 'foo
  1. []bar

extra', michael@0: 'foo

bar
  1. []baz
quz

extra', michael@0: 'foo

  1. bar
    1. []baz
  2. quz

extra', michael@0: michael@0: // Invisible stuff with collapsed selection michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo
[]bar', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo

[]bar

', michael@0: 'foo

[]bar

', michael@0: 'foo

[]bar

', michael@0: 'foo

[]bar

', michael@0: 'foo

[]bar

', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar
', michael@0: '

foo

[]bar
', michael@0: '

foo

[]bar
', michael@0: '

foo

[]bar
', michael@0: '

foo

[]bar
', michael@0: '

foo

[]bar
', michael@0: '

foo

[]bar
', michael@0: '

foo

[]bar
', michael@0: michael@0: // Styled stuff with collapsed selection michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: michael@0: '

foo

[]bar', michael@0: 'foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: '

foo

[]bar', michael@0: michael@0: // Uncollapsed selection michael@0: 'foo[bar]baz', michael@0: '

foo[bar]baz', michael@0: '

foo{bar}baz', michael@0: '

foo{bar}baz', michael@0: '

[foobar]baz', michael@0: '

{foobar}baz', michael@0: '

foo[barbaz]', michael@0: '

foo{barbaz}', michael@0: '

foo[barbaz]quz', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo{bar}baz', michael@0: 'foo{bar}baz', michael@0: 'foo[bar]baz', michael@0: 'foo{bar}baz', michael@0: 'foo{bar}baz', michael@0: 'foo[barbaz]quz', michael@0: '

foo

[bar]

baz

', michael@0: '

foo

{bar}

baz

', michael@0: '

foo

{bar

}

baz

', michael@0: '

foo

{

bar}

baz

', michael@0: '

foo

{

bar

}

baz

', michael@0: michael@0: '

foo[bar

baz]quz', michael@0: '

foo[bar

baz]quz
', michael@0: '

foo[bar

baz]quz

', michael@0: '
foo[bar

baz]quz', michael@0: '

foo[bar
baz]quz
', michael@0: michael@0: '

foo[bar

baz]quz', michael@0: '

foo[bar

baz]quz', michael@0: '

foo[bar

baz]quz

qozfoo[bar

baz]quz', michael@0: '

foo[bar

baz]quz', michael@0: michael@0: '

foo

[bar

baz]

', michael@0: michael@0: 'foo[
]bar', michael@0: '

foo[

]bar

', michael@0: '

foo[

]bar
baz

', michael@0: 'foo[

]bar

', michael@0: 'foo{

}bar

', michael@0: 'foo[

]bar
baz

', michael@0: 'foo[

]bar

baz', michael@0: 'foo{

bar

}baz', michael@0: 'foo

{bar

}baz', michael@0: 'foo{

bar}

baz', michael@0: '

foo[

]bar', michael@0: '

foo{

}bar', michael@0: '

foo[

]bar
baz', michael@0: '

foo[

]bar

baz

', michael@0: 'foo[

]bar

', michael@0: '

foo[

]bar', michael@0: 'foo[

]bar

baz
', michael@0: 'foo[
]bar

baz

', michael@0: '

foo

bar[
]baz', michael@0: '
foo

bar[

]baz', michael@0: michael@0: '

foo
{

]bar', michael@0: '

foo

{

]bar', michael@0: 'foo
{

]bar

', michael@0: 'foo

{

]bar

', michael@0: '

foo
{

}bar

', michael@0: '

foo

{

}bar

', michael@0: michael@0: '
foo[bar]baz
quzqozqiz
', michael@0: '
fooba[rb]az
quzqozqiz
', michael@0: '
fo[obarb]az
quzqozqiz
', michael@0: '
foobarba[z
q]uzqozqiz
', michael@0: '
[foobarbaz]
quzqozqiz
', michael@0: '
[foobarbaz
quzqozqiz]
', michael@0: '{
foobarbaz
quzqozqiz
}', michael@0: '
fooba[r
bazquz
q]ozqiz
', michael@0: '

fo[o
b]ar

baz', michael@0: '

foo
ba[r

b]az', michael@0: '

fo[o
bar

b]az', michael@0: michael@0: '

foo

  1. ba[r
  2. b]az

quz', michael@0: '

foo

  1. bar
  2. [baz]

quz', michael@0: '

fo[o

  1. b]ar
  2. baz

quz', michael@0: '

foo

  1. bar
  2. ba[z

q]uz', michael@0: '

fo[o

  1. bar
  2. b]az

quz', michael@0: '

fo[o

  1. bar
  2. baz

q]uz', michael@0: michael@0: '

  1. fo[o
  1. b]ar
', michael@0: '
  1. fo[o
', michael@0: michael@0: 'foo[
  1. ]bar
', michael@0: '
  1. foo[
  2. ]bar
', michael@0: 'foo[
]bar
baz
', michael@0: 'foo[
]bar
', michael@0: '
foo[
]bar
', michael@0: '
foo[
]bar
baz
', michael@0: '
foo
bar[
]baz
', michael@0: michael@0: 'foo [ bar]', michael@0: 'foo [ bar]', michael@0: '[foo ] bar', michael@0: '[foo ] bar', michael@0: michael@0: // Do we merge based on element names or the display property? michael@0: '

fo[o

b]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: michael@0: // https://bugs.webkit.org/show_bug.cgi?id=35281 michael@0: // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13976 michael@0: '

  1. foo
{}
  1. bar
', michael@0: '
  1. foo

{}

  1. bar
', michael@0: '
  1. foo

{}

  1. bar
', michael@0: '
  1. foo
{}
  1. bar
', michael@0: '
  1. foo
{}
  1. bar
', michael@0: '
  1. foo
{}
  1. bar
', michael@0: '
  1. foo
{}
  1. bar
', michael@0: // Broken test: http://www.w3.org/Bugs/Public/show_bug.cgi?id=14727 michael@0: '!
    1. foo
  1. {}
    1. bar
', michael@0: '
    1. foo
  1. {}
    1. bar
', michael@0: '
  1. foo[
bar]
  1. baz
', michael@0: '
  1. foo[

bar]

  1. baz
', michael@0: '
  1. foo[

bar]

  1. baz
', michael@0: '
  1. foo[]
  1. bar
', michael@0: '
  1. foo
[bar
  1. ]baz
', michael@0: '
  1. foo

[bar

  1. ]baz
', michael@0: '
  1. foo

[bar

  1. ]baz

', michael@0: '
  1. foo
  1. b[]ar
', michael@0: '
    1. foo[
  1. bar
baz]
  1. quz
', michael@0: '{}
', michael@0: '

{}

', michael@0: '
  1. foo[
  2. bar]
  1. baz
  1. quz
', michael@0: '
  1. foo
{}
', michael@0: '
  1. foo

{}

', michael@0: '{}
  1. bar
', michael@0: '

{}

  1. bar
', michael@0: michael@0: // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13831 michael@0: '

[foo]', michael@0: '

[foo]', michael@0: '

[foo]', michael@0: '

{foo}', michael@0: '

{foo}', michael@0: '

f[]', michael@0: '[foo]', michael@0: '

[foo]
', michael@0: ], michael@0: //@} michael@0: fontname: [ michael@0: //@{ michael@0: 'foo[]bar', michael@0: '

[foo

bar]

', michael@0: '[foo bar]', michael@0: '

[foo

bar

baz]

', michael@0: '

[foo


bar]', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo{}bar', michael@0: 'foo[]bar', michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz]qozquz', michael@0: 'foo[barbaz]qozquz', michael@0: '{

foo

}', michael@0: michael@0: '
foob[a]rbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '{
foobarbaz
}', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo
[bar]
baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: michael@0: 'foob[a]rbaz', michael@0: 'foob[a]rbaz', michael@0: 'foob[a]rbaz', michael@0: 'foo
b[a]r
baz', michael@0: 'foob[a]rbaz', michael@0: 'foob[a]rbaz', michael@0: michael@0: '[foobarbaz]', michael@0: '[foobarbaz]', michael@0: '[foobarbaz]', michael@0: '[foo
bar
baz]', michael@0: '[foobarbaz]', michael@0: '[foobarbaz]', michael@0: michael@0: '[fooba]rbaz', michael@0: '[fooba]rbaz', michael@0: '[fooba]rbaz', michael@0: '[foo
ba]r
baz', michael@0: '[fooba]rbaz', michael@0: '[fooba]rbaz', michael@0: michael@0: 'foob[arbaz]', michael@0: 'foob[arbaz]', michael@0: 'foob[arbaz]', michael@0: 'foo
b[ar
baz]', michael@0: 'foob[arbaz]', michael@0: 'foob[arbaz]', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foob[a]rbaz', michael@0: 'foo[bar]baz', michael@0: 'foob[a]rbaz', michael@0: michael@0: 'fooba[rb]az', michael@0: 'fo[ob]arbaz', michael@0: 'foo{}
bar', michael@0: 'foo{
}bar', michael@0: 'foo{
b]ar', michael@0: michael@0: // Tests for queryCommandIndeterm() and queryCommandState() michael@0: 'fo[ob]arbaz', michael@0: 'fooba[rb]az', michael@0: 'fo[obarb]az', michael@0: 'foo[b]arbaz', michael@0: 'fooba[r]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo{bar}baz', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[o
b]ar
', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: '
fo[o
b]ar', michael@0: 'fo[ob]ar', michael@0: ], michael@0: //@} michael@0: fontsize: [ michael@0: //@{ michael@0: 'foo[]bar', michael@0: '

[foo

bar]

', michael@0: '[foo bar]', michael@0: '

[foo

bar

baz]

', michael@0: '

[foo


bar]', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo{}bar', michael@0: 'foo[]bar', michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz]qozquz', michael@0: 'foo[barbaz]qozquz', michael@0: '{

foo

}', michael@0: michael@0: ["1", 'foo[bar]baz'], michael@0: ["0", 'foo[bar]baz'], michael@0: ["-5", 'foo[bar]baz'], michael@0: ["6", 'foo[bar]baz'], michael@0: ["7", 'foo[bar]baz'], michael@0: ["8", 'foo[bar]baz'], michael@0: ["100", 'foo[bar]baz'], michael@0: ["2em", 'foo[bar]baz'], michael@0: ["20pt", 'foo[bar]baz'], michael@0: ["xx-large", 'foo[bar]baz'], michael@0: [" 1 ", 'foo[bar]baz'], michael@0: ["1.", 'foo[bar]baz'], michael@0: ["1.0", 'foo[bar]baz'], michael@0: ["1.0e2", 'foo[bar]baz'], michael@0: ["1.1", 'foo[bar]baz'], michael@0: ["1.9", 'foo[bar]baz'], michael@0: ["+0", 'foo[bar]baz'], michael@0: ["+1", 'foo[bar]baz'], michael@0: ["+9", 'foo[bar]baz'], michael@0: ["-0", 'foo[bar]baz'], michael@0: ["-1", 'foo[bar]baz'], michael@0: ["-9", 'foo[bar]baz'], michael@0: ["", 'foo[bar]baz'], michael@0: michael@0: '
foob[a]rbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '{
foobarbaz
}', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foob[a]rbaz', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foob[a]rbaz', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: michael@0: '

foo[bar]baz

', michael@0: '

foo[bar]baz

', michael@0: '

foo[bar]baz

', michael@0: '

foo[bar]baz

', michael@0: michael@0: ["3", '

foo[bar]baz

'], michael@0: ["3", '

foo[bar]baz

'], michael@0: ["3", '

foo[bar]baz

'], michael@0: ["3", '

foo[bar]baz

'], michael@0: michael@0: // Minor algorithm bug: this changes the size of the "b" and "r" in michael@0: // "bar" when we pull down styles michael@0: ["3", 'foo b[a]r baz'], michael@0: michael@0: ["3", 'foo[bar]baz'], michael@0: ["3", 'foob[a]rbaz'], michael@0: ["3", 'foo[bar]baz'], michael@0: ["3", 'foob[a]rbaz'], michael@0: michael@0: // Tests for queryCommandIndeterm() and queryCommandState() michael@0: 'fo[ob]arbaz', michael@0: 'fooba[rb]az', michael@0: 'fo[obarb]az', michael@0: 'foo[b]arbaz', michael@0: 'fooba[r]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo{bar}baz', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: michael@0: // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13829 michael@0: ["!6", '[foo]'], michael@0: ["!6", 'foo[bar]baz'], michael@0: ["!6", '[foobarbaz]'], michael@0: ], michael@0: //@} michael@0: forecolor: [ michael@0: //@{ michael@0: 'foo[]bar', michael@0: '

[foo

bar]

', michael@0: '[foo bar]', michael@0: '

[foo

bar

baz]

', michael@0: '

[foo


bar]', michael@0: 'foo[]bar', michael@0: 'foo[]bar', michael@0: 'foo{}bar', michael@0: 'foo[]bar', michael@0: 'foo[bar]baz', michael@0: 'foo[barbaz]qozquz', michael@0: 'foo[barbaz]qozquz', michael@0: '{

foo

}', michael@0: michael@0: ['blue', 'foo[bar]baz'], michael@0: ['f', 'foo[bar]baz'], michael@0: ['#f', 'foo[bar]baz'], michael@0: ['00f', 'foo[bar]baz'], michael@0: ['#00f', 'foo[bar]baz'], michael@0: ['0000ff', 'foo[bar]baz'], michael@0: ['#0000ff', 'foo[bar]baz'], michael@0: ['000000fff', 'foo[bar]baz'], michael@0: ['#000000fff', 'foo[bar]baz'], michael@0: ['rgb(0, 0, 255)', 'foo[bar]baz'], michael@0: ['rgb(0%, 0%, 100%)', 'foo[bar]baz'], michael@0: ['rgb( 0 ,0 ,255)', 'foo[bar]baz'], michael@0: ['rgba(0, 0, 255, 0.0)', 'foo[bar]baz'], michael@0: ['rgb(15, -10, 375)', 'foo[bar]baz'], michael@0: ['rgba(0, 0, 0, 1)', 'foo[bar]baz'], michael@0: ['rgba(255, 255, 255, 1)', 'foo[bar]baz'], michael@0: ['rgba(0, 0, 255, 0.5)', 'foo[bar]baz'], michael@0: ['hsl(240, 100%, 50%)', 'foo[bar]baz'], michael@0: ['cornsilk', 'foo[bar]baz'], michael@0: ['potato quiche', 'foo[bar]baz'], michael@0: ['transparent', 'foo[bar]baz'], michael@0: ['currentColor', 'foo[bar]baz'], michael@0: michael@0: '
foob[a]rbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '{
foobarbaz
}', michael@0: michael@0: 'foo[bar]baz', michael@0: 'foo{bar}baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foob[ar]baz', michael@0: 'fooba[rba]z', michael@0: 'foob[a]rbaz', michael@0: michael@0: ['blue', 'foo[bar]baz'], michael@0: ['#0000ff', 'foo[bar]baz'], michael@0: ['rgb(0,0,255)', 'foo[bar]baz'], michael@0: michael@0: // Tests for queryCommandValue() michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: '[foo]', michael@0: michael@0: // Tests for queryCommandIndeterm() and queryCommandState() michael@0: 'fo[ob]arbaz', michael@0: 'fooba[rb]az', michael@0: 'fo[obarb]az', michael@0: 'foo[b]arbaz', michael@0: 'fooba[r]baz', michael@0: 'foo[bar]baz', michael@0: 'foo[bar]baz', michael@0: 'foo{bar}baz', michael@0: 'fo[ob]ar', michael@0: 'fo[ob]ar', michael@0: ], michael@0: //@} michael@0: formatblock: [ michael@0: //@{ michael@0: 'foo[]bar

extra', michael@0: 'foo{}bar

extra', michael@0: 'foo[]bar

extra', michael@0: 'foo[bar]baz

extra', michael@0: 'foo]bar[baz

extra', michael@0: '{

foo

}', michael@0: 'foo[barbaz]qozquz

extra', michael@0: michael@0: '
foob[a]rbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '
foobarbaz
', michael@0: '{
foobarbaz
}', michael@0: michael@0: '

[foobar]
', michael@0: '

[foobar]

', michael@0: '
[foobar]
', michael@0: '

[foobar]

', michael@0: '

[foobar]

', michael@0: '

[foobar]

', michael@0: '

[foobar]

', michael@0: '
[foobar]
', michael@0: '
[foobar]
', michael@0: '
[foo]
bar
', michael@0: '
foo
[bar]
', michael@0: '
[foo
bar]
', michael@0: '
  1. [foobar]
', michael@0: '', michael@0: '
[foobar]
', michael@0: '
[foobar]
', michael@0: '
[foobar]
', michael@0: '[foobar]', michael@0: '[foobar]', michael@0: '[foobar]', michael@0: '[foobar]', michael@0: michael@0: ['

', 'foo[]bar

extra'], michael@0: ['

', 'foo{}bar

extra'], michael@0: ['

', 'foo[]bar

extra'], michael@0: ['

', 'foo[bar]baz

extra'], michael@0: ['

', 'foo]bar[baz

extra'], michael@0: ['

', '{

foo

}'], michael@0: ['

', 'foo[barbaz]qozquz

extra'], michael@0: michael@0: ['

', '
foob[a]rbaz
'], michael@0: ['

', '
foobarbaz
'], michael@0: ['

', '
foobarbaz
'], michael@0: ['

', '
foobarbaz
'], michael@0: ['

', '
foobarbaz
'], michael@0: ['

', '{
foobarbaz
}'], michael@0: michael@0: ['

', '

[foobar]
'], michael@0: ['

', '

[foobar]

'], michael@0: ['

', '

[foobar]
'], michael@0: ['

', '

[foobar]

'], michael@0: ['

', '

[foobar]

'], michael@0: ['

', '

[foobar]

'], michael@0: ['

', '

[foobar]

'], michael@0: ['

', '

[foobar]
'], michael@0: ['

', '

[foobar]
'], michael@0: ['

', '

[foo]
bar
'], michael@0: ['

', '

foo
[bar]
'], michael@0: ['

', '

[foo
bar]
'], michael@0: ['

', '

  1. [foobar]
'], michael@0: ['

', '

'], michael@0: ['

', '

[foobar]
'], michael@0: ['

', '

[foobar]
'], michael@0: ['

', '

[foobar]'], michael@0: ['

', '

[foobar]'], michael@0: ['

', '

[foobar]
'], michael@0: ['

', '[foobar]'], michael@0: ['

', '[foobar]'], michael@0: ['

', '[foobar]'], michael@0: ['

', '[foobar]'], michael@0: michael@0: ['

', '
[foo]

extra'], michael@0: ['

', '

[foo]

bar

extra'], michael@0: ['

', '[foo]
bar

extra'], michael@0: ['

', '

[foo

bar]

baz'], michael@0: ['

', '
[foo]
'], michael@0: ['
', '

[foo]

'], michael@0: ['
', '

[foo]

bar

baz

'], michael@0: ['
', '
[foo]
'], michael@0: michael@0: ['
', '
[foobar]
'], michael@0: ['
', '
[foobar]
'], michael@0: ['
', '
[foobar]
'], michael@0: ['
', '
[foobar]
'], michael@0: ['', '
[foobar]
'], michael@0: ['
', '
[foobar]
'], michael@0: ['
', '
[foobar]
'], michael@0: ['

', '
[foobar]
'], michael@0: ['

', '
[foobar]
'], michael@0: ['

', '
[foobar]
'], michael@0: ['

', '
[foobar]
'], michael@0: ['

', '
[foobar]
'], michael@0: ['
', '
[foobar]
'], michael@0: ['', '
[foobar]
'], michael@0: ['
  • ', '
    [foobar]
    '], michael@0: ['
      ', '
      [foobar]
      '], michael@0: ['

      ', '

      [foobar]
      '], michael@0: ['
      ', '
      [foobar]
      '], michael@0: ['
        ', '
        [foobar]
        '], michael@0: ['', '
        [foobar]
        '], michael@0: michael@0: ['
        ', '

        [foobar]

        '], michael@0: ['
        ', '

        [foobar]

        '], michael@0: ['