Auto merge of #5804 - jdm:docloader, r=Ms2ger

This implements a simple load-tracking system and tracks stylesheet loads as an example of how it fits together. This is a simplified and rebased version of #3714; I do not believe that the main thrust of hsivonen's comments (related to tracking navigation in browsing contexts) affect this part of the work. 

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5804)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-05-11 14:35:33 -05:00
commit 2baa69595e
22 changed files with 459 additions and 144 deletions

View file

@ -12553,6 +12553,10 @@
"path": "html/semantics/document-metadata/the-base-element/base_multiple.html",
"url": "/html/semantics/document-metadata/the-base-element/base_multiple.html"
},
{
"path": "html/semantics/document-metadata/the-link-element/link-load-event.html",
"url": "/html/semantics/document-metadata/the-link-element/link-load-event.html"
},
{
"path": "html/semantics/document-metadata/the-link-element/link-rellist.html",
"url": "/html/semantics/document-metadata/the-link-element/link-rellist.html"
@ -25924,4 +25928,4 @@
"rev": "fef3eb9bbb033d1d7150f4c70ecc1a5f59bcf115",
"url_base": "/",
"version": 2
}
}

View file

@ -2,7 +2,55 @@
type: testharness
expected: TIMEOUT
[src removed]
expected: FAIL
expected: TIMEOUT
[inserted into picture]
expected: TIMEOUT
[removed from picture]
expected: TIMEOUT
[parent is picture, previous source inserted]
expected: TIMEOUT
[parent is picture, previous source removed]
expected: TIMEOUT
[parent is picture, previous source has srcset set]
expected: TIMEOUT
[parent is picture, previous source has srcset changed]
expected: TIMEOUT
[parent is picture, previous source has srcset removed]
expected: TIMEOUT
[parent is picture, previous source has sizes set]
expected: TIMEOUT
[parent is picture, previous source has sizes changed]
expected: TIMEOUT
[parent is picture, previous source has sizes removed]
expected: TIMEOUT
[parent is picture, previous source has media set]
expected: TIMEOUT
[parent is picture, previous source has media changed]
expected: TIMEOUT
[parent is picture, previous source has media removed]
expected: TIMEOUT
[parent is picture, previous source has type set]
expected: TIMEOUT
[parent is picture, previous source has type changed]
expected: TIMEOUT
[parent is picture, previous source has type removed]
expected: TIMEOUT
[srcset set]
expected: TIMEOUT
@ -52,84 +100,3 @@
[crossorigin use-credentials to anonymous]
expected: TIMEOUT
[crossorigin state not changed: absent, removeAttribute]
expected: FAIL
[crossorigin state not changed: empty to anonymous]
expected: FAIL
[crossorigin state not changed: anonymous to foobar]
expected: FAIL
[crossorigin state not changed: use-credentials to USE-CREDENTIALS]
expected: FAIL
[inserted into picture ancestor]
expected: FAIL
[removed from picture ancestor]
expected: FAIL
[ancestor picture has a source inserted]
expected: FAIL
[ancestor picture has a source removed]
expected: FAIL
[ancestor picture; previous sibling source inserted]
expected: FAIL
[ancestor picture; previous sibling source removed]
expected: FAIL
[parent is picture, following sibling source inserted]
expected: FAIL
[parent is picture, following sibling source removed]
expected: FAIL
[parent is picture, following sibling source has srcset set]
expected: FAIL
[media on img set]
expected: FAIL
[type on img set]
expected: FAIL
[class on img set]
expected: FAIL
[alt on img set]
expected: FAIL
[src on previous sibling source set]
expected: FAIL
[class on previous sibling source set]
expected: FAIL
[inserted/removed children of img]
expected: FAIL
[picture is inserted]
expected: FAIL
[picture is removed]
expected: FAIL
[parent is picture, following img inserted]
expected: FAIL
[parent is picture, following img removed]
expected: FAIL
[parent is picture, following img has src set]
expected: FAIL
[parent is picture, following img has srcset set]
expected: FAIL
[parent is picture, following img has sizes set]
expected: FAIL

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<link rel="author" title="Josh Matthews" href="mailto:josh@joshmatthews.net">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link href="style.css?pipe=trickle(d3)" rel="stylesheet" id="style_test"></link>
<script>
var saw_link_onload = false;
var t = async_test("Check if the stylesheet's load event blocks the document load event");
document.getElementById('style_test').onload = t.step_func(function() {
saw_link_onload = true;
});
window.addEventListener('load', function() {
t.step_func(function() {
assert_true(saw_link_onload);
});
t.done();
}, false);
</script>
</head>
</html>

View file

@ -0,0 +1,3 @@
body {
background-color: white;
}