Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / hidden-input-enabled.html
blob3e9fb192e6e229348ed347eec497c6db93059f89
1 <head>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
5 </script>
7 <style>
8 #input {
9 color:purple;
12 #input:enabled {
13 color:red;
16 #input:disabled {
17 color:green;
19 </style>
20 </head>
22 <body>
23 <div id="result"></div>
24 <input id="input" type="hidden"></input>
26 <script>
27 var input = document.getElementById("input");
28 var result = document.getElementById("result");
29 if (document.defaultView.getComputedStyle(input, null).color == "rgb(255, 0, 0)")
30 // :enabled
31 result.innerHTML = "PASSED!";
32 else if (document.defaultView.getComputedStyle(input, null).color == "rgb(0, 255, 0)")
33 // :disabled
34 result.innerHTML = "PASSED!";
35 else
36 result.innerHTML = "FAILED! Hidden input types should respond to :enabled and :disabled.";
37 </script>
38 </body>