Source/WebCore: [Web Inspector]Add WebSocket networking events in Timeline panel.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2013 09:04:02 +0000 (09:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2013 09:04:02 +0000 (09:04 +0000)
commitb951c304fc4758b76617eee00b55bc0de5d2db96
tree29d5315c47c08e5e1cca7afa91bebdb7e0e12d34
parentc7a529c200f238d1ea8f59a9001ace392292392f
Source/WebCore: [Web Inspector]Add WebSocket networking events in Timeline panel.
https://bugs.webkit.org/show_bug.cgi?id=105527.

Patch by Pan Deng <pan.deng@intel.com> on 2013-02-21
Reviewed by Pavel Feldman.

This patch add four WebSocket networking events in Timeline panel. The Events
are CreateWebSocket, SendWebSocketHandshakeRequest, ReceiveWebSocketHandShakeResponse
and DestoryWebSocket. Thanks to Kitamura san's previous work.

Test: http/tests/inspector/websocket/timeline-websocket-event.html

* English.lproj/localizedStrings.js:
* Modules/websockets/WebSocketChannel.cpp: Add protocol information
(WebCore::WebSocketChannel::connect):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didCreateWebSocketImpl): Add Timeline agent instrumentation for websocket
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl): Ditto
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl): Ditto
(WebCore::InspectorInstrumentation::didCloseWebSocketImpl): Ditto
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didCreateWebSocket):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorInstrumentation::didCloseWebSocket):
* inspector/InspectorTimelineAgent.cpp:
(TimelineRecordType):
(WebCore):
(WebCore::InspectorTimelineAgent::didCreateWebSocket): Add Timeline record for websocket create
(WebCore::InspectorTimelineAgent::addWebSocketRecord): Add general websocket record
(WebCore::InspectorTimelineAgent::willSendWebSocketHandshakeRequest): Add Timeline record for websocket handshake request send
(WebCore::InspectorTimelineAgent::didReceiveWebSocketHandshakeResponse): Add Timeline record for websocket handshake response receive
(WebCore::InspectorTimelineAgent::didDestroyWebSocket): Add Timeline record for websocket destroy
* inspector/InspectorTimelineAgent.h:
(WebCore):
(InspectorTimelineAgent):
* inspector/TimelineRecordFactory.h:
(TimelineRecordFactory):
(WebCore::TimelineRecordFactory::createWebSocketCreateData):
(WebCore::TimelineRecordFactory::createGenericWebSocketData):
* inspector/front-end/TimelineModel.js: Add Timeline record type for websocket
* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel._initRecordStyles):
(WebInspector.TimelinePresentationModel.prototype.reset): Add slot to store WebSocket Create record
(WebInspector.TimelinePresentationModel.Record):
(WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview): Add PopupContent for websocket record, including url and protocol

LayoutTests: [Web Inspector]Add WebSocket networking events in WebInspector Timeline panel.
https://bugs.webkit.org/show_bug.cgi?id=105527.

Patch by Pan Deng <pan.deng@intel.com> on 2013-02-21
Reviewed by Pavel Feldman.

This change add the record event type to test expections. The Events are CreateWebSocket,
SendWebSocketHandshakeRequest, ReceiveWebSocketHandShakeResponse and DestoryWebSocket.
timeline-test.js was moved to http folder, since new added websocket test need it from server side.

* http/tests/inspector/timeline-test.js: Renamed from LayoutTests/inspector/timeline/timeline-test.js.
(initialize_Timeline.InspectorTest.startTimeline.addRecord):
(initialize_Timeline.InspectorTest.startTimeline):
(initialize_Timeline.addRecord):
(initialize_Timeline.InspectorTest.waitForRecordType):
(initialize_Timeline.InspectorTest.stopTimeline):
(initialize_Timeline.step1):
(initialize_Timeline.step2):
(initialize_Timeline.InspectorTest.evaluateWithTimeline):
(initialize_Timeline.):
(initialize_Timeline.InspectorTest.performActionsAndPrint):
(initialize_Timeline.InspectorTest.printTimelineRecords):
(initialize_Timeline.InspectorTest.printTimestampRecords):
(initialize_Timeline.InspectorTest.innerPrintTimelineRecords):
(initialize_Timeline.InspectorTest.dumpTimelineRecord):
(initialize_Timeline.InspectorTest.dumpTimelineRecords):
(initialize_Timeline.InspectorTest.printTimelineRecordProperties):
(initialize_Timeline.InspectorTest._timelineAgentTypeToString):
(initialize_Timeline.InspectorTest.findPresentationRecord.findByType):
(initialize_Timeline.InspectorTest.findPresentationRecord):
(initialize_Timeline.InspectorTest.FakeFileReader):
(initialize_Timeline.InspectorTest.FakeFileReader.prototype.start):
(initialize_Timeline.InspectorTest.FakeFileReader.prototype.cancel):
(initialize_Timeline.InspectorTest.FakeFileReader.prototype.loadedSize):
(initialize_Timeline.InspectorTest.FakeFileReader.prototype.fileSize):
(initialize_Timeline.InspectorTest.FakeFileReader.prototype.fileName):
(initialize_Timeline.InspectorTest):
(initialize_Timeline):
* http/tests/inspector/websocket/timeline-websocket-event-expected.txt: Added.
* http/tests/inspector/websocket/timeline-websocket-event.html: Added.
* inspector/timeline/timeline-animation-frame.html: Modify address of script "timeline-test.js"
* inspector/timeline/timeline-decode-resize.html:
* inspector/timeline/timeline-dom-content-loaded-event.html:
* inspector/timeline/timeline-enum-stability-expected.txt:
* inspector/timeline/timeline-event-dispatch.html:
* inspector/timeline/timeline-frames.html:
* inspector/timeline/timeline-injected-script-eval.html:
* inspector/timeline/timeline-layout-reason.html:
* inspector/timeline/timeline-layout.html:
* inspector/timeline/timeline-load-event.html:
* inspector/timeline/timeline-load.html:
* inspector/timeline/timeline-mark-timeline.html:
* inspector/timeline/timeline-network-received-data.html:
* inspector/timeline/timeline-network-resource.html:
* inspector/timeline/timeline-paint.html:
* inspector/timeline/timeline-parse-html.html:
* inspector/timeline/timeline-recalculate-styles.html:
* inspector/timeline/timeline-receive-response-event.html:
* inspector/timeline/timeline-script-tag-1.html:
* inspector/timeline/timeline-script-tag-2.html:
* inspector/timeline/timeline-start-time.html:
* inspector/timeline/timeline-time-stamp.html:
* inspector/timeline/timeline-time.html:
* inspector/timeline/timeline-timer-fired-from-eval-call-site.html:
* inspector/timeline/timeline-timer.html:
* inspector/timeline/timeline-trivial.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
40 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/timeline-test.js [moved from LayoutTests/inspector/timeline/timeline-test.js with 98% similarity]
LayoutTests/http/tests/inspector/websocket/timeline-websocket-event-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/websocket/timeline-websocket-event.html [new file with mode: 0644]
LayoutTests/inspector/timeline/timeline-animation-frame.html
LayoutTests/inspector/timeline/timeline-decode-resize.html
LayoutTests/inspector/timeline/timeline-dom-content-loaded-event.html
LayoutTests/inspector/timeline/timeline-enum-stability-expected.txt
LayoutTests/inspector/timeline/timeline-event-dispatch.html
LayoutTests/inspector/timeline/timeline-frames.html
LayoutTests/inspector/timeline/timeline-injected-script-eval.html
LayoutTests/inspector/timeline/timeline-layout-reason.html
LayoutTests/inspector/timeline/timeline-layout.html
LayoutTests/inspector/timeline/timeline-load-event.html
LayoutTests/inspector/timeline/timeline-load.html
LayoutTests/inspector/timeline/timeline-mark-timeline.html
LayoutTests/inspector/timeline/timeline-network-received-data.html
LayoutTests/inspector/timeline/timeline-network-resource.html
LayoutTests/inspector/timeline/timeline-paint.html
LayoutTests/inspector/timeline/timeline-parse-html.html
LayoutTests/inspector/timeline/timeline-recalculate-styles.html
LayoutTests/inspector/timeline/timeline-receive-response-event.html
LayoutTests/inspector/timeline/timeline-script-tag-1.html
LayoutTests/inspector/timeline/timeline-script-tag-2.html
LayoutTests/inspector/timeline/timeline-start-time.html
LayoutTests/inspector/timeline/timeline-time-stamp.html
LayoutTests/inspector/timeline/timeline-time.html
LayoutTests/inspector/timeline/timeline-timer-fired-from-eval-call-site.html
LayoutTests/inspector/timeline/timeline-timer.html
LayoutTests/inspector/timeline/timeline-trivial.html
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/localizedStrings.js
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/TimelineRecordFactory.h
Source/WebCore/inspector/front-end/TimelineModel.js
Source/WebCore/inspector/front-end/TimelinePresentationModel.js