haikuwebkit/LayoutTests/inspector/timeline/timeline-event-TimerRemove-...

27 lines
776 B
Plaintext
Raw Permalink Normal View History

Web Inspector: Timeline should show when events preventDefault() was called on an event or not https://bugs.webkit.org/show_bug.cgi?id=176824 <rdar://problem/34290931> Reviewed by Timothy Hatcher. Original patch by Joseph Pecoraro <pecoraro@apple.com>. Source/WebCore: Tests: inspector/timeline/timeline-event-CancelAnimationFrame.html inspector/timeline/timeline-event-EventDispatch.html inspector/timeline/timeline-event-FireAnimationFrame.html inspector/timeline/timeline-event-RequestAnimationFrame.html inspector/timeline/timeline-event-TimerFire.html inspector/timeline/timeline-event-TimerInstall.html inspector/timeline/timeline-event-TimerRemove.html * dom/EventTarget.cpp: (WebCore::EventTarget::innerInvokeEventListeners): * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchEvent): Include `defaultPrevented` when notifying inspector. * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didDispatchEvent): (WebCore::InspectorInstrumentation::didDispatchEventOnWindow): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didDispatchEventImpl): (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl): Pass `defaultPrevented` on to agent. * inspector/agents/InspectorTimelineAgent.h: * inspector/agents/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didDispatchEvent): Append a boolean `defaultPrevented` property on the `EventDispatch` timeline record's data. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: New string. * UserInterface/Controllers/TimelineManager.js: (WI.TimelineManager.prototype._processRecord): Include the whole data object as extra details. * UserInterface/Models/ScriptTimelineRecord.js: (WI.ScriptTimelineRecord): (WI.ScriptTimelineRecord.prototype.get eventType): Wholesale copy of the extra data instead of just a single property. * UserInterface/Views/ScriptDetailsTimelineView.js: (WI.ScriptDetailsTimelineView): Give the name column more initial space, there is still extra space after this adjustment but name is comfortably larger (and the most likely to be expanded). * UserInterface/Views/ScriptTimelineDataGridNode.js: (WI.ScriptTimelineDataGridNode.prototype.get subtitle): Include "default prevented" as the event's subtitle if it was prevented. LayoutTests: * inspector/timeline/resources/timeline-event-utilities.js: Added. (finishRecording): (TestPage.registerInitializer.InspectorTest.TimelineEvent.captureTimelineWithScript): (TestPage.registerInitializer): Helper code for creating a recording from a function. * inspector/timeline/timeline-event-CancelAnimationFrame.html: Added. * inspector/timeline/timeline-event-CancelAnimationFrame-expected.txt: Added. * inspector/timeline/timeline-event-EventDispatch.html: Added. * inspector/timeline/timeline-event-EventDispatch-expected.txt: Added. * inspector/timeline/timeline-event-FireAnimationFrame.html: Added. * inspector/timeline/timeline-event-FireAnimationFrame-expected.txt: Added. * inspector/timeline/timeline-event-RequestAnimationFrame.html: Added. * inspector/timeline/timeline-event-RequestAnimationFrame-expected.txt: Added. * inspector/timeline/timeline-event-TimerFire.html: Added. * inspector/timeline/timeline-event-TimerFire-expected.txt: Added. * inspector/timeline/timeline-event-TimerInstall.html: Added. * inspector/timeline/timeline-event-TimerInstall-expected.txt: Added. * inspector/timeline/timeline-event-TimerRemove.html: Added. * inspector/timeline/timeline-event-TimerRemove-expected.txt: Added. Canonical link: https://commits.webkit.org/210334@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-21 00:55:40 +00:00
Tests 'TimerRemove' Timeline event records.
== Running test suite: TimelineEvent.TimerRemove
-- Running test case: TimelineEvent.TimerRemove.setTimeout
Starting Capture...
Evaluating...
Stopping Capture...
PASS: Should be 1 TimerRemoved record.
DETAILS: number
PASS: ScriptTimelineRecord details should be the setTimeout identifier.
-- Running test case: TimelineEvent.TimerRemove.setInterval
Starting Capture...
Evaluating...
PASS: setInterval fired: 1
PASS: setInterval fired: 2
PASS: setInterval fired: 3
Stopping Capture...
PASS: Should be 1 TimerRemoved record.
DETAILS: number
PASS: ScriptTimelineRecord details should be the setInterval identifier.
-- Running test case: SanityCheck
PASS: The setTimeout identifier and setInterval identifiers should be different.