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

Side by Side Diff: LayoutTests/fast/css/cursor-parsing-quirks.html

Issue 23816008: Drop CSS cursor quirk for missing fallback cursor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added default pointer fallback to cursor rule in http test Created 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../js/resources/js-test-pre.js"></script>
4 </head>
5 <body>
6 <p id="description"></p>
7 <div id="console"></div>
8 <script>
9 description("Test the parsing of the cursor property in quirks mode.");
10 function makeCursorRule(rule)
11 {
12 return "cursor: " + rule + ";";
13 }
14
15 function testCursorRule(rule, expected)
16 {
17 var cssText = makeCursorRule(rule);
18 if (typeof expected == 'undefined')
19 expected = cssText;
20 else
21 expected = makeCursorRule(expected);
22 shouldBeEqualToString('roundtripCssRule("' + cssText + '")', expected);
23 }
24
25 function testInvalidCursorRule(rule)
26 {
27 shouldBeEqualToString('roundtripCssRule("' + makeCursorRule(rule) + '")', '' );
28 }
29
30 function roundtripCssRule(cssText)
31 {
32 var div = document.createElement("div");
33 div.setAttribute("style", cssText);
34 document.body.appendChild(div);
35 var result = div.style.cssText;
36 document.body.removeChild(div);
37 return result;
38 }
39
40 debug('Test cursor rules which should accept \'hand\' as an alias of \'pointer\' .');
41 testCursorRule('hand', 'pointer');
42 testCursorRule('url(file:///foo.png), hand', 'url(file:///foo.png), pointer');
43
44 debug('');
45 debug('Test invalid cursor rules which shouldn\'t parse at all.');
46 testInvalidCursorRule('url(file:///foo.png), url(file:///foo2.png)');
47
48 successfullyParsed = true;
49 </script>
50 <script src="../js/resources/js-test-post.js"></script>
51 </body>
52 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/cursor-parsing-expected.txt ('k') | LayoutTests/fast/css/cursor-parsing-quirks-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698