Commit 5bd1f98a authored by Jun Kokatsu's avatar Jun Kokatsu Committed by Commit Bot

Reland "Group tests of Trusted Types for WebUI"

This change groups tests of Trusted Types for WebUI into 20 WebUI pages
per test to minimize the size of the file. This change also fixes a bug
where `CallJavascriptFunction` might be called before allowing JS.
See: crrev.com/c/2237534

Bug: 41905
Change-Id: I2d99b16c9157d8287d777c9a723457d6d10e4304
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238998Reviewed-by: default avatardpapad <dpapad@chromium.org>
Commit-Queue: Jun Kokatsu <Jun.Kokatsu@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#777412}
parent 1db724a2
......@@ -79,6 +79,7 @@ class SystemInfoHandler : public WebUIMessageHandler {
~SystemInfoHandler() override;
// WebUIMessageHandler implementation.
void OnJavascriptDisallowed() override;
void RegisterMessages() override;
// Callback for the "requestSystemInfo" message. This asynchronously requests
......@@ -101,6 +102,10 @@ SystemInfoHandler::SystemInfoHandler() {}
SystemInfoHandler::~SystemInfoHandler() {}
void SystemInfoHandler::OnJavascriptDisallowed() {
weak_ptr_factory_.InvalidateWeakPtrs();
}
void SystemInfoHandler::RegisterMessages() {
web_ui()->RegisterMessageCallback(
"requestSystemInfo",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment