Commit 0d261a31 authored by Nasko Oskov's avatar Nasko Oskov Committed by Commit Bot

Update and enable WebNavigationApiTest.Crash test.

This test was disabled on some bots due to flakiness. I am updating the
test to explicitly wait for process crash, which will likely eliminate
the source of flakiness and updating some of the code to take advantage
of newer test methods instead of using base::StringPrintf.

Bug: 974787
Change-Id: I68182c88905f187b972d93da3504e701a82b96d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2159318Reviewed-by: default avatarAaron Colwell <acolwell@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761113}
parent f558c1ad
...@@ -517,15 +517,7 @@ IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, PendingDeletion) { ...@@ -517,15 +517,7 @@ IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, PendingDeletion) {
ASSERT_TRUE(RunExtensionTest("webnavigation/pendingDeletion")) << message_; ASSERT_TRUE(RunExtensionTest("webnavigation/pendingDeletion")) << message_;
} }
// TODO(jam): http://crbug.com/350550 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, Crash) {
// TODO(crbug/974787): Flaky on Win7 debug builds.
#if (defined(OS_CHROMEOS) && defined(ADDRESS_SANITIZER)) || \
(defined(OS_WIN) && !(defined(NDEBUG)))
#define MAYBE_Crash DISABLED_Crash
#else
#define MAYBE_Crash Crash
#endif
IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Crash) {
content::ScopedAllowRendererCrashes scoped_allow_renderer_crashes; content::ScopedAllowRendererCrashes scoped_allow_renderer_crashes;
ASSERT_TRUE(StartEmbeddedTestServer()); ASSERT_TRUE(StartEmbeddedTestServer());
...@@ -537,18 +529,17 @@ IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Crash) { ...@@ -537,18 +529,17 @@ IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Crash) {
ResultCatcher catcher; ResultCatcher catcher;
GURL url(base::StringPrintf( GURL url(embedded_test_server()->GetURL(
"http://www.a.com:%u/" "www.a.com", "/extensions/api_test/webnavigation/crash/a.html"));
"extensions/api_test/webnavigation/crash/a.html",
embedded_test_server()->port()));
ui_test_utils::NavigateToURL(browser(), url); ui_test_utils::NavigateToURL(browser(), url);
content::RenderProcessHostWatcher process_watcher(
tab, content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
ui_test_utils::NavigateToURL(browser(), GURL(content::kChromeUICrashURL)); ui_test_utils::NavigateToURL(browser(), GURL(content::kChromeUICrashURL));
process_watcher.Wait();
url = GURL(base::StringPrintf( url = GURL(embedded_test_server()->GetURL(
"http://www.a.com:%u/" "www.a.com", "/extensions/api_test/webnavigation/crash/b.html"));
"extensions/api_test/webnavigation/crash/b.html",
embedded_test_server()->port()));
ui_test_utils::NavigateToURL(browser(), url); ui_test_utils::NavigateToURL(browser(), url);
ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
......
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