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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/preload/meta-csp.html

Issue 2242223003: Preload tokens even if a <meta> csp tag is found (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less refactoring Created 4 years, 4 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 <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-in line'; font-src 'none'">
Mike West 2016/08/19 09:25:41 Can you add a more complicated test as well? Somet
3 <script>
4 var boundedStart = performance.now();
5 </script>
6 <script src="../resources/testharness.js"></script>
7 <script src="../resources/testharnessreport.js"></script>
8 <link rel=preload href="../resources/Ahem.ttf" as=font crossorigin>
9 <script>
10 var t = async_test("Ensure preloads occur when csp meta tags are in the markup ");
11 window.addEventListener("load", t.step_func(function() {
12 var fonts = performance.getEntriesByName(new URL("../resources/Ahem.ttf", lo cation.href).href);
13 assert_equals(fonts.length, 0);
14 window.performance.getEntriesByType('resource').forEach(function(r) {
15 if (r.name.indexOf('testharness.js') != -1) {
16 assert_greater_than(r.startTime, 0);
17 assert_greater_than(boundedStart, r.startTime);
kouhei (in TOK) 2016/08/19 04:56:15 Should we use internals.isPreloaded?
Charlie Harrison 2016/08/19 15:13:40 Done. isPreloaded will return true even if the res
kouhei (in TOK) 2016/08/22 05:34:03 Yes.
18 t.done();
19 }
20 });
21 }));
22 </script>
23
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698