Commit 53a044e2 authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Make HTML Imports deprecation message respect origin trials

Prior to this CL, the HTML Imports deprecation message would only
be shown if HTML Imports was enabled directly by a command line
flag. It would not show if the page being visited was participating
in the Web Components v0 origin trial, and enabled the feature
that way.

Bug: 911943
Change-Id: I8884ea755fdcdd69e2af57c6f131eed83f76b4f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1876799
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708810}
parent 22160e7a
...@@ -69,7 +69,7 @@ void HTMLLinkElement::ParseAttribute( ...@@ -69,7 +69,7 @@ void HTMLLinkElement::ParseAttribute(
if (name == html_names::kRelAttr) { if (name == html_names::kRelAttr) {
rel_attribute_ = LinkRelAttribute(value); rel_attribute_ = LinkRelAttribute(value);
if (rel_attribute_.IsImport() && if (rel_attribute_.IsImport() &&
RuntimeEnabledFeatures::HTMLImportsEnabledByRuntimeFlag()) { RuntimeEnabledFeatures::HTMLImportsEnabled(&GetDocument())) {
Deprecation::CountDeprecation(&GetDocument(), WebFeature::kHTMLImports); Deprecation::CountDeprecation(&GetDocument(), WebFeature::kHTMLImports);
} }
rel_list_->DidUpdateAttributeValue(params.old_value, value); rel_list_->DidUpdateAttributeValue(params.old_value, value);
......
This is a testharness.js-based test.
FAIL Comfirm HTMLImportsOnReverseOriginTrials counter assert_true: expected true got false
Harness: the test ran to completion.
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