| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <p id="description"></p> | 7 <p id="description"></p> |
| 8 <div id="console"></div> | 8 <div id="console"></div> |
| 9 <script> | 9 <script> |
| 10 description("Test the parsing of the cursor property."); | 10 description("Test the parsing of the cursor property."); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 | 37 |
| 38 // Note that any absolute URL will suffice for these tests (can't use relative U
RLs | 38 // Note that any absolute URL will suffice for these tests (can't use relative U
RLs |
| 39 // since they'll be converted to absolute form in the output). I chose file URL
s just | 39 // since they'll be converted to absolute form in the output). I chose file URL
s just |
| 40 // to avoid triggering any network activity. | 40 // to avoid triggering any network activity. |
| 41 | 41 |
| 42 debug('Test a bunch of cursor rules which should round-trip exactly.'); | 42 debug('Test a bunch of cursor rules which should round-trip exactly.'); |
| 43 testCursorRule('auto'); | 43 testCursorRule('auto'); |
| 44 testCursorRule('none'); | 44 testCursorRule('none'); |
| 45 testCursorRule('copy'); | 45 testCursorRule('copy'); |
| 46 testCursorRule('zoom-in'); |
| 47 testCursorRule('zoom-out'); |
| 46 testCursorRule('-webkit-grabbing'); | 48 testCursorRule('-webkit-grabbing'); |
| 49 testCursorRule('-webkit-zoom-in'); |
| 50 testCursorRule('-webkit-zoom-out'); |
| 47 testCursorRule('url(file:///foo.png), crosshair'); | 51 testCursorRule('url(file:///foo.png), crosshair'); |
| 48 testCursorRule('url(file:///foo.png), url(file:///foo2.png), pointer'); | 52 testCursorRule('url(file:///foo.png), url(file:///foo2.png), pointer'); |
| 49 testCursorRule('url(file:///foo.png) 12 3, pointer'); | 53 testCursorRule('url(file:///foo.png) 12 3, pointer'); |
| 50 testCursorRule('url(file:///foo.png) 0 0, pointer'); | 54 testCursorRule('url(file:///foo.png) 0 0, pointer'); |
| 51 testCursorRule('url(file:///foo.png) 12 3, url(file:///foo2.png), url(file:///fo
o3.png) 6 7, crosshair'); | 55 testCursorRule('url(file:///foo.png) 12 3, url(file:///foo2.png), url(file:///fo
o3.png) 6 7, crosshair'); |
| 52 testCursorRule('url(file:///foo.png) -2 3, pointer'); | 56 testCursorRule('url(file:///foo.png) -2 3, pointer'); |
| 53 testCursorRule('url(file:///foo.png) 2 -3, pointer'); | 57 testCursorRule('url(file:///foo.png) 2 -3, pointer'); |
| 54 testCursorRule('url(file:///foo.png) -1 -1, pointer'); | 58 testCursorRule('url(file:///foo.png) -1 -1, pointer'); |
| 55 | 59 |
| 56 debug(''); | 60 debug(''); |
| 57 debug('Test a bunch of invalid cursor rules which shouldn\'t parse at all.'); | 61 debug('Test a bunch of invalid cursor rules which shouldn\'t parse at all.'); |
| 58 testInvalidCursorRule('nonexistent'); | 62 testInvalidCursorRule('nonexistent'); |
| 59 testInvalidCursorRule('ltr'); | 63 testInvalidCursorRule('ltr'); |
| 60 testInvalidCursorRule('inline'); | 64 testInvalidCursorRule('inline'); |
| 61 testInvalidCursorRule('hand'); | 65 testInvalidCursorRule('hand'); |
| 62 testInvalidCursorRule('url(file:///foo.png)'); | 66 testInvalidCursorRule('url(file:///foo.png)'); |
| 63 testInvalidCursorRule('url(file:///foo.png), url(file:///foo2.png)'); | 67 testInvalidCursorRule('url(file:///foo.png), url(file:///foo2.png)'); |
| 64 testInvalidCursorRule('url(file:///foo.png) 12'); | 68 testInvalidCursorRule('url(file:///foo.png) 12'); |
| 65 testInvalidCursorRule('url(file:///foo.png) 12 3 5'); | 69 testInvalidCursorRule('url(file:///foo.png) 12 3 5'); |
| 66 testInvalidCursorRule('url(file:///foo.png) x y'); | 70 testInvalidCursorRule('url(file:///foo.png) x y'); |
| 67 testInvalidCursorRule('url(file:///foo.png) auto'); | 71 testInvalidCursorRule('url(file:///foo.png) auto'); |
| 68 | 72 |
| 69 successfullyParsed = true; | 73 successfullyParsed = true; |
| 70 </script> | 74 </script> |
| 71 </body> | 75 </body> |
| 72 </html> | 76 </html> |
| OLD | NEW |