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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/blink-contrib/filesystem-urls-match-filesystem.sub.html

Issue 2695813009: Import wpt@503f5b5f78ec4e87d144f78609f363f0ed0ea8db (Closed)
Patch Set: Skip some tests 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 <html>
3
4 <head>
5 <!-- Programmatically converted from a WebKit Reftest, please forgive result ing idiosyncracies.-->
6 <title>filesystem-urls-match-filesystem</title>
7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script>
9 <script src='../support/logTest.sub.js?logs=["PASS (1/1)"]'></script>
10 <script src="../support/alertAssert.sub.js?alerts=[]"></script>
11 <!-- enforcing policy:
12 script-src 'self' 'unsafe-inline' 'unsafe-inline' 'self'; connect-src 'self';
13 -->
14 </head>
15
16 <body>
17 <p>
18 filesystem: URLs are same-origin with the page in which they were create d, but explicitly do not match the &apos;self&apos; or &apos;*&apos; source in C SP directives because they are more akin to 'unsafe-inline' content, but should match filesystem: source.
19 </p>
20 <script>
21 if(!window.webkitRequestFileSystem) {
22 t_log.set_status(t_log.NOTRUN, "No filesystem:// support, cannot run test.");
23 t_log.phase = t_log.phases.HAS_RESULT;
24 t_log.done();
25 } else {
26 function pass() {
27 log("PASS (1/1)");
28 }
29 window.webkitRequestFileSystem(
30 TEMPORARY, 1024 * 1024 /*1MB*/ , function(fs) {
31 fs.root.getFile('pass.js', {
32 create: true
33 }, function(fileEntry) {
34 fileEntry.createWriter(function(fileWriter) {
35 fileWriter.onwriteend = function(e) {
36 var script = document.createElement('script');
37 script.src = fileEntry.toURL('application/javasc ript');
38 document.body.appendChild(script);
39 };
40 // Create a new Blob and write it to pass.js.
41 var b = new Blob(['pass();'], {
42 type: 'application/javascript'
43 });
44 fileWriter.write(b);
45 });
46 });
47 });
48 var s = document.createElement('script');
49 s.async = true;
50 s.defer = true;
51 s.src = "../support/checkReport.sub.js?reportExists=false"
52 document.lastChild.appendChild(s);
53 }
54
55 </script>
56 <div id="log"></div>
57 </body>
58
59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698