[unsafe-buffers] Fix UNSAFE_TODO in BraveStatsUpdaterBrowserTest (#28718)

The simpler fix here is to avoid any buffer operation.

Resolves https://github.com/brave/brave-browser/issues/45513
This commit is contained in:
cdesouza-chromium
2025-04-17 16:19:42 +01:00
committed by GitHub
parent 59bbf82c8c
commit 85e555e5bc
@@ -160,9 +160,7 @@ IN_PROC_BROWSER_TEST_F(BraveStatsUpdaterBrowserTest,
WaitForReferralInitializeCallback();
WaitForStandardStatsUpdatedCallback();
// We get //1/usage/brave-core here, so ignore the first slash.
EXPECT_STREQ(UNSAFE_TODO(GetUpdateURL().path().c_str() + 1),
"/1/usage/brave-core");
EXPECT_EQ(GetUpdateURL().path(), "//1/usage/brave-core");
// First check preference should now be true
EXPECT_TRUE(g_browser_process->local_state()->GetBoolean(kFirstCheckMade));