Commit 1b6437f1 authored by Fergal Daly's avatar Fergal Daly Committed by Commit Bot

Remove spurious parens from test responses.

Change-Id: I5f4e72e22247b16424230fcf6bbdcb7b3c147db6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1852351
Commit-Queue: Fergal Daly <fergal@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705410}
parent 997db671
......@@ -55,9 +55,9 @@ TEST_F(SchedulingAffectingFeaturesTest, WebSocketStopsThrottling) {
testing::UnorderedElementsAre());
main_resource.Complete(
"(<script>"
"<script>"
" var socket = new WebSocket(\"ws://www.example.com/websocket\");"
"</script>)");
"</script>");
EXPECT_TRUE(PageScheduler()->OptedOutFromAggressiveThrottlingForTest());
EXPECT_THAT(
......@@ -83,9 +83,9 @@ TEST_F(SchedulingAffectingFeaturesTest, WebRTCStopsThrottling) {
testing::UnorderedElementsAre());
main_resource.Complete(
"(<script>"
"<script>"
" var data_channel = new RTCPeerConnection();"
"</script>)");
"</script>");
EXPECT_TRUE(PageScheduler()->OptedOutFromAggressiveThrottlingForTest());
EXPECT_THAT(
......@@ -173,9 +173,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_PageShow) {
SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/");
main_resource.Complete(
"(<script>"
"<script>"
" window.addEventListener(\"pageshow\", () => {}); "
"</script>)");
"</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre(
......@@ -186,9 +186,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_PageHide) {
SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/");
main_resource.Complete(
"(<script>"
"<script>"
" window.addEventListener(\"pagehide\", () => {}); "
"</script>)");
"</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre(
......@@ -199,9 +199,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_BeforeUnload) {
SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/");
main_resource.Complete(
"(<script>"
"<script>"
" window.addEventListener(\"beforeunload\", () => {}); "
"</script>)");
"</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre(
......@@ -212,9 +212,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_Unload) {
SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/");
main_resource.Complete(
"(<script>"
"<script>"
" window.addEventListener(\"unload\", () => {}); "
"</script>)");
"</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre(
......@@ -225,9 +225,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_Freeze) {
SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/");
main_resource.Complete(
"(<script>"
"<script>"
" window.addEventListener(\"freeze\", () => {}); "
"</script>)");
"</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre(
......@@ -238,9 +238,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_Resume) {
SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/");
main_resource.Complete(
"(<script>"
"<script>"
" window.addEventListener(\"resume\", () => {}); "
"</script>)");
"</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre(
......@@ -274,9 +274,9 @@ TEST_F(SchedulingAffectingFeaturesTest, WebLocks) {
SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/");
main_resource.Complete(
"(<script>"
"<script>"
" navigator.locks.request('my_resource', async lock => {}); "
"</script>)");
"</script>");
EXPECT_THAT(
GetNonTrivialMainFrameFeatures(),
......
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