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) { ...@@ -55,9 +55,9 @@ TEST_F(SchedulingAffectingFeaturesTest, WebSocketStopsThrottling) {
testing::UnorderedElementsAre()); testing::UnorderedElementsAre());
main_resource.Complete( main_resource.Complete(
"(<script>" "<script>"
" var socket = new WebSocket(\"ws://www.example.com/websocket\");" " var socket = new WebSocket(\"ws://www.example.com/websocket\");"
"</script>)"); "</script>");
EXPECT_TRUE(PageScheduler()->OptedOutFromAggressiveThrottlingForTest()); EXPECT_TRUE(PageScheduler()->OptedOutFromAggressiveThrottlingForTest());
EXPECT_THAT( EXPECT_THAT(
...@@ -83,9 +83,9 @@ TEST_F(SchedulingAffectingFeaturesTest, WebRTCStopsThrottling) { ...@@ -83,9 +83,9 @@ TEST_F(SchedulingAffectingFeaturesTest, WebRTCStopsThrottling) {
testing::UnorderedElementsAre()); testing::UnorderedElementsAre());
main_resource.Complete( main_resource.Complete(
"(<script>" "<script>"
" var data_channel = new RTCPeerConnection();" " var data_channel = new RTCPeerConnection();"
"</script>)"); "</script>");
EXPECT_TRUE(PageScheduler()->OptedOutFromAggressiveThrottlingForTest()); EXPECT_TRUE(PageScheduler()->OptedOutFromAggressiveThrottlingForTest());
EXPECT_THAT( EXPECT_THAT(
...@@ -173,9 +173,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_PageShow) { ...@@ -173,9 +173,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_PageShow) {
SimRequest main_resource("https://foo.com/", "text/html"); SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/"); LoadURL("https://foo.com/");
main_resource.Complete( main_resource.Complete(
"(<script>" "<script>"
" window.addEventListener(\"pageshow\", () => {}); " " window.addEventListener(\"pageshow\", () => {}); "
"</script>)"); "</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(), EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre( testing::UnorderedElementsAre(
...@@ -186,9 +186,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_PageHide) { ...@@ -186,9 +186,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_PageHide) {
SimRequest main_resource("https://foo.com/", "text/html"); SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/"); LoadURL("https://foo.com/");
main_resource.Complete( main_resource.Complete(
"(<script>" "<script>"
" window.addEventListener(\"pagehide\", () => {}); " " window.addEventListener(\"pagehide\", () => {}); "
"</script>)"); "</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(), EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre( testing::UnorderedElementsAre(
...@@ -199,9 +199,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_BeforeUnload) { ...@@ -199,9 +199,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_BeforeUnload) {
SimRequest main_resource("https://foo.com/", "text/html"); SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/"); LoadURL("https://foo.com/");
main_resource.Complete( main_resource.Complete(
"(<script>" "<script>"
" window.addEventListener(\"beforeunload\", () => {}); " " window.addEventListener(\"beforeunload\", () => {}); "
"</script>)"); "</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(), EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre( testing::UnorderedElementsAre(
...@@ -212,9 +212,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_Unload) { ...@@ -212,9 +212,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_Unload) {
SimRequest main_resource("https://foo.com/", "text/html"); SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/"); LoadURL("https://foo.com/");
main_resource.Complete( main_resource.Complete(
"(<script>" "<script>"
" window.addEventListener(\"unload\", () => {}); " " window.addEventListener(\"unload\", () => {}); "
"</script>)"); "</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(), EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre( testing::UnorderedElementsAre(
...@@ -225,9 +225,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_Freeze) { ...@@ -225,9 +225,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_Freeze) {
SimRequest main_resource("https://foo.com/", "text/html"); SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/"); LoadURL("https://foo.com/");
main_resource.Complete( main_resource.Complete(
"(<script>" "<script>"
" window.addEventListener(\"freeze\", () => {}); " " window.addEventListener(\"freeze\", () => {}); "
"</script>)"); "</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(), EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre( testing::UnorderedElementsAre(
...@@ -238,9 +238,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_Resume) { ...@@ -238,9 +238,9 @@ TEST_F(SchedulingAffectingFeaturesTest, EventListener_Resume) {
SimRequest main_resource("https://foo.com/", "text/html"); SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/"); LoadURL("https://foo.com/");
main_resource.Complete( main_resource.Complete(
"(<script>" "<script>"
" window.addEventListener(\"resume\", () => {}); " " window.addEventListener(\"resume\", () => {}); "
"</script>)"); "</script>");
EXPECT_THAT(GetNonTrivialMainFrameFeatures(), EXPECT_THAT(GetNonTrivialMainFrameFeatures(),
testing::UnorderedElementsAre( testing::UnorderedElementsAre(
...@@ -274,9 +274,9 @@ TEST_F(SchedulingAffectingFeaturesTest, WebLocks) { ...@@ -274,9 +274,9 @@ TEST_F(SchedulingAffectingFeaturesTest, WebLocks) {
SimRequest main_resource("https://foo.com/", "text/html"); SimRequest main_resource("https://foo.com/", "text/html");
LoadURL("https://foo.com/"); LoadURL("https://foo.com/");
main_resource.Complete( main_resource.Complete(
"(<script>" "<script>"
" navigator.locks.request('my_resource', async lock => {}); " " navigator.locks.request('my_resource', async lock => {}); "
"</script>)"); "</script>");
EXPECT_THAT( EXPECT_THAT(
GetNonTrivialMainFrameFeatures(), 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