Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 3 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-ui/parsing/cursor-computed.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: getComputedStyle().cursor</title>
<meta name="assert" content="cursor computed value is as specified for keywords.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("cursor", "auto");
test_computed_value("cursor", "default");
test_computed_value("cursor", "none");
test_computed_value("cursor", "context-menu");
test_computed_value("cursor", "help");
test_computed_value("cursor", "pointer");
test_computed_value("cursor", "progress");
test_computed_value("cursor", "wait");
test_computed_value("cursor", "cell");
test_computed_value("cursor", "crosshair");
test_computed_value("cursor", "text");
test_computed_value("cursor", "vertical-text");
test_computed_value("cursor", "alias");
test_computed_value("cursor", "copy");
test_computed_value("cursor", "move");
test_computed_value("cursor", "no-drop");
test_computed_value("cursor", "not-allowed");
test_computed_value("cursor", "grab");
test_computed_value("cursor", "grabbing");
test_computed_value("cursor", "e-resize");
test_computed_value("cursor", "n-resize");
test_computed_value("cursor", "ne-resize");
test_computed_value("cursor", "nw-resize");
test_computed_value("cursor", "s-resize");
test_computed_value("cursor", "se-resize");
test_computed_value("cursor", "sw-resize");
test_computed_value("cursor", "w-resize");
test_computed_value("cursor", "ew-resize");
test_computed_value("cursor", "ns-resize");
test_computed_value("cursor", "nesw-resize");
test_computed_value("cursor", "nwse-resize");
test_computed_value("cursor", "col-resize");
test_computed_value("cursor", "row-resize");
test_computed_value("cursor", "all-scroll");
test_computed_value("cursor", "zoom-in");
test_computed_value("cursor", "zoom-out");
test_computed_value("cursor", "linear-gradient(200grad, red 10%, blue calc(75% - 2px)), auto", "linear-gradient(rgb(255, 0, 0) 10%, rgb(0, 0, 255) calc(75% - 2px), auto");
test_computed_value("cursor", "radial-gradient(farthest-side at calc(5px + 10%), red, blue), pointer", "radial-gradient(farthest-side at calc(10% + 5px) 50%, rgb(255, 0, 0), rgb(0, 0, 255)), pointer");
test_computed_value("cursor", "conic-gradient(from 3.1416rad at 20% 20%, red, blue), crosshair", "conic-gradient(from 180deg at 20% 20%, rgb(255, 0, 0), rgb(0, 0, 255), pointer");
// Not yet tested: // [ [<url> [<x> <y>]?,]*
// "relative URLs converted to absolute"
</script>
</body>
</html>