Commit 62158e3e authored by Raymes Khoury's avatar Raymes Khoury Committed by Commit Bot

Revert "Enable ClientHintsPersistent feature (Accept-CH-Lifetime header)."

This reverts commit 6af9df3e.

Reason for revert: Caused a regression as outlined in
https://chromium-review.googlesource.com/c/chromium/src/+/957265#message-bfd66cb6916d1397f05a74dd7c1fca4645857147

Original change's description:
> Enable ClientHintsPersistent feature (Accept-CH-Lifetime header).
>
> blink-dev i2s thread: https://groups.google.com/a/chromium.org/d/topic/blink-dev/8RBFue7RMXQ/discussion
>
> Change-Id: I5595b3aed72ea0cece88948f69f480f5808fce6b
> Bug: 735518,782381,816661
> TBR: raymes@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/957265
> Reviewed-by: Tarun Bansal <tbansal@chromium.org>
> Reviewed-by: David Dorwin <ddorwin@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Commit-Queue: Tarun Bansal <tbansal@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#543786}

TBR=ddorwin@chromium.org,raymes@chromium.org,kinuko@chromium.org,tbansal@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 735518, 782381, 816661
Change-Id: I47c42057e7d3158eeb515b993266ce0ff8e937e7
Reviewed-on: https://chromium-review.googlesource.com/968081
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543992}
parent 80fd2c8c
...@@ -705,10 +705,6 @@ IN_PROC_BROWSER_TEST_F(ClientHintsBrowserTest, ...@@ -705,10 +705,6 @@ IN_PROC_BROWSER_TEST_F(ClientHintsBrowserTest,
->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_CLIENT_HINTS, std::string(), ->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_CLIENT_HINTS, std::string(),
&host_settings); &host_settings);
EXPECT_EQ(1u, host_settings.size()); EXPECT_EQ(1u, host_settings.size());
// Clear settings.
HostContentSettingsMapFactory::GetForProfile(browser()->profile())
->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_JAVASCRIPT);
} }
// Ensure that when the JavaScript is blocked, persisted client hints are not // Ensure that when the JavaScript is blocked, persisted client hints are not
...@@ -834,10 +830,6 @@ IN_PROC_BROWSER_TEST_F(ClientHintsBrowserTest, ...@@ -834,10 +830,6 @@ IN_PROC_BROWSER_TEST_F(ClientHintsBrowserTest,
EXPECT_EQ(3u, count_client_hints_headers_seen()); EXPECT_EQ(3u, count_client_hints_headers_seen());
EXPECT_EQ(3u, third_party_request_count_seen()); EXPECT_EQ(3u, third_party_request_count_seen());
EXPECT_EQ(0u, third_party_client_hints_count_seen()); EXPECT_EQ(0u, third_party_client_hints_count_seen());
// Clear settings.
HostContentSettingsMapFactory::GetForProfile(browser()->profile())
->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_JAVASCRIPT);
} }
// Ensure that when the cookies is blocked, client hints are not attached to the // Ensure that when the cookies is blocked, client hints are not attached to the
...@@ -894,10 +886,6 @@ IN_PROC_BROWSER_TEST_F(ClientHintsBrowserTest, ...@@ -894,10 +886,6 @@ IN_PROC_BROWSER_TEST_F(ClientHintsBrowserTest,
EXPECT_EQ(3u, count_client_hints_headers_seen()); EXPECT_EQ(3u, count_client_hints_headers_seen());
EXPECT_EQ(3u, third_party_request_count_seen()); EXPECT_EQ(3u, third_party_request_count_seen());
EXPECT_EQ(0u, third_party_client_hints_count_seen()); EXPECT_EQ(0u, third_party_client_hints_count_seen());
// Clear settings.
HostContentSettingsMapFactory::GetForProfile(browser()->profile())
->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_COOKIES);
} }
// Check the client hints for the given URL in an incognito window. // Check the client hints for the given URL in an incognito window.
......
...@@ -473,19 +473,6 @@ class PepperContentSettingsSpecialCasesJavaScriptBlockedTest ...@@ -473,19 +473,6 @@ class PepperContentSettingsSpecialCasesJavaScriptBlockedTest
content_settings_map->SetDefaultContentSetting( content_settings_map->SetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK); CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK);
} }
void SetUpCommandLine(base::CommandLine* command_line) override {
PepperContentSettingsSpecialCasesTest::SetUpCommandLine(command_line);
// ClientHintsPersistent feature queries the status of JavaScript content
// setting on every page load. When JavaScript is blocked, this results in
// tab_settings->IsContentBlocked(CONTENT_SETTINGS_TYPE_JAVASCRIPT) always
// returning true in RunJavaScriptBlockedTest() method. This interferes with
// the execution of the test.
// TODO: https://crbug.com/822553: Make these tests compatible with the
// client hints feature.
command_line->AppendSwitchASCII("disable-blink-features",
"ClientHintsPersistent");
}
}; };
// A sanity check to verify that the plugin that is used as a baseline below // A sanity check to verify that the plugin that is used as a baseline below
......
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
}, },
{ {
name: "ClientHintsPersistent", name: "ClientHintsPersistent",
status: "stable", status: "experimental",
}, },
{ {
name: "ClientPlaceholdersForServerLoFi", name: "ClientPlaceholdersForServerLoFi",
......
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