</head>
<body>
<script>
-waitAndTest([
- {
- description: "Updating attribute value shouldn't invalidate loaded import.",
- setup: function()
- {
- debug("Before update:");
- shouldBeNull("target.sheet");
- shouldBeNonNull("target.import");
- target.setAttribute("href", "resources/hello.css");
- target.setAttribute("rel", "stylesheet");
- window.placeholder = createPlaceholder();
- },
- ready: function() { return window.placeholder.import; },
- test: function()
- {
- debug("After update:");
- shouldBeNull("target.sheet");
- shouldBeNonNull("target.import");
- }
+window.jsTestIsAsync = true;
+description('Updating attribute value shouldn\'t invalidate loaded import.');
+(function() {
+ debug('Before update:');
+ shouldBeNull('target.sheet');
+ shouldBeNonNull('target.import');
+ target.setAttribute('href', 'resources/hello.css');
+ target.setAttribute('rel', 'stylesheet');
+ window.placeholder = createPlaceholder();
+ window.placeholder.onload = function() {
+ debug('After update:');
+ shouldBeNull('target.sheet');
+ shouldBeNonNull('target.import');
+ window.addEventListener('load', function() { requestAnimationFrame(finishJSTest); });
}
-]);
+})();
</script>
</body>
</html>