Changeset 243031 in webkit
- Timestamp:
- Mar 15, 2019, 8:14:52 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/inspector/network/har/har-basic-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/inspector/network/har/har-page-expected.txt (modified) (13 diffs)
-
Source/WebInspectorUI/ChangeLog (modified) (1 diff)
-
Source/WebInspectorUI/UserInterface/Controllers/HARBuilder.js (modified) (4 diffs)
-
Source/WebInspectorUI/UserInterface/Models/LocalResource.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243024 r243031 1 2019-03-15 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: HAR Extension for Resource Priority 4 https://bugs.webkit.org/show_bug.cgi?id=195693 5 6 Reviewed by Devin Rousso. 7 8 * http/tests/inspector/network/har/har-basic-expected.txt: 9 * http/tests/inspector/network/har/har-page-expected.txt: 10 1 11 2019-03-15 Joseph Pecoraro <pecoraro@apple.com> 2 12 -
trunk/LayoutTests/http/tests/inspector/network/har/har-basic-expected.txt
r242896 r243031 137 137 "serverIPAddress": "12.34.56.78", 138 138 "connection": "1", 139 "_fetchType": "Network Load" 139 "_fetchType": "Network Load", 140 "_priority": "medium" 140 141 } 141 142 ] -
trunk/LayoutTests/http/tests/inspector/network/har/har-page-expected.txt
r232413 r243031 62 62 "wait": "<filtered>", 63 63 "receive": "<filtered>" 64 } 64 }, 65 "_priority": "high" 65 66 }, 66 67 { … … 103 104 "wait": "<filtered>", 104 105 "receive": "<filtered>" 105 } 106 }, 107 "_priority": "high" 106 108 }, 107 109 { … … 144 146 "wait": "<filtered>", 145 147 "receive": "<filtered>" 146 } 148 }, 149 "_priority": "high" 147 150 }, 148 151 { … … 192 195 "wait": "<filtered>", 193 196 "receive": "<filtered>" 194 } 197 }, 198 "_priority": "medium" 195 199 }, 196 200 { … … 246 250 "wait": "<filtered>", 247 251 "receive": "<filtered>" 248 } 252 }, 253 "_priority": "medium" 249 254 }, 250 255 { … … 299 304 "wait": "<filtered>", 300 305 "receive": "<filtered>" 301 } 306 }, 307 "_priority": "medium" 302 308 }, 303 309 { … … 352 358 "wait": "<filtered>", 353 359 "receive": "<filtered>" 354 } 360 }, 361 "_priority": "medium" 355 362 }, 356 363 { … … 405 412 "wait": "<filtered>", 406 413 "receive": "<filtered>" 407 } 414 }, 415 "_priority": "medium" 408 416 }, 409 417 { … … 462 470 "wait": "<filtered>", 463 471 "receive": "<filtered>" 464 } 472 }, 473 "_priority": "medium" 465 474 }, 466 475 { … … 525 534 "wait": "<filtered>", 526 535 "receive": "<filtered>" 527 } 536 }, 537 "_priority": "medium" 528 538 }, 529 539 { … … 592 602 "wait": "<filtered>", 593 603 "receive": "<filtered>" 594 } 604 }, 605 "_priority": "medium" 595 606 }, 596 607 { … … 663 674 "wait": "<filtered>", 664 675 "receive": "<filtered>" 665 } 676 }, 677 "_priority": "medium" 666 678 }, 667 679 { … … 738 750 "wait": "<filtered>", 739 751 "receive": "<filtered>" 740 } 752 }, 753 "_priority": "medium" 741 754 } 742 755 ] -
trunk/Source/WebInspectorUI/ChangeLog
r243026 r243031 1 2019-03-15 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: HAR Extension for Resource Priority 4 https://bugs.webkit.org/show_bug.cgi?id=195693 5 6 Reviewed by Devin Rousso. 7 8 * UserInterface/Controllers/HARBuilder.js: 9 (WI.HARBuilder.entry): 10 (WI.HARBuilder.priority): 11 (WI.HARBuilder.networkPriorityFromHARPriority): 12 Include priority custom extension. 13 14 * UserInterface/Models/LocalResource.js: 15 (WI.LocalResource.fromHAREntry): 16 Import priority. 17 1 18 2019-03-15 Joseph Pecoraro <pecoraro@apple.com> 2 19 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/HARBuilder.js
r242948 r243031 115 115 entry._fetchType = HARBuilder.fetchType(resource.responseSource); 116 116 117 // FIXME: <https://webkit.org/b/195693> Web Inspector: HAR Extension for Resource Priority 117 // WebKit Custom Field `_priority`. 118 if (resource.priority !== WI.Resource.NetworkPriority.Unknown) 119 entry._priority = HARBuilder.priority(resource.priority); 118 120 119 121 return entry; … … 316 318 } 317 319 318 console.assert(false); 320 console.assert(); 321 return undefined; 322 } 323 324 static priority(priority) 325 { 326 switch (priority) { 327 case WI.Resource.NetworkPriority.Low: 328 return "low"; 329 case WI.Resource.NetworkPriority.Medium: 330 return "medium"; 331 case WI.Resource.NetworkPriority.High: 332 return "high"; 333 } 334 335 console.assert(); 319 336 return undefined; 320 337 } … … 345 362 346 363 if (protocol) 347 console.warn("Unknown HAR Protocol value", protocol);364 console.warn("Unknown HAR protocol value", protocol); 348 365 return null; 349 366 } … … 361 378 362 379 if (fetchType) 363 console.warn("Unknown HAR Protocol _fetchType", fetchType);380 console.warn("Unknown HAR _fetchType value", fetchType); 364 381 return WI.Resource.ResponseSource.Other; 365 382 } 383 384 static networkPriorityFromHARPriority(priority) 385 { 386 switch (priority) { 387 case "low": 388 return WI.Resource.NetworkPriority.Low; 389 case "medium": 390 return WI.Resource.NetworkPriority.Medium; 391 case "high": 392 return WI.Resource.NetworkPriority.High; 393 } 394 395 if (priority) 396 console.warn("Unknown HAR priority value", priority); 397 return WI.Resource.NetworkPriority.Unknown; 398 } 366 399 }; -
trunk/Source/WebInspectorUI/UserInterface/Models/LocalResource.js
r242948 r243031 100 100 // FIXME: <https://webkit.org/b/195695> Web Inspector: HAR Extension for `serverIPAddress` port number 101 101 // FIXME: <https://webkit.org/b/195694> Web Inspector: HAR Extension for Redirect Timing Info 102 // FIXME: <https://webkit.org/b/195693> Web Inspector: HAR Extension for Resource Priority103 102 104 103 let {request, response, startedDateTime, timings} = entry; … … 183 182 responseSource: WI.HARBuilder.responseSourceFromHARFetchType(entry._fetchType), 184 183 protocol: WI.HARBuilder.protocolFromHARProtocol(response.httpVersion), 185 priority: null,184 priority: WI.HARBuilder.networkPriorityFromHARPriority(entry._priority), 186 185 remoteAddress: entry.serverIPAddress || null, 187 186 connectionIdentifier: entry.connection ? parseInt(entry.connection) : null,
Note:
See TracChangeset
for help on using the changeset viewer.