Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-vs-shift-click.html

Issue 2689483007: Tests of ctrl-click can't postMessage to opener - using custom text instead. (Closed)
Patch Set: Rebasing... Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-vs-shift-click.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-vs-shift-click.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-vs-shift-click.html
index fa0d006dba7772105a532d4c9713441982a38ef9..a49799929467f5945958a3d3294852ab5c7a3b9b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-vs-shift-click.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-vs-shift-click.html
@@ -6,8 +6,6 @@
<p>This is a regression test for https://crbug.com/658701</p>
</div>
<div id="log"></div>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
<iframe id="iframe"
srcdoc="
&lt;p&gt;frame-src-vs-shift-click-FRAME.html:
@@ -17,41 +15,11 @@
&lt;/p&gt;
"></iframe>
<script>
-var test = async_test("Testing frame-src vs shift-click");
-
-function concludeTest(data)
-{
- test.step(function() {
- assert_equals(
- data["window.location.href"],
- 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/frame-src-vs-shift-click-target.html',
- "Test should be finished from frame-src-vs-shift-click-target.html");
- assert_equals(
- data["history.length"],
- 1,
- "frame-src-vs-shift-click-target.html should be in a fresh window");
- assert_true(
- data["window.self == window.parent"],
- "frame-src-vs-shift-click-target.html should be the main frame");
- });
-
- document.getElementById('container').outerHTML = '';
- test.done();
-}
-
if (window.testRunner) {
+ testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.setCloseRemainingWindowsWhenComplete(true);
-
- // Shift-clicking doesn't set window.opener, so we allow the new window
- // to find the opener using the name being set below.
- // TODO(lukasza): After fixing https://crbug.com/658386, the test will
- // need to use another mechanism for communicating verification results
- // (most likely OOPIF-replicated testRunner.setCustomTextOutput).
- window.name = "mainTestWindow";
- window.addEventListener('message', function(e) {
- concludeTest(e.data);
- });
+ testRunner.waitUntilDone();
window.onload = function() {
var iframe = document.getElementById("iframe");

Powered by Google App Engine
This is Rietveld 408576698