Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / mouse-cursor-change-after-layout.html
blobe3627a51da6dda5ea8c1a54d6d7aa853d33625c8
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script src="resources/expect-cursor-update.js"></script>
4 <style type="text/css">
5 #test-container {
6 position: relative;
7 padding: 10px;
9 #target {
10 cursor: text;
11 background-color: blue;
12 width: 100px;
13 height: 100px;
15 #overlay {
16 cursor: wait;
17 width: 200px;
18 height: 200px;
19 background: rgba(255,0,0,0.2);
20 position: absolute;
21 left: 0;
22 top: 0;
24 </style>
25 <p id="description"></p>
26 <p><a href="http://crbug.com/26723">Bug 26723</a></p>
27 <div id="test-container">
28 <div id="target"></div>
29 </div>
30 <br/>
31 <div id="console"></div>
32 <script>
33 description("Test that mouse cursors are changed correctly after layout.");
35 // Ensure the shouldBe calls don't trigger layouts during our testing.
36 setPrintTestResultsLazily();
38 if (window.testRunner) {
39 testRunner.dumpAsText();
40 testRunner.waitUntilDone();
41 window.jsTestIsAsync = true;
44 var overlay;
45 function addOverlay() {
46 var testContainer = document.getElementById('test-container');
47 overlay = document.createElement('div');
48 overlay.id='overlay';
49 testContainer.appendChild(overlay);
52 // Can't do anything useful here without eventSender
53 if (window.eventSender) {
54 var target = document.getElementById('target');
55 eventSender.dragMode = false;
56 debug('Mouse move');
57 var rect = target.getBoundingClientRect();
58 eventSender.mouseMoveTo(rect.left + 3, rect.top + 3);
59 shouldBeEqualToString('window.internals.getCurrentCursorInfo()', 'type=IBeam hotSpot=0,0');
60 debug('Adding overlay element');
61 addOverlay();
62 expectCursorUpdate('type=Wait hotSpot=0,0', function() {
63 debug('Moving overlay element');
64 overlay.style.top = "100px";
65 expectCursorUpdate('type=IBeam hotSpot=0,0', function() {
66 finishJSTest();
67 });
68 });
69 } else {
70 testFailed('This test requires DumpRenderTree. Click to manually update layout.');
71 document.addEventListener('click', addOverlay);
74 </script>