Skip to content

[WDP Native v2] Add value transforms pt. 2#30822

Open
DJAndries wants to merge 2 commits intowdp-native-v2-transforms1from
wdp-native-v2-transforms2
Open

[WDP Native v2] Add value transforms pt. 2#30822
DJAndries wants to merge 2 commits intowdp-native-v2-transforms1from
wdp-native-v2-transforms2

Conversation

@DJAndries
Copy link
Collaborator

@DJAndries DJAndries commented Aug 25, 2025

Resolves brave/brave-browser#48953
Based off #30821

result = transform->Process("not-a-url");
EXPECT_EQ(result, std::nullopt);

// Test URL with no matching params
Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest another one just to emphasize that we're not making assumptions about the format of the query string in this function:

https://example.com?utm_source=google;utm_medium=cpc;utm_content=something

(should be untouched)

R"(["removeParams", ["utm_source", "utm_medium", "fbclid"]])");
ASSERT_TRUE(transform);

// Test URL with params to remove
Copy link
Member

Choose a reason for hiding this comment

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

Another one to show that we're not urldecoding the parameters:

https://example.com?utm_source=google&utm_medium=cpc&redirect=https%3A%2F%2Fexample.net%3Futm_source%3Dbing%26utm_medium%3Dcpm

The expected output is https://example.com?redirect=https%3A%2F%2Fexample.net%3Futm_source%3Dbing%26utm_medium%3Dcpm

@DJAndries DJAndries force-pushed the wdp-native-v2-transforms1 branch from 66bf8df to f72a8ea Compare October 7, 2025 04:46
@DJAndries DJAndries force-pushed the wdp-native-v2-transforms2 branch from e9ccd84 to 1a0394f Compare October 7, 2025 04:46
@DJAndries DJAndries force-pushed the wdp-native-v2-transforms1 branch from f72a8ea to f61fa51 Compare October 16, 2025 22:53
@DJAndries DJAndries force-pushed the wdp-native-v2-transforms2 branch from 1a0394f to 04c7645 Compare October 16, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants