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

Side by Side Diff: LayoutTests/fast/events/event-sender-mouseleave.html

Issue 930803002: Add test case for mouseleave events within window bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | LayoutTests/fast/events/event-sender-mouseleave-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 #testBox {
4 background: blue;
5 top: 100px;
6 left: 100px;
7 width: 100px;
8 height: 100px;
9 position: absolute;
10 }
11 </style>
12 <div id="testBox">
13 </div>
14 <p id="description">
15 </p>
16 <script src="../../resources/js-test.js"></script>
17 <script>
18 window.jsTestIsAsync = true;
19
20 description('Test that a mouse leave event is triggered.');
Rick Byers 2015/03/06 16:05:37 nit add: "when the OS tells us the mouse has left
Miyoung Shin(g) 2015/03/09 15:47:27 Done.
21 var hasMouseLeave = false;
22 var hasMouseOut = false;
23 var box = document.getElementById('testBox');
24 box.addEventListener('mouseleave', function () {
25 hasMouseLeave = true;
Rick Byers 2015/03/06 16:05:37 please verify here (and below if you like) that th
Miyoung Shin(g) 2015/03/09 15:47:27 Done. Thank you for your comment.
26 });
27 box.addEventListener('mouseout', function () {
28 hasMouseOut = true;
29 });
30 if (window.testRunner) {
31 eventSender.mouseMoveTo(1, 1);
32 eventSender.mouseMoveTo(box.offsetLeft + 10, box.offsetTop + 10);
33 eventSender.mouseLeave();
34 shouldBeTrue('hasMouseLeave');
35 shouldBeTrue('hasMouseOut');
36 finishJSTest();
37 }
38 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/event-sender-mouseleave-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698