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

Side by Side Diff: chrome/test/data/mouseleave.html

Issue 891213002: Add a test for the mouseleave event on window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 body { 4 body {
5 margin: 0px; 5 margin: 0px;
6 padding: 0px; 6 padding: 0px;
7 } 7 }
8 #mybox { 8 #mybox {
9 padding: 20px; 9 padding: 20px;
10 margin: 0px; 10 margin: 0px;
11 border: 1px solid #000; 11 border: 1px solid #000;
12 } 12 }
13 #mystatus { 13 #mystatus {
14 border: 1px solid #000; 14 border: 1px solid #000;
15 padding: 20px; 15 padding: 20px;
16 margin: 0px; 16 margin: 0px;
17 } 17 }
18 </style> 18 </style>
19 <script> 19 <script>
20 var state = ''; 20 var state = '';
21 var hasLeave = false;
21 function load() { 22 function load() {
22 state = 'initial'; 23 state = 'initial';
23 document.getElementById("mystatus").innerHTML = state; 24 document.getElementById("mystatus").innerHTML = state;
24 document.title = "onload"; 25 document.title = "onload";
25 } 26 }
26 function enter() { 27 function enter() {
27 state += ',entered'; 28 state += ',entered';
28 document.getElementById("mystatus").innerHTML = state; 29 document.getElementById("mystatus").innerHTML = state;
29 document.title = "entered"; 30 document.title = "entered";
30 } 31 }
31 function leave() { 32 function leave() {
33 hasLeave = true;
32 state += ',left'; 34 state += ',left';
33 document.getElementById("mystatus").innerHTML = state; 35 document.getElementById("mystatus").innerHTML = state;
34 document.title = "left"; 36 document.title = "left";
35 } 37 }
38 function done() {
39 state += ',done';
40 document.getElementById("mystatus").innerHTML = state;
41 document.title = hasLeave ? "with mouseleave" : "without mouseleave";
42 }
36 </script> 43 </script>
37 </head> 44 </head>
38 <body onload="load()"> 45 <body onload="load()">
39 <div id="mybox" onmouseover="enter()" onmouseout="leave()"></div> 46 <div id="mybox" onmouseover="enter()" onmouseout="leave()"></div>
40 <div id="mystatus"></div> 47 <div id="mystatus"></div>
41 </body> 48 </body>
42 </html> 49 </html>
OLDNEW
« no previous file with comments | « chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698