| Index: third_party/WebKit/LayoutTests/http/tests/preload/external_css_import_no_scanning.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/external_css_import_no_scanning.html b/third_party/WebKit/LayoutTests/http/tests/preload/external_css_import_no_scanning.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..803253308840b6107c58f65087b021e3229f77d5
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/preload/external_css_import_no_scanning.html
|
| @@ -0,0 +1,21 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script>
|
| +var t = async_test("We should scan external css for @imports and preload them");
|
| +var link = "<link rel='stylesheet' type='text/css' href='../resources/css_with_import.css'><\/link>";
|
| +var declareBoundedStart = "<script>var boundedStart = window.performance.now();<\/script>";
|
| +var slowScript = "<script src='../resources/slow-script.pl?delay=1000'><\/script>";
|
| +document.write(slowScript + declareBoundedStart + link);
|
| +</script>
|
| +<script>
|
| +window.addEventListener("load", t.step_func(function() {
|
| + var entries = performance.getEntriesByType("resource");
|
| + entries.forEach(function(entry) {
|
| + if (entry.name.indexOf("dummy.css") != -1) {
|
| + assert_less_than(boundedStart, entry.startTime);
|
| + t.done();
|
| + }
|
| + });
|
| +}));
|
| +</script>
|
|
|