Commit 054f6ac2 authored by Jun Kokatsu's avatar Jun Kokatsu Committed by Commit Bot

Change NoTrustedTypesViolation test to use WaitForLoadStop

This change replaces ExecuteScript with WaitForLoadStop, to remove
flakiness due to timeouts while waiting for ExecuteScript to return.
This change also removes flaky tests from NoTrustedTypesViolation test
which was causing crash due to problem in specific WebUI pages itself.

Bug: 1113504, 1114062, 1114066, 1114074
Change-Id: I3f638792240660caf4b257a201784e7865563e5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2342308
Commit-Queue: Jun Kokatsu <Jun.Kokatsu@microsoft.com>
Reviewed-by: default avatarŁukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Auto-Submit: Jun Kokatsu <Jun.Kokatsu@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#796115}
parent 3d662645
......@@ -159,9 +159,9 @@ class ChromeURLDataManagerTestWithWebUIReportOnlyTrustedTypesEnabled
ASSERT_TRUE(embedded_test_server()->Start());
ui_test_utils::NavigateToURL(browser(), GURL(url));
// Round trip to the renderer to ensure that the page is loaded
EXPECT_TRUE(content::ExecuteScript(content, "var a = 0;"));
// We don't ASSERT_TRUE here because some WebUI pages are by design not
// PAGE_TYPE_NORMAL (e.g. chrome://interstitials/ssl).
content::WaitForLoadStop(content);
EXPECT_TRUE(console_observer.messages().empty());
}
......@@ -180,7 +180,6 @@ IN_PROC_BROWSER_TEST_P(
// This list was derived from chrome://about. :)
static constexpr const char* const kChromeUrls[] = {
"chrome://accessibility",
"chrome://appcache-internals",
"chrome://apps",
"chrome://autofill-internals",
"chrome://blob-internals",
......@@ -196,7 +195,6 @@ static constexpr const char* const kChromeUrls[] = {
"chrome://crashes",
"chrome://credits",
"chrome://device-log",
"chrome://devices",
"chrome://dino",
"chrome://domain-reliability-internals",
"chrome://download-internals",
......@@ -275,7 +273,6 @@ static constexpr const char* const kChromeUrls[] = {
"chrome://add-supervision",
"chrome://assistant-optin",
"chrome://bluetooth-pairing",
"chrome://cellular-setup",
"chrome://certificate-manager",
"chrome://crostini-credits",
"chrome://crostini-installer",
......
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