gecko-dev/testing/web-platform/tests/preload/link-header-preload-delay-o...

41 строка
1.7 KiB
HTML
Исходник Обычный вид История

Bug 1331899 - Update web-platform-tests to revision 7071a3d128ff6610a57944d1b0aaabee97b3af5a, a=testonly MozReview-Commit-ID: LvpIb2OK2GS --HG-- rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-also-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-novalid.html rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-also-novalid.xhtml rename : testing/web-platform/tests/html-media-capture/capture_fallback_file_upload.html => testing/web-platform/tests/html-media-capture/capture_fallback_file_upload-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop-manual.html rename : testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.html => testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.https.html
2017-01-03 19:20:52 +03:00
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/preload/resources/preload_helper.js"></script>
Bug 1331899 - Update web-platform-tests to revision 7071a3d128ff6610a57944d1b0aaabee97b3af5a, a=testonly MozReview-Commit-ID: LvpIb2OK2GS --HG-- rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-also-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-novalid.html rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-also-novalid.xhtml rename : testing/web-platform/tests/html-media-capture/capture_fallback_file_upload.html => testing/web-platform/tests/html-media-capture/capture_fallback_file_upload-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop-manual.html rename : testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.html => testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.https.html
2017-01-03 19:20:52 +03:00
<script>
var t = async_test('Makes sure that Link headers preload resources and block window.onload after resource discovery');
</script>
<body>
<style>
#background {
width: 200px;
height: 200px;
background-image: url(resources/square.png?background);
}
</style>
<link rel="stylesheet" href="resources/dummy.css?link-header-preload-delay-onload">
<script src="resources/dummy.js?link-header-preload-delay-onload"></script>
Bug 1331899 - Update web-platform-tests to revision 7071a3d128ff6610a57944d1b0aaabee97b3af5a, a=testonly MozReview-Commit-ID: LvpIb2OK2GS --HG-- rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-also-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-novalid.html rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-also-novalid.xhtml rename : testing/web-platform/tests/html-media-capture/capture_fallback_file_upload.html => testing/web-platform/tests/html-media-capture/capture_fallback_file_upload-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop-manual.html rename : testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.html => testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.https.html
2017-01-03 19:20:52 +03:00
<div id="background"></div>
<script>
document.write('<img src="resources/square.png?link-header-preload-delay-onload">');
Bug 1331899 - Update web-platform-tests to revision 7071a3d128ff6610a57944d1b0aaabee97b3af5a, a=testonly MozReview-Commit-ID: LvpIb2OK2GS --HG-- rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-also-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-novalid.html rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-also-novalid.xhtml rename : testing/web-platform/tests/html-media-capture/capture_fallback_file_upload.html => testing/web-platform/tests/html-media-capture/capture_fallback_file_upload-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop-manual.html rename : testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.html => testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.https.html
2017-01-03 19:20:52 +03:00
window.addEventListener("load", t.step_func(function() {
verifyPreloadAndRTSupport();
Bug 1331899 - Update web-platform-tests to revision 7071a3d128ff6610a57944d1b0aaabee97b3af5a, a=testonly MozReview-Commit-ID: LvpIb2OK2GS --HG-- rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-also-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-novalid.html rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-also-novalid.xhtml rename : testing/web-platform/tests/html-media-capture/capture_fallback_file_upload.html => testing/web-platform/tests/html-media-capture/capture_fallback_file_upload-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop-manual.html rename : testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.html => testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.https.html
2017-01-03 19:20:52 +03:00
var entries = performance.getEntriesByType("resource");
var found_background_first = false;
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (entry.name.indexOf("square") != -1) {
if (entry.name.indexOf("background") != -1)
found_background_first = true;
break;
Bug 1331899 - Update web-platform-tests to revision 7071a3d128ff6610a57944d1b0aaabee97b3af5a, a=testonly MozReview-Commit-ID: LvpIb2OK2GS --HG-- rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-also-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-novalid.html rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-also-novalid.xhtml rename : testing/web-platform/tests/html-media-capture/capture_fallback_file_upload.html => testing/web-platform/tests/html-media-capture/capture_fallback_file_upload-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop-manual.html rename : testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.html => testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.https.html
2017-01-03 19:20:52 +03:00
}
}
assert_true(found_background_first);
verifyNumberOfDownloads("resources/square.png?link-header-preload-delay-onload", 1);
verifyNumberOfDownloads("resources/square.png?background", 1);
verifyNumberOfDownloads("resources/dummy.js?link-header-preload-delay-onload", 1);
verifyNumberOfDownloads("resources/dummy.css?link-header-preload-delay-onload", 1);
Bug 1331899 - Update web-platform-tests to revision 7071a3d128ff6610a57944d1b0aaabee97b3af5a, a=testonly MozReview-Commit-ID: LvpIb2OK2GS --HG-- rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-also-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-novalid.html rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-also-novalid.xhtml rename : testing/web-platform/tests/html-media-capture/capture_fallback_file_upload.html => testing/web-platform/tests/html-media-capture/capture_fallback_file_upload-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop-manual.html rename : testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.html => testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.https.html
2017-01-03 19:20:52 +03:00
t.done();
}));
</script>