Skip to content

Add some tests that decide to download after an HTTP redirection#23486

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
achristensen07:eng/Add-some-tests-that-decide-to-download-after-an-HTTP-redirection
Jan 31, 2024
Merged

Add some tests that decide to download after an HTTP redirection#23486
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
achristensen07:eng/Add-some-tests-that-decide-to-download-after-an-HTTP-redirection

Conversation

@achristensen07
Copy link
Contributor

@achristensen07 achristensen07 commented Jan 30, 2024

33d8a41

Add some tests that decide to download after an HTTP redirection
https://bugs.webkit.org/show_bug.cgi?id=268350
rdar://121891934

Reviewed by Charlie Wolfe.

Choosing to download only after seeing a redirect response is a case that has no tests.
It currently uses much of the same code paths as choosing to download when initially seeing
a navigation action, but with some upcoming work I'm planning to make them different code
paths, so it's important to add a test for this case to verify existing behavior does not change.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
* Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.h:
* Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
(-[TestNavigationDelegate waitForDidFailProvisionalNavigation]):
(-[TestNavigationDelegate webView:navigationAction:didBecomeDownload:]):
(-[TestNavigationDelegate webView:navigationResponse:didBecomeDownload:]):

Canonical link: https://commits.webkit.org/273854@main

d3959fc

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac 🛠 wpe 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2
✅ 🧪 webkitperl 🧪 ios-wk2 🧪 api-mac 🧪 api-wpe
🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 🛠 gtk
✅ 🧪 api-ios ✅ 🧪 mac-wk2 🧪 gtk-wk2
🛠 tv 🧪 mac-AS-debug-wk2 🧪 api-gtk
🛠 tv-sim
🛠 watch
✅ 🛠 🧪 unsafe-merge 🛠 watch-sim

@achristensen07 achristensen07 self-assigned this Jan 30, 2024
@achristensen07 achristensen07 added the WebKit Process Model Bugs related to WebKit's multi-process architecture label Jan 30, 2024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WKDownload * doesn't need the variable name.

@achristensen07 achristensen07 force-pushed the eng/Add-some-tests-that-decide-to-download-after-an-HTTP-redirection branch from 8c97d89 to a42d6a1 Compare January 31, 2024 20:28
@achristensen07 achristensen07 force-pushed the eng/Add-some-tests-that-decide-to-download-after-an-HTTP-redirection branch from a42d6a1 to d3959fc Compare January 31, 2024 20:33
@achristensen07 achristensen07 added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 31, 2024
https://bugs.webkit.org/show_bug.cgi?id=268350
rdar://121891934

Reviewed by Charlie Wolfe.

Choosing to download only after seeing a redirect response is a case that has no tests.
It currently uses much of the same code paths as choosing to download when initially seeing
a navigation action, but with some upcoming work I'm planning to make them different code
paths, so it's important to add a test for this case to verify existing behavior does not change.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
* Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.h:
* Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
(-[TestNavigationDelegate waitForDidFailProvisionalNavigation]):
(-[TestNavigationDelegate webView:navigationAction:didBecomeDownload:]):
(-[TestNavigationDelegate webView:navigationResponse:didBecomeDownload:]):

Canonical link: https://commits.webkit.org/273854@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Add-some-tests-that-decide-to-download-after-an-HTTP-redirection branch from d3959fc to 33d8a41 Compare January 31, 2024 21:01
@webkit-commit-queue webkit-commit-queue merged commit 33d8a41 into WebKit:main Jan 31, 2024
@webkit-commit-queue
Copy link
Collaborator

Committed 273854@main (33d8a41): https://commits.webkit.org/273854@main

Reviewed commits have been landed. Closing PR #23486 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKit Process Model Bugs related to WebKit's multi-process architecture

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants