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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/webfont/font-display-intervention.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 | « third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html ('k') | no next file » | 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-intervention.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/webfont/font-display-intervention.html b/third_party/WebKit/LayoutTests/http/tests/webfont/font-display-intervention.html
index 42e20f18e350edfb2ba00cf504d808840f95ad7b..08df4158cf9bf17b8029eb8dd763b0c1c115ab94 100644
--- a/third_party/WebKit/LayoutTests/http/tests/webfont/font-display-intervention.html
+++ b/third_party/WebKit/LayoutTests/http/tests/webfont/font-display-intervention.html
@@ -71,11 +71,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 | « third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698