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

Side by Side Diff: LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html

Issue 366953002: DevTools: Put EventDispatch type into the data object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated EventDispatch in LocalDOMWindow.cpp + Updated the test 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
« no previous file with comments | « no previous file | Source/core/events/EventDispatcher.cpp » ('j') | 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 <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 testFunction() 6 function testFunction()
7 { 7 {
8 var div = document.querySelector("#my-div"); 8 var div = document.querySelector("#my-div");
9 div.addEventListener("click", function(e) { }, false); 9 div.addEventListener("click", function(e) { }, false);
10 div.click(); 10 div.click();
(...skipping 28 matching lines...) Expand all
39 return e.cat === "disabled-by-default-devtools.timeline"; 39 return e.cat === "disabled-by-default-devtools.timeline";
40 })); 40 }));
41 } 41 }
42 42
43 function tracingComplete(event) 43 function tracingComplete(event)
44 { 44 {
45 InspectorTest.log("Tracing complete"); 45 InspectorTest.log("Tracing complete");
46 46
47 function windowEventFilter(type, e) 47 function windowEventFilter(type, e)
48 { 48 {
49 return e.name === "EventDispatch" && e.args.type === type; 49 return e.name === "EventDispatch" && e.args.data.type === type;
50 }; 50 };
51 51
52 var windowEventNames = [ "click", "beforeunload", "unload", "load" ]; 52 var windowEventNames = [ "click", "beforeunload", "unload", "load" ];
53 for (var i = 0; i < windowEventNames.length; i++) { 53 for (var i = 0; i < windowEventNames.length; i++) {
54 var eventName = windowEventNames[i]; 54 var eventName = windowEventNames[i];
55 var events = devtoolsEvents.filter(windowEventFilter.bind(this, even tName)); 55 var events = devtoolsEvents.filter(windowEventFilter.bind(this, even tName));
56 if (events.length >= 1) { 56 if (events.length >= 1) {
57 InspectorTest.log("SUCCESS: found " + eventName + " event"); 57 InspectorTest.log("SUCCESS: found " + eventName + " event");
58 } else { 58 } else {
59 fail(eventName + " event is missing"); 59 fail(eventName + " event is missing");
60 } 60 }
61 } 61 }
62 62
63 InspectorTest.completeTest(); 63 InspectorTest.completeTest();
64 } 64 }
65 65
66 66
67 function fail(message) 67 function fail(message)
68 { 68 {
69 var formattedEvents = devtoolsEvents.map(function(e) 69 var formattedEvents = devtoolsEvents.map(function(e)
70 { 70 {
71 return e.name + "(" + e.args.type + ")"; 71 return e.name + "(" + e.args.data.type + ")";
72 }); 72 });
73 InspectorTest.log("FAIL: " + message + " devtools.timeline events: " + J SON.stringify(formattedEvents, null, 2)); 73 InspectorTest.log("FAIL: " + message + " devtools.timeline events: " + J SON.stringify(formattedEvents, null, 2));
74 } 74 }
75 75
76 function onStop(response) 76 function onStop(response)
77 { 77 {
78 InspectorTest.log("Recording stopped"); 78 InspectorTest.log("Recording stopped");
79 } 79 }
80 } 80 }
81 </script> 81 </script>
82 </head> 82 </head>
83 <body onLoad="runTest();"> 83 <body onLoad="runTest();">
84 <div id="my-div"></div> 84 <div id="my-div"></div>
85 </body> 85 </body>
86 </html> 86 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/core/events/EventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698