Commit b111570d authored by Jun Kokatsu's avatar Jun Kokatsu Committed by Commit Bot

Fix a Truested Type violation on chrome://internals/web-app

This fixes a TT violation on chrome://internals/web-app by disabling
Trusted Types. This is necessary because the page uses Polymer 3
which is yet to support Trusted Types. This change also added few
tests that were missing.

Bug: 41905
Change-Id: I800ea96c2d487988da4a85f8df69a5a2691722ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2376989Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Jun Kokatsu <Jun.Kokatsu@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#802010}
parent 9ca85e29
...@@ -208,6 +208,7 @@ static constexpr const char* const kChromeUrls[] = { ...@@ -208,6 +208,7 @@ static constexpr const char* const kChromeUrls[] = {
"chrome://identity-internals", "chrome://identity-internals",
"chrome://indexeddb-internals", "chrome://indexeddb-internals",
"chrome://inspect", "chrome://inspect",
"chrome://internals/web-app",
"chrome://interstitials/ssl", "chrome://interstitials/ssl",
"chrome://interventions-internals", "chrome://interventions-internals",
"chrome://invalidations", "chrome://invalidations",
...@@ -271,6 +272,8 @@ static constexpr const char* const kChromeUrls[] = { ...@@ -271,6 +272,8 @@ static constexpr const char* const kChromeUrls[] = {
"chrome://welcome", "chrome://welcome",
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
"chrome://explore-sites-internals", "chrome://explore-sites-internals",
"chrome://internals/notifications",
"chrome://internals/query-tiles",
"chrome://offline-internals", "chrome://offline-internals",
"chrome://webapks", "chrome://webapks",
#endif #endif
......
...@@ -23,6 +23,7 @@ WebAppInternalsPageHandlerImpl::~WebAppInternalsPageHandlerImpl() = default; ...@@ -23,6 +23,7 @@ WebAppInternalsPageHandlerImpl::~WebAppInternalsPageHandlerImpl() = default;
void WebAppInternalsPageHandlerImpl::AddPageResources( void WebAppInternalsPageHandlerImpl::AddPageResources(
content::WebUIDataSource* source) { content::WebUIDataSource* source) {
source->DisableTrustedTypesCSP();
source->AddResourcePath("web_app_internals.mojom-lite.js", source->AddResourcePath("web_app_internals.mojom-lite.js",
IDR_WEB_APP_INTERNALS_MOJOM_LITE_JS); IDR_WEB_APP_INTERNALS_MOJOM_LITE_JS);
source->AddResourcePath("web_app_internals.js", IDR_WEB_APP_INTERNALS_JS); source->AddResourcePath("web_app_internals.js", IDR_WEB_APP_INTERNALS_JS);
......
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