Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-cursor.html

Issue 2314293003: Added a test for custom cursor coordinates, which already works (Closed)
Patch Set: Added more keywords to test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-cursor.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-cursor.html b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-cursor.html
new file mode 100644
index 0000000000000000000000000000000000000000..71927b6789e70b44f4c59ec14e583e65d681f627
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-cursor.html
@@ -0,0 +1,63 @@
+<!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>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698