Commit 5068f312 authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

Prepare browser tests for NoRendererCrashesAssertion.

This CL adds ScopedAllowRendererCrashes to browser tests that
(expectedly or unexpectedly) might trigger a renderer crash.

Right now a browser test might pass, even if a renderer process crashed
during the test execution.  After https://crrev.com/c/1650463 a renderer
crash will trigger an explicit test failure, but before this enforcement
can start, existing tests that experience renderer crashes (expectedly
or unexpectedly) need to declare this via ScopedAllowRendererCrashes.

This CL was uploaded by git cl split.

R=lfg@chromium.org

Bug: 972220
Change-Id: Ia48b122e05426652171a4bbe3f95fef603823f15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1652379
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: default avatarLucas Gadani <lfg@chromium.org>
Commit-Queue: Lucas Gadani <lfg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668430}
parent 4a1b6337
......@@ -28,6 +28,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/hit_test_region_observer.h"
#include "content/public/test/no_renderer_crashes_assertion.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/api/extensions_api_client.h"
......@@ -402,6 +403,7 @@ IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestCustomElementCallbacksInaccessible) {
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestAssignSrcAfterCrash) {
content::ScopedAllowRendererCrashes scoped_allow_renderer_crashes;
RunTest("testAssignSrcAfterCrash", "web_view/apitest");
}
......@@ -551,6 +553,7 @@ IN_PROC_BROWSER_TEST_F(WebViewAPITest,
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestEventName) {
content::ScopedAllowRendererCrashes scoped_allow_renderer_crashes;
RunTest("testEventName", "web_view/apitest");
}
......@@ -716,6 +719,8 @@ IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestReassignSrcAttribute) {
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestRemoveWebviewOnExit) {
content::ScopedAllowRendererCrashes scoped_allow_renderer_crashes;
std::string app_location = "web_view/apitest";
StartTestServer(app_location);
......@@ -752,6 +757,7 @@ IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestReload) {
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestReloadAfterTerminate) {
content::ScopedAllowRendererCrashes scoped_allow_renderer_crashes;
RunTest("testReloadAfterTerminate", "web_view/apitest");
}
......@@ -774,6 +780,7 @@ IN_PROC_BROWSER_TEST_F(WebViewAPITest, MAYBE_TestResizeWebviewResizesContent) {
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestTerminateAfterExit) {
content::ScopedAllowRendererCrashes scoped_allow_renderer_crashes;
RunTest("testTerminateAfterExit", "web_view/apitest");
}
......
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