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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/referrer-policy/generic/subresource-test/script-messaging.html

Issue 2697453005: Import wpt@758b3b4cfa805067f36121333ba031e583d3a62c (Closed)
Patch Set: Add -expected.txt files. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!-- TODO(kristijanburnik): Remove subres. duplication. Reuse a template. -->
3 <html>
4 <head>
5 <title>Script messaging - cross-origin Script request</title>
6 <script src="/resources/testharness.js"></script>
7 <script src="/resources/testharnessreport.js"></script>
8 <!-- Common global functions for referrer-policy tests. -->
9 <script src="/referrer-policy/generic/common.js"></script>
10 </head>
11 <body>
12 <h1>Script messaging - cross-origin Script request</h1>
13 <p>If you can read JSON encoded HTTP request headers of the Script below,
14 the messaging works as expected.</p>
15
16 <pre id="received_message">Running...</pre>
17
18 <script>
19 var messaging_test = async_test("Script is responding with HTTP headers");
20 var urlPath = '/referrer-policy/generic/subresource/script.py';
21 var url = location.protocol + "//www1." + location.hostname + ":" + locati on.port +
22 urlPath;
23 queryScript(url, function(message) {
24 var pre = document.getElementById('received_message')
25 var headers = message.headers;
26 pre.innerHTML = "";
27 pre.innerHTML += url + ":\n\n";
28 pre.innerHTML += JSON.stringify(headers, null, 2) + "\n\n"
29 messaging_test.step(function() {
30 assert_own_property(headers, "host")
31 assert_own_property(headers, "connection")
32 });
33 messaging_test.done();
34 });
35 </script>
36
37 <div id="log"></div>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698