summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-ui-invalid/button/button-type-barred.html
blob: 3748615427fb1017cb07c8a12fce610121a15665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html class="reftest-wait">
  <!-- Test: if a button has is candidate for constraint validation then change
             its type to be barred from constraint validation, it should not be
             affected by :invalid pseudo-class. -->
  <link rel='stylesheet' type='text/css' href='style.css'>
  <script>
    function onLoadHandler()
    {
      var b = document.getElementById('b');
      b.setCustomValidity('foo');
      b.type = 'button';
      document.documentElement.className='';
    }
  </script>
  <body onload="document.getElementById('b').type='button'; document.documentElement.className='';">
    <button class='notinvalid' type='submit' id='b'></button>
  </body>
</html>