Commit 274632c
authored
test(browser): add sendBeacon Content-Type test coverage (#3317)
Follow-up from #3297 review discussion. Adds:
- blob.type assertions to existing JSON and Base64 sendBeacon tests
(only gzip was previously checked)
- Test verifying sendBeacon is NOT called when body is undefined
- Parameterized regression test covering all compression modes,
asserting the body is always a Blob with the correct Content-Type
These tests would have caught the bug fixed in #3297, where
sendBeacon received a raw ArrayBuffer (no Content-Type) instead
of a Blob, breaking proxies/WAFs/CDNs that require Content-Type.1 parent 68cd4e5 commit 274632c
1 file changed
+41
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
458 | 459 | | |
459 | 460 | | |
460 | 461 | | |
| |||
480 | 481 | | |
481 | 482 | | |
482 | 483 | | |
| 484 | + | |
483 | 485 | | |
484 | 486 | | |
485 | 487 | | |
| |||
517 | 519 | | |
518 | 520 | | |
519 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
520 | 561 | | |
521 | 562 | | |
522 | 563 | | |
0 commit comments