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

Unified Diff: LayoutTests/fast/html/imports/rel-import-to-style.html

Issue 278643002: Rewrite rel-import-to-style.html to kill the flakiness. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/html/imports/rel-import-to-style-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/html/imports/rel-import-to-style.html
diff --git a/LayoutTests/fast/html/imports/rel-import-to-style.html b/LayoutTests/fast/html/imports/rel-import-to-style.html
index a26540f76d74aba61654f8d21eaeb80e3e5d1e12..db9161681b2b984ef34caef2f9722b44766deb7f 100644
--- a/LayoutTests/fast/html/imports/rel-import-to-style.html
+++ b/LayoutTests/fast/html/imports/rel-import-to-style.html
@@ -7,27 +7,22 @@
</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>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/html/imports/rel-import-to-style-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698