Feat: Add CORS handling docs, tests and native exports - #385
Merged
AnnaSasDev merged 6 commits intoAug 3, 2026
Conversation
Document CORS behavior for custom schemes and add verification tests and native test exports. Adds native test exports (Exports.CustomSchemeResponseTests.cpp) and managed bindings (InfiniFrameNativeTesting.CustomSchemeResponseTests.cs), registers the test source in the native CMakeLists, and introduces multiple tests (managed unit tests, integration Playwright tests) plus cors-test-data.json. Also updates core-window docs and migration notes to describe same-origin CORS behavior and platform specifics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 tasks
…-let-do-fetch-and-xmlhttprequest-requests
Replace #if WINDOWS preprocessor marshaling with OperatingSystem.IsWindows() runtime checks in MarshalNativeToString and MarshalStringToNative. Rename FreeNativeString to MarshalFreeNativeString and update all callers to use the new name. Adjust tests to call Marshal.PtrToStringUTF8 for ContentTypeUtf8 and use InfiniFrameNativeTesting.MarshalNativeToString for header strings. This cleans up platform-specific marshaling and avoids the previous preprocessor-based logic.
Replace uses of the local MarshalNativeToString helper with the centralized InfiniFrameNative.PtrToNativeString across tests and remove the duplicate helper from InfiniFrameNativeTesting. Updated files: src/InfiniFrame.NativeBridge/Managed/NativeApi/Testing/InfiniFrameNativeTesting.CustomSchemeResponseTests.cs, tests/InfiniTests.InfiniFrame.NativeBridge/Managed/Delegates/CustomSchemeResponseCorsTests.cs, and tests/InfiniTests.InfiniFrame/Window/Events/CustomSchemeResponseCorsPipelineTests.cs. This unifies native pointer -> string marshalling and avoids duplicated code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…m) and accept 200 for missing resources
AnnaSasDev
deleted the
298-feature-registercustomschemehandler-wont-let-do-fetch-and-xmlhttprequest-requests
branch
August 3, 2026 20:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #298