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

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/timeout.html

Issue 1367023002: Replace timeout argument with IdleRequestOptions in requestIdleCallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rIC_histograms
Patch Set: Created 5 years, 3 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 | « no previous file | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/timeout.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/timeout.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/timeout.html
index 7a2e62d3dda52444537649c20bc0b9ef57ca5822..1aad7d75caef5b239167b065d1e4c8ed89718516 100644
--- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/timeout.html
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/timeout.html
@@ -8,8 +8,8 @@
<script>
async_test(function() {
- // Check whether requestIdleCallback with a timeout works when the event loop
- // is busy.
+ // Check whether requestIdleCallback without a timeout doesn't get run when
+ // the event loop is busy.
var busy_raf_loop_iterations_remaining = 10; // Should take 20 * 40 = 400ms
var idle_callback_scheduled;
var idle_callback = this.step_func(function(deadline) {
@@ -36,8 +36,8 @@ async_test(function() {
}, 'requestIdleCallback not scheduled when event loop is busy.');
async_test(function() {
- // Check whether requestIdleCallback with a timeout works when the event loop
- // is busy.
+ // Check whether requestIdleCallback with a timeout works runs even when the
+ // event loop is busy.
var busy_raf_loop_iterations_remaining = 10; // Should take 20 * 40 = 400ms
var timeout = 200;
var idle_callback_scheduled;
@@ -54,7 +54,7 @@ async_test(function() {
var start_time = performance.now();
if (!idle_callback_scheduled) {
idle_callback_scheduled = start_time;
- requestIdleCallback(idle_callback, timeout);
+ requestIdleCallback(idle_callback, { timeout: timeout });
}
// Use up the whole frame budget.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698