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

Side by Side Diff: LayoutTests/inspector-protocol/input/dispatchMouseEvent.html

Issue 391413003: DevTools: [Timeline] extract common infrastructure from tracing tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: syntax error was fixed Created 6 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script> 4 <script>
5 5
6 function addListeners() 6 function addListeners()
7 { 7 {
8 window.addEventListener("mousedown", logEvent); 8 window.addEventListener("mousedown", logEvent);
9 window.addEventListener("mouseup", logEvent); 9 window.addEventListener("mouseup", logEvent);
10 window.addEventListener("mousemove", logEvent); 10 window.addEventListener("mousemove", logEvent);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 }, 55 },
56 { 56 {
57 "type": "mouseReleased", 57 "type": "mouseReleased",
58 "button": "right", 58 "button": "right",
59 "clickCount": 1, 59 "clickCount": 1,
60 "x": 100, 60 "x": 100,
61 "y": 200 61 "y": 200
62 } 62 }
63 ]; 63 ];
64 64
65 InspectorTest.executeInPage("addListeners();", function() { 65 InspectorTest.evaluateInPage("addListeners();", function() {
66 for (var i = 0; i < events.length; i++) 66 for (var i = 0; i < events.length; i++)
67 InspectorTest.sendCommand("Input.dispatchMouseEvent", events[i], che ckResponse.bind(undefined, i == events.length - 1)); 67 InspectorTest.sendCommand("Input.dispatchMouseEvent", events[i], che ckResponse.bind(undefined, i == events.length - 1));
68 }); 68 });
69 69
70 function checkResponse(isLastCommand, msg) 70 function checkResponse(isLastCommand, msg)
71 { 71 {
72 if (msg.error) 72 if (msg.error)
73 InspectorTest.log("Error: " + msg.error.message); 73 InspectorTest.log("Error: " + msg.error.message);
74 if (isLastCommand) 74 if (isLastCommand)
75 InspectorTest.completeTest(); 75 InspectorTest.completeTest();
76 } 76 }
77 } 77 }
78 78
79 </script> 79 </script>
80 </head> 80 </head>
81 <body onload="runTest()"> 81 <body onload="runTest()">
82 </body> 82 </body>
83 </html> 83 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698