- Notifications
You must be signed in to change notification settings - Fork20.6k
Commit399a78e
authored
Tests: Make the beforeunload event tests work regardless of extensions
Some browser extensions, like React DevTools, send messages to the content area.Since our beforeunload event test listens for all messages, it used to catchthose as well, failing the test.Add a `source` field to the payload JSON and check for it before treating themessage as coming from our own test to make sure the test passes even with suchbrowser extensions installed.Closesgh-54781 parent7cdd837 commit399a78e
2 files changed
+20
-10
lines changedLines changed: 6 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| 7 | + | |
7 | 8 |
| |
8 | 9 |
| |
9 |
| - | |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
14 |
| - | |
15 |
| - | |
| 15 | + | |
| 16 | + | |
16 | 17 |
| |
17 |
| - | |
18 |
| - | |
| 18 | + | |
| 19 | + | |
19 | 20 |
| |
20 | 21 |
|
Lines changed: 14 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1448 | 1448 |
| |
1449 | 1449 |
| |
1450 | 1450 |
| |
1451 |
| - | |
| 1451 | + | |
| 1452 | + | |
1452 | 1453 |
| |
1453 |
| - | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
1454 | 1457 |
| |
1455 |
| - | |
1456 |
| - | |
1457 |
| - | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1458 | 1467 |
| |
1459 | 1468 |
| |
1460 | 1469 |
| |
|
0 commit comments
Comments
(0)