diff --git a/fixtures/schedule/index.html b/fixtures/schedule/index.html
index d5b243a3c2..ad5f1042f5 100644
--- a/fixtures/schedule/index.html
+++ b/fixtures/schedule/index.html
@@ -23,7 +23,7 @@
-
-
Calls the callback with the frame when not blocked:
+ Calls the callback within the frame when not blocked:
Expected:
@@ -79,6 +79,15 @@
IMPORTANT: Open the console when you run this! Inspect the logs there!
+ -
+
Continues calling callbacks even when user switches away from this tab
+
+ Click the button above, observe the counter, then switch to
+ another tab and switch back:
+
+
+ If the counter advanced while you were away from this tab, it's correct.
+
@@ -464,6 +473,22 @@ function runTestSix() {
console.log('scheduled cbE');
};
}
+
+function runTestSeven() {
+ // Test 7
+ // Calls callbacks, continues calling them even when this tab is in the
+ // background
+ clearTestResult(7);
+ let counter = -1;
+ function incrementCounterAndScheduleNextCallback() {
+ const counterNode = document.getElementById('test-7');
+ counter++;
+ counterNode.innerHTML = counter;
+ waitForTimeToPass(100);
+ scheduleWork(incrementCounterAndScheduleNextCallback);
+ }
+ scheduleWork(incrementCounterAndScheduleNextCallback);
+}