[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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user