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

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

Issue 2964563002: Removing --disable/enable-threaded-compositing cmdline switches.
Patch Set: Created 3 years, 6 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
Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/idle_periods.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/idle_periods.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/idle_periods.html
deleted file mode 100644
index 4751fabebc4b3798a813072175c27362dacc37ad..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/idle-callback/idle_periods.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<title>window.requestIdleCallback callback behavior during idle periods.</title>
-<link rel="author" title="Ross McIlroy" href="mailto:rmcilroy@chromium.org" />
-<link rel="help" href="http://www.w3.org/TR/requestidlecallback/"/>
-<script src="../../../../resources/testharness.js"></script>
-<script src="../../../../resources/testharnessreport.js"></script>
-<link rel="stylesheet" href="../../../..//resources/testharness.css" />
-<script>
-
-async_test(function() {
- // Check that two separate calls to requestIdleCallbacks can run in the same
- // idle period.
- var callback_1_deadline;
- var callback_1_has_run = false;
- var callback_1 = function(deadline) {
- callback_1_has_run = true;
- var remaining = deadline.timeRemaining();
- if (remaining >= 5) {
- // Should be enough time to run the next callback in the current idle
- // period.
- callback_1_deadline = performance.now() + remaining;
- }
- };
- var callback_2 = this.step_func(function(deadline) {
- assert_true(callback_1_has_run, "Should run callbacks in order of posting if they don't have a timeout.");
- if (callback_1_deadline != undefined) {
- assert_true(performance.now() < callback_1_deadline, "Should be able to run both callbacks in the same idle period.");
- this.done();
- } else {
- // Might not have had enough idle time, so try again.
- callback_1_has_run = false;
- setTimeout(function() {
- requestIdleCallback(callback_1);
- requestIdleCallback(callback_2);
- }, 0);
- }
- });
- requestIdleCallback(callback_1);
- requestIdleCallback(callback_2);
-}, 'requestIdleCallback can run multiple different requestIdleCallback callbacks in the same idle period.');
-
-async_test(function() {
- // Check that if an idle callback calls requestIdleCallback the new callback
- // doesn't run in the current idle period.
- var previous_deadline;
- var idle_callbacks_remaining = 10;
- var self = this;
- requestIdleCallback(this.step_func(function rIC(deadline) {
- var remaining = deadline.timeRemaining();
- var now = performance.now();
- if (previous_deadline != undefined) {
- assert_true(now >= previous_deadline, "A requestIdleCallback called during an idle period should not be run until the next idle period.");
- }
-
- // Schedule a new requestIdleCallback.
- if (--idle_callbacks_remaining > 0) {
- previous_deadline = now + remaining;
- requestIdleCallback(rIC);
- } else {
- self.done();
- }
- }));
-
- // Spin an empty rAF loop to cause an idle period each frame.
- requestAnimationFrame(this.step_func(function rAFLoop() {
- requestAnimationFrame(rAFLoop);
- }));
-}, 'Check that if an idle callback calls requestIdleCallback the new callback doesn\'t run in the current idle period.');
-</script>
-<h1>Description</h1>
-<p>This test validates that window.requestIdleCallback deals with callbacks during idle periods correctly.</p>
-<div id="log"></div>

Powered by Google App Engine
This is Rietveld 408576698