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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/layout-change-should-fire-mouseover.html

Issue 2956023004: Add a flag to update hover effect when a layout is changed (Closed)
Patch Set: Remove pause in test Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/mouse-cursor-change-after-layout.html » ('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 <script src='../../resources/testharness.js'></script>
3 <script src='../../resources/testharnessreport.js'></script>
4 <style type="text/css">
5 #blue {
6 background-color: rgb(0, 0, 255);
7 position: absolute;
8 left: 75px;
9 top: 75px;
10 height: 100px;
11 width: 100px;
12 }
13 #blue:hover {
14 background-color: rgb(255, 255, 0);
15 }
16 </style>
17
18 <body onload="loaded();">
19
20 <script type="text/javascript">
21 var eventList = [];
22 var x = 100;
23 var y = 100;
24
25 function addBlue() {
26 document.body.innerHTML += '<div id="blue"></div>';
27 var blue = document.getElementById("blue");
28 var events = ['mouseover', 'mousemove', 'mouseout', 'mouseenter', 'mouseleav e'];
29 events.forEach(function (event) {
30 blue.addEventListener(event, validMouseEventsResult);
31 });
32 }
33
34 function loaded() {
35 document.addEventListener('click', addBlue);
36 }
37
38 function validMouseEventsResult(event) {
39 eventList.push(event.type);
40 testMouseOver.step(function () {
41 assert_equals(event.target.id, "blue");
42 assert_equals(getComputedStyle(event.target).backgroundColor, "rgb(255, 255, 0)");
43 if (event.type == "mouseenter") {
44 var result = eventList.join();
45 assert_true(result == 'mouseover,mouseenter');
46 testMouseOver.done();
47 }
48 });
49
50 }
51
52 function testMouseOverAddElement() {
53 if (window.chrome && chrome.gpuBenchmarking) {
54 var pointerActions =
55 [{source: "mouse",
56 actions: [
57 { name: "pointerDown", x: x, y: y },
58 { name: "pointerUp" }]}];
59 chrome.gpuBenchmarking.pointerActionSequence(pointerActions);
60 }
61 }
62
63 var testMouseOver = async_test('Tests that the mouseover event is fired and the element has a hover effect when the element underneath the mouse cursor is chang ed.');
64 testMouseOverAddElement();
65
66 </script>
67 </body>
68
69
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/mouse-cursor-change-after-layout.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698