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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/preload/onload_event.html

Issue 1586563014: Add <link rel=preload> onload support for scripts and styles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oilpan build fixes and review comments Created 4 years, 11 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 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script>
5 var t = async_test('Makes sure that preloaded resources trigger the onload e vent');
6 var scriptLoaded = false;
7 var styleLoaded = false;
8 </script>
9 <link rel=preload href="../resources/dummy.js" as=script onload="scriptLoaded = true;">
10 <link rel=preload href="../resources/dummy.css" as=style onload="styleLoaded = t rue;">
11 <script src="../resources/slow-script.pl?delay=500"></script>
12 <script>
13 window.onload = t.step(function(){
14 assert_true(window.scriptLoaded, "script triggered load event");
15 assert_true(styleLoaded, "style triggered load event");
16 t.done();
17 });
18 </script>
19
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698