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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/domactivate-sets-underlying-click-event-as-handled.html

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 To test manually, click on all the form elements (except the textbox) and the de tails/summary 2 To test manually, click on all the form elements (except the textbox) and the de tails/summary
3 element. The anchor shouldn't be activated (i.e. you shouldn't see any "anchor a ctivated" messages). 3 element. The anchor shouldn't be activated (i.e. you shouldn't see any "anchor a ctivated" messages).
4 <a href="javascript:anchorActivated()"> 4 <a href="javascript:anchorActivated()">
5 <form action="javascript:formSubmitted()"> 5 <form action="javascript:formSubmitted()">
6 <input type=text> 6 <input type=text>
7 <input type=submit> 7 <input type=submit>
8 <input src="resources/abe.png" type=image> 8 <input src="resources/abe.png" type=image>
9 <button>button</button> 9 <button>button</button>
10 <input type=reset> 10 <input type=reset>
(...skipping 26 matching lines...) Expand all
37 element.addEventListener("click", function () { 37 element.addEventListener("click", function () {
38 log("Activated " + this + " type=" + this.type); 38 log("Activated " + this + " type=" + this.type);
39 }, false); 39 }, false);
40 40
41 if (!window.eventSender) 41 if (!window.eventSender)
42 continue; 42 continue;
43 43
44 if (element.type == "text") { 44 if (element.type == "text") {
45 log("Focusing " + element + " type=" + element.type + " and pressing enter"); 45 log("Focusing " + element + " type=" + element.type + " and pressing enter");
46 element.focus(); 46 element.focus();
47 eventSender.keyDown("\n"); 47 eventSender.keyDown("Enter");
48 continue; 48 continue;
49 } 49 }
50 50
51 eventSender.mouseMoveTo(element.offsetLeft + element.clientWidth / 2, el ement.offsetTop + element.clientHeight / 2); 51 eventSender.mouseMoveTo(element.offsetLeft + element.clientWidth / 2, el ement.offsetTop + element.clientHeight / 2);
52 eventSender.mouseDown(); 52 eventSender.mouseDown();
53 eventSender.mouseUp(); 53 eventSender.mouseUp();
54 54
55 if (element.type == "radio" || element.type == "checkbox") 55 if (element.type == "radio" || element.type == "checkbox")
56 continue; 56 continue;
57 57
58 log("Focusing " + element + " type=" + element.type + " and pressing ent er"); 58 log("Focusing " + element + " type=" + element.type + " and pressing ent er");
59 element.focus(); 59 element.focus();
60 eventSender.keyDown("\n"); 60 eventSender.keyDown("Enter");
61 } 61 }
62 62
63 if (window.eventSender) { 63 if (window.eventSender) {
64 var details = document.querySelector("details"); 64 var details = document.querySelector("details");
65 eventSender.mouseMoveTo(details.offsetLeft + details.clientWidth / 2, de tails.offsetTop + details.clientHeight / 2); 65 eventSender.mouseMoveTo(details.offsetLeft + details.clientWidth / 2, de tails.offsetTop + details.clientHeight / 2);
66 eventSender.mouseDown(); 66 eventSender.mouseDown();
67 eventSender.mouseUp(); 67 eventSender.mouseUp();
68 log("\nThe details element was " + (details.open ? "" : "not ") + "opene d"); 68 log("\nThe details element was " + (details.open ? "" : "not ") + "opene d");
69 } 69 }
70 70
71 if (window.testRunner) 71 if (window.testRunner)
72 document.querySelector("a").style.display = "none"; 72 document.querySelector("a").style.display = "none";
73 }); 73 });
74 </script> 74 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698