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

Side by Side Diff: LayoutTests/fast/events/mouseenter-mouseleave-inline-attributes.html

Issue 18836002: Implement 'mouseenter' and 'mouseleave' from DOM Level 3 Events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Attribute tests. Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 <script>
6 window.jsTestIsAsync = true;
7
8 document.addEventListener('DOMContentLoaded', function () {
9 if (window.testRunner) {
10 eventSender.mouseMoveTo(1, 1);
11 eventSender.mouseMoveTo(90,140);
12 debug("// Entering #outer");
13 eventSender.mouseMoveTo(110,140);
14 debug("// Entering #inner1");
15 eventSender.mouseMoveTo(130,140);
16 debug("// Entering #inner3 (and therefore also #inner2)");
17 eventSender.mouseMoveTo(170,140);
18 debug("// Leaving #inner3 and #inner2, but not #outer");
19 eventSender.mouseMoveTo(180,140);
20 debug("// Leaving #outer");
21 eventSender.mouseMoveTo(210,140);
22 }
23
24 finishJSTest();
25 });
26
27 function handleEvent(e) {
28 var phases = ['', 'capturing', 'at target', 'bubbling'];
29 var target = e.target ? e.target : e.srcElement;
30 if (target.id && target.id != "console") {
31 debug(e.type + " (" + phases[e.eventPhase] + ") on " + target.id );
32 if (e.relatedTarget && e.relatedTarget.id)
33 debug('- Related target: ' + e.relatedTarget.id);
34 }
35
36 }
37 </script>
38 <script src="../js/resources/js-test-post.js"></script>
39
40 <style>
41 #outer {
42 background: blue;
43 height: 100px;
44 left: 100px;
45 position: absolute;
46 top: 100px;
47 width: 100px;
48 }
49
50 #inner1 {
51 background: red;
52 height: 50px;
53 left: 20px;
54 position: absolute;
55 top: 20px;
56 width: 50px;
57 }
58
59 #inner2 {
60 background: yellow;
61 height: 20px;
62 left: 60px;
63 position: absolute;
64 top: 30px;
65 width: 20px;
66 }
67
68 #inner3 {
69 background-color: green;
70 height: 10px;
71 margin: 5px;
72 width: 10px;
73 }
74 </style>
75 </head>
76 <body>
77 <div id="outer" onmouseenter="handleEvent(event)" onmouseleave="handleEvent( event)" onmouseover="handleEvent(event)" onmouseout="handleEvent(event)">
78 <div id="inner1" onmouseenter="handleEvent(event)" onmouseleave="handleE vent(event)" onmouseover="handleEvent(event)" onmouseout="handleEvent(event)"></ div>
79 <div id="inner2" onmouseenter="handleEvent(event)" onmouseleave="handleE vent(event)" onmouseover="handleEvent(event)" onmouseout="handleEvent(event)">
80 <div id="inner3" onmouseenter="handleEvent(event)" onmouseleave="han dleEvent(event)" onmouseover="handleEvent(event)" onmouseout="handleEvent(event) "></div>
81 </div>
82 </div>
83 </body>
84 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698