Commit eede72d0 authored by Findit's avatar Findit

Revert "Clean up the NoTrustedTypesViolation test"

This reverts commit da4ef766.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 840628 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2RhNGVmNzY2NTdjMWMzM2RjMGM0MWU5YTY1NzE0M2U4NDNjZWM2ODYM

Sample Failed Build: https://ci.chromium.org/b/8858824985500220208

Sample Failed Step: browser_tests

Original change's description:
> Clean up the NoTrustedTypesViolation test
> 
> This change clean up unnecessary test cases in the
> NoTrustedTypesViolation test. Also added few things that makes
> debugging of the test failure more easier.
> 
> Bug: 1115643
> Change-Id: I12e77b3038046337f8002850f5c28806dd722acd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2610486
> Reviewed-by: dpapad <dpapad@chromium.org>
> Commit-Queue: Jun Kokatsu <Jun.Kokatsu@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#840628}


Change-Id: Icefeac0f9258222a5deb35ec91e9abfb6ef4ebce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1115643
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2613590
Cr-Commit-Position: refs/heads/master@{#840821}
parent d6a18192
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "base/logging.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"
#include "build/build_config.h" #include "build/build_config.h"
...@@ -157,15 +156,9 @@ class ChromeURLDataManagerWebUITrustedTypesTest ...@@ -157,15 +156,9 @@ class ChromeURLDataManagerWebUITrustedTypesTest
ASSERT_TRUE(embedded_test_server()->Start()); ASSERT_TRUE(embedded_test_server()->Start());
ui_test_utils::NavigateToURL(browser(), GURL(url)); ui_test_utils::NavigateToURL(browser(), GURL(url));
// We don't ASSERT_TRUE here because some WebUI pages are by design not
if (url == "chrome://network-error" || url == "chrome://dino") { // PAGE_TYPE_NORMAL (e.g. chrome://interstitials/ssl).
// We don't ASSERT_TRUE here because some WebUI pages are content::WaitForLoadStop(content);
// PAGE_TYPE_ERROR by design.
content::WaitForLoadStop(content);
} else {
ASSERT_TRUE(content::WaitForLoadStop(content));
}
EXPECT_TRUE(console_observer.messages().empty()); EXPECT_TRUE(console_observer.messages().empty());
} }
}; };
...@@ -173,7 +166,6 @@ class ChromeURLDataManagerWebUITrustedTypesTest ...@@ -173,7 +166,6 @@ class ChromeURLDataManagerWebUITrustedTypesTest
// Verify that there's no Trusted Types violation in chrome://chrome-urls // Verify that there's no Trusted Types violation in chrome://chrome-urls
IN_PROC_BROWSER_TEST_P(ChromeURLDataManagerWebUITrustedTypesTest, IN_PROC_BROWSER_TEST_P(ChromeURLDataManagerWebUITrustedTypesTest,
NoTrustedTypesViolation) { NoTrustedTypesViolation) {
LOG(INFO) << "Navigating to " << GetParam();
CheckTrustedTypesViolation(GetParam()); CheckTrustedTypesViolation(GetParam());
} }
...@@ -184,18 +176,23 @@ static constexpr const char* const kChromeUrls[] = { ...@@ -184,18 +176,23 @@ static constexpr const char* const kChromeUrls[] = {
// TODO(crbug.com/1114074): DCHECK failure when opening // TODO(crbug.com/1114074): DCHECK failure when opening
// chrome://appcache-internals. // chrome://appcache-internals.
// "chrome://appcache-internals", // "chrome://appcache-internals",
"chrome://apps",
"chrome://autofill-internals", "chrome://autofill-internals",
"chrome://blob-internals", "chrome://blob-internals",
"chrome://bluetooth-internals", "chrome://bluetooth-internals",
"chrome://bookmarks", "chrome://bookmarks",
"chrome://browser-switch",
"chrome://chrome-urls", "chrome://chrome-urls",
"chrome://components", "chrome://components",
"chrome://conflicts",
"chrome://connection-help", "chrome://connection-help",
"chrome://connection-monitoring-detected", "chrome://connection-monitoring-detected",
"chrome://conversion-internals", "chrome://conversion-internals",
"chrome://crashes", "chrome://crashes",
"chrome://credits", "chrome://credits",
"chrome://device-log", "chrome://device-log",
// TODO(crbug.com/1114062): Crash when closing chrome://devices.
// "chrome://devices",
"chrome://dino", "chrome://dino",
// TODO(crbug.com/1113446): Test failure due to excessive output. // TODO(crbug.com/1113446): Test failure due to excessive output.
// "chrome://discards", // "chrome://discards",
...@@ -218,6 +215,7 @@ static constexpr const char* const kChromeUrls[] = { ...@@ -218,6 +215,7 @@ static constexpr const char* const kChromeUrls[] = {
"chrome://invalidations", "chrome://invalidations",
"chrome://local-state", "chrome://local-state",
"chrome://management", "chrome://management",
"chrome://md-user-manager",
"chrome://media-engagement", "chrome://media-engagement",
"chrome://media-feeds", "chrome://media-feeds",
"chrome://media-history", "chrome://media-history",
...@@ -231,6 +229,7 @@ static constexpr const char* const kChromeUrls[] = { ...@@ -231,6 +229,7 @@ static constexpr const char* const kChromeUrls[] = {
"chrome://network-errors", "chrome://network-errors",
"chrome://new-tab-page", "chrome://new-tab-page",
"chrome://newtab", "chrome://newtab",
"chrome://notifications-internals",
"chrome://ntp-tiles-internals", "chrome://ntp-tiles-internals",
"chrome://omnibox", "chrome://omnibox",
"chrome://password-manager-internals", "chrome://password-manager-internals",
...@@ -248,8 +247,10 @@ static constexpr const char* const kChromeUrls[] = { ...@@ -248,8 +247,10 @@ static constexpr const char* const kChromeUrls[] = {
// TODO(crbug.com/1115600): DCHECK failure when opening // TODO(crbug.com/1115600): DCHECK failure when opening
// chrome://signin-dice-web-intercept. // chrome://signin-dice-web-intercept.
// "chrome://signin-dice-web-intercept", // "chrome://signin-dice-web-intercept",
"chrome://signin-email-confirmation",
"chrome://signin-internals", "chrome://signin-internals",
"chrome://site-engagement", "chrome://site-engagement",
"chrome://snippets-internals",
"chrome://suggestions", "chrome://suggestions",
// TODO(crbug.com/1099564): Navigating to chrome://sync-confirmation and // TODO(crbug.com/1099564): Navigating to chrome://sync-confirmation and
// quickly navigating away cause DCHECK failure. // quickly navigating away cause DCHECK failure.
...@@ -269,12 +270,12 @@ static constexpr const char* const kChromeUrls[] = { ...@@ -269,12 +270,12 @@ static constexpr const char* const kChromeUrls[] = {
"chrome://version", "chrome://version",
"chrome://webrtc-internals", "chrome://webrtc-internals",
"chrome://webrtc-logs", "chrome://webrtc-logs",
"chrome://welcome",
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
"chrome://explore-sites-internals", "chrome://explore-sites-internals",
"chrome://internals/notifications", "chrome://internals/notifications",
"chrome://internals/query-tiles", "chrome://internals/query-tiles",
"chrome://offline-internals", "chrome://offline-internals",
"chrome://snippets-internals",
"chrome://webapks", "chrome://webapks",
#endif #endif
#if BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH)
...@@ -294,6 +295,7 @@ static constexpr const char* const kChromeUrls[] = { ...@@ -294,6 +295,7 @@ static constexpr const char* const kChromeUrls[] = {
"chrome://crostini-installer", "chrome://crostini-installer",
"chrome://cryptohome", "chrome://cryptohome",
"chrome://drive-internals", "chrome://drive-internals",
"chrome://first-run",
"chrome://help-app", "chrome://help-app",
"chrome://internet-config-dialog", "chrome://internet-config-dialog",
"chrome://internet-detail-dialog", "chrome://internet-detail-dialog",
...@@ -312,17 +314,11 @@ static constexpr const char* const kChromeUrls[] = { ...@@ -312,17 +314,11 @@ static constexpr const char* const kChromeUrls[] = {
"chrome://smb-share-dialog", "chrome://smb-share-dialog",
"chrome://supervised-user-internals", "chrome://supervised-user-internals",
"chrome://sys-internals", "chrome://sys-internals",
// TODO(crbug.com/1115643): DCHECK failure when opening
// chrome-untrusted://crosh.
// "chrome-untrusted://crosh",
"chrome-untrusted://terminal", "chrome-untrusted://terminal",
#endif #endif
#if !BUILDFLAG(IS_CHROMEOS_ASH)
"chrome://apps",
"chrome://browser-switch",
"chrome://md-user-manager",
"chrome://signin-email-confirmation",
#endif
#if defined(OS_WIN)
"chrome://conflicts",
#endif
}; };
INSTANTIATE_TEST_SUITE_P(, INSTANTIATE_TEST_SUITE_P(,
......
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