| <!DOCTYPE html> |
| <script src="../../../resources/testharness.js"></script> |
| <script src="../../../resources/testharnessreport.js"></script> |
| <div id="element"></div> |
| <script> |
| // Tests a bunch of cursor values come out of ComputedStyle the same as they are |
| // put in. |
| var cursor_values = [ |
| 'auto', |
| 'default', |
| 'none', |
| 'context-menu', |
| 'help', |
| 'pointer', |
| 'progress', |
| 'wait', |
| 'cell', |
| 'crosshair', |
| 'text', |
| 'vertical-text', |
| 'alias', |
| 'copy', |
| 'move', |
| 'no-drop', |
| 'not-allowed', |
| 'e-resize', |
| 'n-resize', |
| 'ne-resize', |
| 'nw-resize', |
| 's-resize', |
| 'se-resize', |
| 'sw-resize', |
| 'w-resize', |
| 'ew-resize', |
| 'ns-resize', |
| 'nesw-resize', |
| 'nwse-resize', |
| 'col-resize', |
| 'row-resize', |
| 'all-scroll', |
| 'zoom-in', |
| 'zoom-out', |
| 'url("file:///foo.png"), crosshair', |
| 'url("file:///foo.png"), url("file:///foo2.png"), pointer', |
| 'url("file:///foo.png") 12 3, pointer', |
| 'url("file:///foo.png") 0 0, pointer', 'url("file:///foo.png") 0 0, pointer', |
| 'url("file:///foo.png") 12 3, url("file:///foo2.png"), url("file:///foo3.png") 6 7, crosshair', |
| 'url("file:///foo.png") -2 3, pointer', |
| 'url("file:///foo.png") 2 -3, pointer', |
| 'url("file:///foo.png") -1 -1, pointer', |
| 'url("file:///foo.png") 10 10, auto', // Tests crbug.com/610635 |
| // Not supported -- these currently return zoom-out. |
| //'grab', |
| //'grabbing', |
| ] |
| for (i in cursor_values) { |
| cursor_value = cursor_values[i]; |
| test(function() { |
| element.style.cursor = cursor_value; |
| assert_equals(getComputedStyle(element).cursor, cursor_value); |
| }, "Tests that the cursor value '" + cursor_value + "' is saved correctly in the ComputedStyle."); |
| } |
| </script> |