Commit 743aa3c
[CDP] Detect
Before this CL, navigating to a download URL yields "net::ERR_ABORTED",
and is impossible to distinguish from any other error.
To determine whether the error stems from a download,
one needs to wait for the `Browser.downloadWillBegin` event.
But since that can be emitted *after* `Page.navigate` returns,
this introduces unnecessary waiting.
To prevent this waiting, this CL adds a flag that
shows whether the navigation turned into a download.
Change-Id: I90d81d289df6621d0cdb977ba6ed7e7d74ee475e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6696011
Commit-Queue: Yury Semikhatsky <[email protected]>
Reviewed-by: Maksim Sadym <[email protected]>
Reviewed-by: Andrey Kosyakov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1487924}Page.navigate download1 parent 03cdd4b commit 743aa3c
File tree
8 files changed
+37
-3
lines changed- content/browser/devtools/protocol
- third_party/blink
- public/devtools_protocol
- web_tests
- http/tests/inspector-protocol/page
- resources
- inspector-protocol/page
8 files changed
+37
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
| 1403 | + | |
1403 | 1404 | | |
1404 | 1405 | | |
1405 | 1406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
818 | | - | |
| 818 | + | |
| 819 | + | |
819 | 820 | | |
820 | 821 | | |
821 | 822 | | |
| |||
825 | 826 | | |
826 | 827 | | |
827 | 828 | | |
828 | | - | |
| 829 | + | |
| 830 | + | |
829 | 831 | | |
830 | 832 | | |
831 | 833 | | |
| |||
938 | 940 | | |
939 | 941 | | |
940 | 942 | | |
941 | | - | |
| 943 | + | |
942 | 944 | | |
943 | 945 | | |
944 | 946 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9452 | 9452 | | |
9453 | 9453 | | |
9454 | 9454 | | |
| 9455 | + | |
| 9456 | + | |
9455 | 9457 | | |
9456 | 9458 | | |
9457 | 9459 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
0 commit comments