Skip to content

Commit

Permalink
Rename Feature Policy: document-stream-insertion
Browse files Browse the repository at this point in the history
It was proposed here w3c/webappsec-permissions-policy#172
that "document-write" is a better name for this feature. This CL makes
the naming change correspondingly.

Bug: 841605
Change-Id: Id0a928fd3f6669eb3700736ff5770d4717d2b414
Reviewed-on: https://chromium-review.googlesource.com/1095328
Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566829}
  • Loading branch information
ehsan-karamad authored and chromium-wpt-export-bot committed Jun 13, 2018
1 parent 5f202c8 commit a027205
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
@@ -1,5 +1,5 @@
<!doctype html>
<title>'document-stream-insertion' tests</title>
<title>'document-write' tests</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/feature-policy/experimental-features/resources/common.js"></script>
Expand All @@ -14,7 +14,7 @@
"use strict";

let iframeElement = document.querySelector("iframe");
let url = url_base + "document-stream-insertion.html";
let url = url_base + "document-write.html";

let text_to_write = "<div>FOO<\/div>";
let test_cases = [{
Expand All @@ -38,7 +38,7 @@
expected_value_enabled: "FOO"
}];

// The feature 'document-stream-insertion' is enabled by default and when it
// The feature 'document-write' is enabled by default and when it
// is enabled, all dynamic markup insertion API work as intended.
test_cases.forEach((tc) => {
promise_test(async() => {
Expand All @@ -59,10 +59,10 @@
});


// Disabling 'document-stream-insertion' throws exception on the included API.
// Disabling 'document-write' throws exception on the included API.
test_cases.forEach((tc) => {
promise_test(async() => {
setFeatureState(iframeElement, "document-stream-insertion", "'none'");
setFeatureState(iframeElement, "document-write", "'none'");
await loadUrlInIframe(iframeElement, url);
await sendMessageAndGetResponse(iframeElement.contentWindow, tc).then((response) => {
assert_true(
Expand Down

0 comments on commit a027205

Please sign in to comment.