From d3092785982e33b4514ff5a69453d75d9378ea2d Mon Sep 17 00:00:00 2001 From: Lucas Furukawa Gadani Date: Mon, 2 Sep 2019 13:43:20 +0000 Subject: [PATCH] Bug 1577616 [wpt PR 18757] - Fix CSP frame-ancestors wpt tests., a=testonly Automatic update from web-platform-tests Fix CSP frame-ancestors wpt tests. These tests were broken by https://github.com/web-platform-tests/wpt/commit/38be30e734ea5afcdc5801613f197d17d716674d. Bug: 759184 Change-Id: I39a9bc3da1d5a955975ce35a3201613c4efba010 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1776600 Reviewed-by: Robert Ma Commit-Queue: Lucas Gadani Cr-Commit-Position: refs/heads/master@{#691836} -- wpt-commits: df282228c4a063651299131cb246b71d8c71b3d6 wpt-pr: 18757 --- .../frame-ancestors/support/frame-ancestors-test.sub.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/web-platform/tests/content-security-policy/frame-ancestors/support/frame-ancestors-test.sub.js b/testing/web-platform/tests/content-security-policy/frame-ancestors/support/frame-ancestors-test.sub.js index dde04f0627e1..79b761a05ce5 100644 --- a/testing/web-platform/tests/content-security-policy/frame-ancestors/support/frame-ancestors-test.sub.js +++ b/testing/web-platform/tests/content-security-policy/frame-ancestors/support/frame-ancestors-test.sub.js @@ -26,7 +26,7 @@ window.addEventListener("message", function (e) { window.parent.postMessage(e.data, "*"); else if (e.data.type === 'test_result') - endTest(e.data.failed, "Inner IFrame msg: " + e.data.msg); + endTest(e.data.failed, "Inner IFrame msg: " + e.data.message); }); function injectNestedIframe(policy, parent, child, expectation, isSandboxed) { @@ -67,6 +67,7 @@ function iframeLoaded(expectBlock) { var failed = true; var message = ""; try { + ev.target.contentWindow.location.href; if (expectBlock) { message = "The IFrame should have been blocked (or cross-origin). It wasn't."; failed = true;