[semantics.html]
  type: testharness
  [[foo=\'bar\' i\] <div foo="BAR"> in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="BAR"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\' i\] <div foo=""> in standards mode]
    expected: FAIL

  [[foo=\'\' i\] <div foo=""> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in both */ <div foo="A\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in both */ <div foo="A\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in both */ <div foo="a\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in both */ <div foo="a\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> in standards mode]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> with querySelector in standards mode]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> in standards mode]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> with querySelector in standards mode]
    expected: FAIL

  [[align=\'left\' i\] <div align="LEFT"> in standards mode]
    expected: FAIL

  [[align=\'left\' i\] <div align="LEFT"> with querySelector in standards mode]
    expected: FAIL

  [[align=\'LEFT\' i\] <div align="left"> in standards mode]
    expected: FAIL

  [[align=\'LEFT\' i\] <div align="left"> with querySelector in standards mode]
    expected: FAIL

  [[class=\'a\' i\] <div class="A"> in standards mode]
    expected: FAIL

  [[class=\'a\' i\] <div class="A"> with querySelector in standards mode]
    expected: FAIL

  [[class=\'A\' i\] <div class="a"> in standards mode]
    expected: FAIL

  [[class=\'A\' i\] <div class="a"> with querySelector in standards mode]
    expected: FAIL

  [[id=\'a\' i\] <div id="A"> in standards mode]
    expected: FAIL

  [[id=\'a\' i\] <div id="A"> with querySelector in standards mode]
    expected: FAIL

  [[id=\'A\' i\] <div id="a"> in standards mode]
    expected: FAIL

  [[id=\'A\' i\] <div id="a"> with querySelector in standards mode]
    expected: FAIL

  [[lang=\'a\' i\] <div lang="A"> in standards mode]
    expected: FAIL

  [[lang=\'a\' i\] <div lang="A"> with querySelector in standards mode]
    expected: FAIL

  [[lang=\'A\' i\] <div lang="a"> in standards mode]
    expected: FAIL

  [[lang=\'A\' i\] <div lang="a"> with querySelector in standards mode]
    expected: FAIL

  [[*|lang=\'a\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in standards mode]
    expected: FAIL

  [[*|lang=\'a\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> with querySelector in standards mode]
    expected: FAIL

  [[*|lang=\'A\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in standards mode]
    expected: FAIL

  [[*|lang=\'A\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> with querySelector in standards mode]
    expected: FAIL

  [@namespace x \'http://www.w3.org/XML/1998/namespace\'; [x|lang=\'A\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\' i\] <div foo="BAR"> in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\' i\] <div foo="BAR"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'BAR\'\][foo=\'bar\' i\] <div foo="BAR"> in standards mode]
    expected: FAIL

  [[foo=\'BAR\'\][foo=\'bar\' i\] <div foo="BAR"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'BAR\'\] <div foo="BAR"> in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'BAR\'\] <div foo="BAR"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\' i\] <div foo="BAR"> in standards mode]
    expected: FAIL

  [[foo=\'\' i\] <div foo="BAR"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\x00\' i\] /* \\0 in selector */ <div foo=""> in standards mode]
    expected: FAIL

  [[foo=\'\x00\' i\] /* \\0 in selector */ <div foo=""> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\' i\] /* \\0 in attribute */ <div foo="\x00"> in standards mode]
    expected: FAIL

  [[foo=\'\' i\] /* \\0 in attribute */ <div foo="\x00"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] <div foo="\xc3\x84"> in standards mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] <div foo="\xc3\x84"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] <div foo="\xc3\xa4"> in standards mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] <div foo="\xc3\xa4"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> in standards mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> in standards mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in standards mode]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb0"> in standards mode]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb0"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb1"> in standards mode]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb1"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb0"> in standards mode]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb0"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb1"> in standards mode]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb1"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="i"> in standards mode]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="i"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="i"> in standards mode]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="i"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="I"> in standards mode]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="I"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="I"> in standards mode]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="I"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> with querySelector in standards mode]
    expected: FAIL

  [[|foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> in standards mode]
    expected: FAIL

  [[|foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div FOO="bar"> in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div FOO="bar"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'\t\' i\] /* tab in selector */ <div foo=" "> in standards mode]
    expected: FAIL

  [[foo=\'\t\' i\] /* tab in selector */ <div foo=" "> with querySelector in standards mode]
    expected: FAIL

  [[foo=\' \' i\] /* tab in attribute */ <div foo="\t"> in standards mode]
    expected: FAIL

  [[foo=\' \' i\] /* tab in attribute */ <div foo="\t"> with querySelector in standards mode]
    expected: FAIL

  [@namespace x \'a\'; [x|foo=\'\' i\] <div {A}foo=""> in standards mode]
    expected: FAIL

  [@namespace x \'A\'; [x|foo=\'\' i\] <div {a}foo=""> in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\'\] <div foo="BAR"> in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\'\] <div foo="BAR"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div baz="BAR"> in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div baz="BAR"> with querySelector in standards mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="BAR"> in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="BAR"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\' i\] <div foo=""> in quirks mode]
    expected: FAIL

  [[foo=\'\' i\] <div foo=""> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in both */ <div foo="A\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in both */ <div foo="A\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in both */ <div foo="a\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in both */ <div foo="a\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> in quirks mode]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> with querySelector in quirks mode]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> in quirks mode]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> with querySelector in quirks mode]
    expected: FAIL

  [[align=\'left\' i\] <div align="LEFT"> in quirks mode]
    expected: FAIL

  [[align=\'left\' i\] <div align="LEFT"> with querySelector in quirks mode]
    expected: FAIL

  [[align=\'LEFT\' i\] <div align="left"> in quirks mode]
    expected: FAIL

  [[align=\'LEFT\' i\] <div align="left"> with querySelector in quirks mode]
    expected: FAIL

  [[class=\'a\' i\] <div class="A"> in quirks mode]
    expected: FAIL

  [[class=\'a\' i\] <div class="A"> with querySelector in quirks mode]
    expected: FAIL

  [[class=\'A\' i\] <div class="a"> in quirks mode]
    expected: FAIL

  [[class=\'A\' i\] <div class="a"> with querySelector in quirks mode]
    expected: FAIL

  [[id=\'a\' i\] <div id="A"> in quirks mode]
    expected: FAIL

  [[id=\'a\' i\] <div id="A"> with querySelector in quirks mode]
    expected: FAIL

  [[id=\'A\' i\] <div id="a"> in quirks mode]
    expected: FAIL

  [[id=\'A\' i\] <div id="a"> with querySelector in quirks mode]
    expected: FAIL

  [[lang=\'a\' i\] <div lang="A"> in quirks mode]
    expected: FAIL

  [[lang=\'a\' i\] <div lang="A"> with querySelector in quirks mode]
    expected: FAIL

  [[lang=\'A\' i\] <div lang="a"> in quirks mode]
    expected: FAIL

  [[lang=\'A\' i\] <div lang="a"> with querySelector in quirks mode]
    expected: FAIL

  [[*|lang=\'a\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in quirks mode]
    expected: FAIL

  [[*|lang=\'a\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> with querySelector in quirks mode]
    expected: FAIL

  [[*|lang=\'A\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in quirks mode]
    expected: FAIL

  [[*|lang=\'A\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> with querySelector in quirks mode]
    expected: FAIL

  [@namespace x \'http://www.w3.org/XML/1998/namespace\'; [x|lang=\'A\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\' i\] <div foo="BAR"> in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\' i\] <div foo="BAR"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'BAR\'\][foo=\'bar\' i\] <div foo="BAR"> in quirks mode]
    expected: FAIL

  [[foo=\'BAR\'\][foo=\'bar\' i\] <div foo="BAR"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'BAR\'\] <div foo="BAR"> in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'BAR\'\] <div foo="BAR"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\' i\] <div foo="BAR"> in quirks mode]
    expected: FAIL

  [[foo=\'\' i\] <div foo="BAR"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\x00\' i\] /* \\0 in selector */ <div foo=""> in quirks mode]
    expected: FAIL

  [[foo=\'\x00\' i\] /* \\0 in selector */ <div foo=""> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\' i\] /* \\0 in attribute */ <div foo="\x00"> in quirks mode]
    expected: FAIL

  [[foo=\'\' i\] /* \\0 in attribute */ <div foo="\x00"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] <div foo="\xc3\x84"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] <div foo="\xc3\x84"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] <div foo="\xc3\xa4"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] <div foo="\xc3\xa4"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> in quirks mode]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> in quirks mode]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in quirks mode]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb0"> in quirks mode]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb0"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb1"> in quirks mode]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb1"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb0"> in quirks mode]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb0"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb1"> in quirks mode]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb1"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="i"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="i"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="i"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="i"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="I"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="I"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="I"> in quirks mode]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="I"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> with querySelector in quirks mode]
    expected: FAIL

  [[|foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> in quirks mode]
    expected: FAIL

  [[|foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div FOO="bar"> in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div FOO="bar"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'\t\' i\] /* tab in selector */ <div foo=" "> in quirks mode]
    expected: FAIL

  [[foo=\'\t\' i\] /* tab in selector */ <div foo=" "> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\' \' i\] /* tab in attribute */ <div foo="\t"> in quirks mode]
    expected: FAIL

  [[foo=\' \' i\] /* tab in attribute */ <div foo="\t"> with querySelector in quirks mode]
    expected: FAIL

  [@namespace x \'a\'; [x|foo=\'\' i\] <div {A}foo=""> in quirks mode]
    expected: FAIL

  [@namespace x \'A\'; [x|foo=\'\' i\] <div {a}foo=""> in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\'\] <div foo="BAR"> in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\'\] <div foo="BAR"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div baz="BAR"> in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div baz="BAR"> with querySelector in quirks mode]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="BAR"> in XML]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="BAR"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\' i\] <div foo=""> in XML]
    expected: FAIL

  [[foo=\'\' i\] <div foo=""> with querySelector in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in both */ <div foo="A\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in both */ <div foo="A\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in both */ <div foo="a\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in both */ <div foo="a\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> in XML]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> with querySelector in XML]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> in XML]
    expected: FAIL

  [[*|foo=\'bar\' i\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> with querySelector in XML]
    expected: FAIL

  [[align=\'left\' i\] <div align="LEFT"> in XML]
    expected: FAIL

  [[align=\'left\' i\] <div align="LEFT"> with querySelector in XML]
    expected: FAIL

  [[align=\'LEFT\' i\] <div align="left"> in XML]
    expected: FAIL

  [[align=\'LEFT\' i\] <div align="left"> with querySelector in XML]
    expected: FAIL

  [[class=\'a\' i\] <div class="A"> in XML]
    expected: FAIL

  [[class=\'a\' i\] <div class="A"> with querySelector in XML]
    expected: FAIL

  [[class=\'A\' i\] <div class="a"> in XML]
    expected: FAIL

  [[class=\'A\' i\] <div class="a"> with querySelector in XML]
    expected: FAIL

  [[id=\'a\' i\] <div id="A"> in XML]
    expected: FAIL

  [[id=\'a\' i\] <div id="A"> with querySelector in XML]
    expected: FAIL

  [[id=\'A\' i\] <div id="a"> in XML]
    expected: FAIL

  [[id=\'A\' i\] <div id="a"> with querySelector in XML]
    expected: FAIL

  [[lang=\'a\' i\] <div lang="A"> in XML]
    expected: FAIL

  [[lang=\'a\' i\] <div lang="A"> with querySelector in XML]
    expected: FAIL

  [[lang=\'A\' i\] <div lang="a"> in XML]
    expected: FAIL

  [[lang=\'A\' i\] <div lang="a"> with querySelector in XML]
    expected: FAIL

  [[*|lang=\'a\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in XML]
    expected: FAIL

  [[*|lang=\'a\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> with querySelector in XML]
    expected: FAIL

  [[*|lang=\'A\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in XML]
    expected: FAIL

  [[*|lang=\'A\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> with querySelector in XML]
    expected: FAIL

  [@namespace x \'http://www.w3.org/XML/1998/namespace\'; [x|lang=\'A\' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in XML]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\' i\] <div foo="BAR"> in XML]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\' i\] <div foo="BAR"> with querySelector in XML]
    expected: FAIL

  [[foo=\'BAR\'\][foo=\'bar\' i\] <div foo="BAR"> in XML]
    expected: FAIL

  [[foo=\'BAR\'\][foo=\'bar\' i\] <div foo="BAR"> with querySelector in XML]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'BAR\'\] <div foo="BAR"> in XML]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'BAR\'\] <div foo="BAR"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\' i\] <div foo="BAR"> in XML]
    expected: FAIL

  [[foo=\'\' i\] <div foo="BAR"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\x00\' i\] /* \\0 in selector */ <div foo=""> in XML]
    expected: FAIL

  [[foo=\'\x00\' i\] /* \\0 in selector */ <div foo=""> with querySelector in XML]
    expected: FAIL

  [[foo=\'\' i\] /* \\0 in attribute */ <div foo="\x00"> in XML]
    expected: FAIL

  [[foo=\'\' i\] /* \\0 in attribute */ <div foo="\x00"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] <div foo="\xc3\x84"> in XML]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] <div foo="\xc3\x84"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] <div foo="\xc3\xa4"> in XML]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] <div foo="\xc3\xa4"> with querySelector in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> with querySelector in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> with querySelector in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\x84"> with querySelector in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="\xc3\xa4"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'\xc3\xa4\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'\xc3\x84\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> with querySelector in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> in XML]
    expected: FAIL

  [[foo=\'a\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> with querySelector in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="a"> with querySelector in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> in XML]
    expected: FAIL

  [[foo=\'A\xcc\x88\' i\] /* COMBINING in selector */ <div foo="A"> with querySelector in XML]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="a\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'a\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> in XML]
    expected: FAIL

  [[foo=\'A\' i\] /* COMBINING in attribute */ <div foo="A\xcc\x88"> with querySelector in XML]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb0"> in XML]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb0"> with querySelector in XML]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb1"> in XML]
    expected: FAIL

  [[foo=\'i\' i\] <div foo="\xc4\xb1"> with querySelector in XML]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb0"> in XML]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb0"> with querySelector in XML]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb1"> in XML]
    expected: FAIL

  [[foo=\'I\' i\] <div foo="\xc4\xb1"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="i"> in XML]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="i"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="i"> in XML]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="i"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="I"> in XML]
    expected: FAIL

  [[foo=\'\xc4\xb0\' i\] <div foo="I"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="I"> in XML]
    expected: FAIL

  [[foo=\'\xc4\xb1\' i\] <div foo="I"> with querySelector in XML]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> in XML]
    expected: FAIL

  [[foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> with querySelector in XML]
    expected: FAIL

  [[|foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> in XML]
    expected: FAIL

  [[|foo=\'bar\' i\] <div foo="x" {a}foo="BAR"> with querySelector in XML]
    expected: FAIL

  [[foo=\'bar\' i\] <div FOO="bar"> in XML]
    expected: FAIL

  [[foo=\'bar\' i\] <div FOO="bar"> with querySelector in XML]
    expected: FAIL

  [[foo=\'\t\' i\] /* tab in selector */ <div foo=" "> in XML]
    expected: FAIL

  [[foo=\'\t\' i\] /* tab in selector */ <div foo=" "> with querySelector in XML]
    expected: FAIL

  [[foo=\' \' i\] /* tab in attribute */ <div foo="\t"> in XML]
    expected: FAIL

  [[foo=\' \' i\] /* tab in attribute */ <div foo="\t"> with querySelector in XML]
    expected: FAIL

  [@namespace x \'a\'; [x|foo=\'\' i\] <div {A}foo=""> in XML]
    expected: FAIL

  [@namespace x \'A\'; [x|foo=\'\' i\] <div {a}foo=""> in XML]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\'\] <div foo="BAR"> in XML]
    expected: FAIL

  [[foo=\'bar\' i\][foo=\'bar\'\] <div foo="BAR"> with querySelector in XML]
    expected: FAIL

  [[foo=\'bar\' i\] <div baz="BAR"> in XML]
    expected: FAIL

  [[foo=\'bar\' i\] <div baz="BAR"> with querySelector in XML]
    expected: FAIL

