Changeset 202072 in webkit
- Timestamp:
- Jun 14, 2016 5:42:51 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202068 r202072 1 2016-06-14 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments 4 https://bugs.webkit.org/show_bug.cgi?id=158762 5 6 Reviewed by Timothy Hatcher. 7 8 * inspector/timeline/setInstruments-errors-expected.txt: Renamed from LayoutTests/inspector/timeline/setAutoCaptureInstruments-errors-expected.txt. 9 * inspector/timeline/setInstruments-errors.html: Renamed from LayoutTests/inspector/timeline/setAutoCaptureInstruments-errors.html. 10 1 11 2016-06-14 Dean Jackson <dino@apple.com> 2 12 -
trunk/LayoutTests/inspector/timeline/setInstruments-errors-expected.txt
r202071 r202072 1 Tests for error cases with Timeline.set AutoCaptureInstruments.1 Tests for error cases with Timeline.setInstruments. 2 2 3 3 4 == Running test suite: Timeline.set AutoCaptureInstruments.errors4 == Running test suite: Timeline.setInstruments.errors 5 5 -- Running test case: MissingRequiredArgument 6 PASS: Should be an error: Some arguments of method 'Timeline.set AutoCaptureInstruments' can't be processed6 PASS: Should be an error: Some arguments of method 'Timeline.setInstruments' can't be processed 7 7 8 8 -- Running test case: InvalidTypeInInstrumentsList -
trunk/LayoutTests/inspector/timeline/setInstruments-errors.html
r202071 r202072 6 6 function test() 7 7 { 8 let suite = ProtocolTest.createAsyncSuite("Timeline.setAutoCaptureInstruments.errors"); 9 10 ProtocolTest.dumpActivityToSystemConsole = true; 11 ProtocolTest.dumpInspectorProtocolMessages = true; 8 let suite = ProtocolTest.createAsyncSuite("Timeline.setInstruments.errors"); 12 9 13 10 suite.addTestCase({ 14 11 name: "MissingRequiredArgument", 15 12 test: (resolve, reject) => { 16 InspectorProtocol.sendCommand("Timeline.set AutoCaptureInstruments", {}, (messageObject) => {13 InspectorProtocol.sendCommand("Timeline.setInstruments", {}, (messageObject) => { 17 14 ProtocolTest.expectThat(messageObject.error, `Should be an error: ${messageObject.error ? messageObject.error.message : ""}`); 18 15 resolve(); … … 24 21 name: "InvalidTypeInInstrumentsList", 25 22 test: (resolve, reject) => { 26 InspectorProtocol.sendCommand("Timeline.set AutoCaptureInstruments", {"instruments": [123]}, (messageObject) => {23 InspectorProtocol.sendCommand("Timeline.setInstruments", {"instruments": [123]}, (messageObject) => { 27 24 ProtocolTest.expectThat(messageObject.error, `Should be an error: ${messageObject.error ? messageObject.error.message : ""}`); 28 25 resolve(); … … 34 31 name: "InvalidInstrumentInInstrumentsList", 35 32 test: (resolve, reject) => { 36 InspectorProtocol.sendCommand("Timeline.set AutoCaptureInstruments", {"instruments": ["NoSuchInstrument"]}, (messageObject) => {33 InspectorProtocol.sendCommand("Timeline.setInstruments", {"instruments": ["NoSuchInstrument"]}, (messageObject) => { 37 34 ProtocolTest.expectThat(messageObject.error, `Should be an error: ${messageObject.error ? messageObject.error.message : ""}`); 38 35 resolve(); … … 44 41 name: "ValidInstrumentInInstrumentsList", 45 42 test: (resolve, reject) => { 46 InspectorProtocol.sendCommand("Timeline.set AutoCaptureInstruments", {"instruments": ["ScriptProfiler", "Heap", "Timeline", "Memory"]}, (messageObject) => {43 InspectorProtocol.sendCommand("Timeline.setInstruments", {"instruments": ["ScriptProfiler", "Heap", "Timeline", "Memory"]}, (messageObject) => { 47 44 ProtocolTest.expectThat(!messageObject.error, "Should not be an error setting valid instruments."); 48 45 resolve(); … … 56 53 </head> 57 54 <body onload="runTest()"> 58 <p>Tests for error cases with Timeline.set AutoCaptureInstruments.</p>55 <p>Tests for error cases with Timeline.setInstruments.</p> 59 56 </body> 60 57 </html> -
trunk/Source/JavaScriptCore/ChangeLog
r202069 r202072 1 2016-06-14 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments 4 https://bugs.webkit.org/show_bug.cgi?id=158762 5 6 Reviewed by Timothy Hatcher. 7 8 Rename the protocol methods since the backend may use the instruments 9 for purposes other then auto-capture, such as programmatic capture 10 via console.profile. 11 12 * inspector/protocol/Timeline.json: 13 1 14 2016-06-14 David Kilzer <ddkilzer@apple.com> 2 15 -
trunk/Source/JavaScriptCore/inspector/protocol/Timeline.json
r201237 r202072 74 74 }, 75 75 { 76 "name": "set AutoCaptureInstruments",77 "description": "Instruments to enable when an auto capture starts.",76 "name": "setInstruments", 77 "description": "Instruments to enable when capture starts on the backend (e.g. auto capture or programmatic capture).", 78 78 "parameters": [ 79 79 { "name": "instruments", "type": "array", "items": { "$ref": "Instrument" }, "description": "Instruments to enable." } -
trunk/Source/WebCore/ChangeLog
r202068 r202072 1 2016-06-14 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments 4 https://bugs.webkit.org/show_bug.cgi?id=158762 5 6 Reviewed by Timothy Hatcher. 7 8 Test: inspector/timeline/setInstruments-errors.html 9 10 * inspector/InspectorTimelineAgent.cpp: 11 (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend): 12 (WebCore::InspectorTimelineAgent::setInstruments): 13 (WebCore::InspectorTimelineAgent::mainFrameStartedLoading): 14 (WebCore::InspectorTimelineAgent::setAutoCaptureInstruments): Deleted. 15 * inspector/InspectorTimelineAgent.h: 16 1 17 2016-06-14 Dean Jackson <dino@apple.com> 2 18 -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp
r201237 r202072 108 108 109 109 m_autoCaptureEnabled = false; 110 m_ autoCaptureInstruments.clear();110 m_instruments.clear(); 111 111 } 112 112 … … 130 130 } 131 131 132 void InspectorTimelineAgent::set AutoCaptureInstruments(ErrorString& errorString, const InspectorArray& instruments)132 void InspectorTimelineAgent::setInstruments(ErrorString& errorString, const InspectorArray& instruments) 133 133 { 134 134 Vector<Protocol::Timeline::Instrument> newInstruments; … … 151 151 } 152 152 153 m_ autoCaptureInstruments.swap(newInstruments);153 m_instruments.swap(newInstruments); 154 154 } 155 155 … … 394 394 return; 395 395 396 if (m_ autoCaptureInstruments.isEmpty())396 if (m_instruments.isEmpty()) 397 397 return; 398 398 … … 407 407 408 408 // Enable instruments. 409 for (auto instrumentType : m_ autoCaptureInstruments) {409 for (auto instrumentType : m_instruments) { 410 410 switch (instrumentType) { 411 411 case Inspector::Protocol::Timeline::Instrument::ScriptProfiler: { -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.h
r201237 r202072 103 103 void stop(ErrorString&) final; 104 104 void setAutoCaptureEnabled(ErrorString&, bool) final; 105 void set AutoCaptureInstruments(ErrorString&, const Inspector::InspectorArray&) final;105 void setInstruments(ErrorString&, const Inspector::InspectorArray&) final; 106 106 107 107 int id() const { return m_id; } … … 209 209 210 210 bool m_autoCaptureEnabled { false }; 211 Vector<Inspector::Protocol::Timeline::Instrument> m_ autoCaptureInstruments;211 Vector<Inspector::Protocol::Timeline::Instrument> m_instruments; 212 212 213 213 #if PLATFORM(COCOA) -
trunk/Source/WebInspectorUI/ChangeLog
r202066 r202072 1 2016-06-14 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments 4 https://bugs.webkit.org/show_bug.cgi?id=158762 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/Controllers/TimelineManager.js: 9 (WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments): 10 (WebInspector.TimelineManager): 11 1 12 2016-06-14 Benjamin Poulain <bpoulain@apple.com> 2 13 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
r202010 r202072 991 991 return; 992 992 993 if (!TimelineAgent.set AutoCaptureInstruments)993 if (!TimelineAgent.setInstruments) 994 994 return; 995 995 … … 1016 1016 } 1017 1017 1018 TimelineAgent.set AutoCaptureInstruments([...instrumentSet]);1018 TimelineAgent.setInstruments([...instrumentSet]); 1019 1019 } 1020 1020 };
Note: See TracChangeset
for help on using the changeset viewer.