Commit ed45cd43 authored by Jason Chase's avatar Jason Chase Committed by Commit Bot

Allow insecure origins for WebComponents V0 origin trial

Configure WebComponents V0 as a "deprecation" trial, and allow it to be
enabled in insecure contexts. This does not automatically enable the
trial for insecure contexts, rather makes it possible if an appropriate
trial token is provided. The origin trials registration process must
first issue a token for an insecure origin, which isn't supported yet.

For more context, see https://groups.google.com/a/chromium.org/forum/#!topic/blink-api-owners-discuss/HFOi0lmgonY/discussion

Bug: 1027546
Change-Id: Iec184f3ba54feb53b7b40b8b8e113b4011b6bbc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1953323
Commit-Queue: Jason Chase <chasej@chromium.org>
Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722551}
parent 7d8611fa
......@@ -538,6 +538,8 @@
{
name: "CustomElementsV0",
origin_trial_feature_name: "WebComponentsV0",
origin_trial_type: "deprecation",
origin_trial_allows_insecure: true,
status: "test",
},
{
......@@ -794,6 +796,8 @@
{
name: "HTMLImports",
origin_trial_feature_name: "WebComponentsV0",
origin_trial_type: "deprecation",
origin_trial_allows_insecure: true,
status: "test",
},
{
......@@ -1544,6 +1548,8 @@
{
name: "ShadowDOMV0",
origin_trial_feature_name: "WebComponentsV0",
origin_trial_type: "deprecation",
origin_trial_allows_insecure: true,
status: "test",
},
{
......
<!DOCTYPE html>
<meta charset="utf-8">
<!-- NOTE: The token must match the UNAUTHENTICATED_ORIGIN used in the test.
Generate this token with the command:
generate_token.py http://example.test:8000 WebComponentsV0 --expire-timestamp=2000000000
-->
<meta http-equiv="origin-trial" content="ApvQmWyEJ1hMIUp80AK+wjmYaGlmF2UA9MSWCt5vej5J+gj5XsYaAyyczK5df2RvdvrgZ8YloMdZRXp3v1pi9AoAAABaeyJvcmlnaW4iOiAiaHR0cDovL2V4YW1wbGUudGVzdDo4MDAwIiwgImZlYXR1cmUiOiAiV2ViQ29tcG9uZW50c1YwIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9"/>
<link id="target" rel="import" href="resources/html-imports-hello.html">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/get-host-info.js"></script>
<script>
if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
window.location = get_host_info().UNAUTHENTICATED_ORIGIN +
window.location.pathname;
} else {
test(() => {
assert_equals(target.import.querySelector('h1').textContent, 'Hello');
}, 'Basic html file should be imported in insecure context');
}
</script>
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