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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html

Issue 2584473002: Merge setTimeout calls with same timeout for webfont tests. (Closed)
Patch Set: Created 4 years 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 | « no previous file | third_party/WebKit/LayoutTests/http/tests/webfont/font-display-intervention.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html b/third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html
index ba9b97403855850dcf2cf798c7ea11ee39dd347f..ec19d7a86ef0c52ef1966b622bc97d8808bc31a6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html
+++ b/third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html
@@ -60,11 +60,16 @@ window.onload = function() {
tr.appendChild(td);
}
table.appendChild(tr);
- setTimeout((function(tr){tr.classList.remove('hidden')}).bind(null, tr), maxTime - config.time);
+ if (config.time == 0) {
+ setTimeout((function(tr){
+ tr.classList.remove('hidden');
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }).bind(null, tr), maxTime);
+ } else {
+ setTimeout((function(tr){tr.classList.remove('hidden')}).bind(null, tr), maxTime - config.time);
+ }
}
-
- if (window.testRunner)
- setTimeout(function() { testRunner.notifyDone(); }, maxTime);
}
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/webfont/font-display-intervention.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698