1111
1212let runWithPriority ;
1313let ImmediatePriority ;
14- let InteractivePriority ;
14+ let UserBlockingPriority ;
1515let NormalPriority ;
1616let scheduleCallback ;
1717let cancelCallback ;
@@ -137,7 +137,7 @@ describe('Scheduler', () => {
137137 const Schedule = require ( 'scheduler' ) ;
138138 runWithPriority = Schedule . unstable_runWithPriority ;
139139 ImmediatePriority = Schedule . unstable_ImmediatePriority ;
140- InteractivePriority = Schedule . unstable_InteractivePriority ;
140+ UserBlockingPriority = Schedule . unstable_UserBlockingPriority ;
141141 NormalPriority = Schedule . unstable_NormalPriority ;
142142 scheduleCallback = Schedule . unstable_scheduleCallback ;
143143 cancelCallback = Schedule . unstable_cancelCallback ;
@@ -226,7 +226,7 @@ describe('Scheduler', () => {
226226 // Yield before B is flushed
227227 expect ( flushWork ( 100 ) ) . toEqual ( [ 'A' ] ) ;
228228
229- runWithPriority ( InteractivePriority , ( ) => {
229+ runWithPriority ( UserBlockingPriority , ( ) => {
230230 scheduleCallback ( ( ) => doWork ( 'C' , 100 ) ) ;
231231 scheduleCallback ( ( ) => doWork ( 'D' , 100 ) ) ;
232232 } ) ;
@@ -237,11 +237,11 @@ describe('Scheduler', () => {
237237
238238 it ( 'expires work' , ( ) => {
239239 scheduleCallback ( ( ) => doWork ( 'A' , 100 ) ) ;
240- runWithPriority ( InteractivePriority , ( ) => {
240+ runWithPriority ( UserBlockingPriority , ( ) => {
241241 scheduleCallback ( ( ) => doWork ( 'B' , 100 ) ) ;
242242 } ) ;
243243 scheduleCallback ( ( ) => doWork ( 'C' , 100 ) ) ;
244- runWithPriority ( InteractivePriority , ( ) => {
244+ runWithPriority ( UserBlockingPriority , ( ) => {
245245 scheduleCallback ( ( ) => doWork ( 'D' , 100 ) ) ;
246246 } ) ;
247247
@@ -314,7 +314,7 @@ describe('Scheduler', () => {
314314 } ;
315315
316316 // Schedule a high priority callback
317- runWithPriority ( InteractivePriority , ( ) => scheduleCallback ( work ) ) ;
317+ runWithPriority ( UserBlockingPriority , ( ) => scheduleCallback ( work ) ) ;
318318
319319 // Flush until just before the expiration time
320320 expect ( flushWork ( 249 ) ) . toEqual ( [ 'A' , 'B' , 'Yield!' ] ) ;
@@ -325,7 +325,7 @@ describe('Scheduler', () => {
325325 } ) ;
326326
327327 it ( 'nested callbacks inherit the priority of the currently executing callback' , ( ) => {
328- runWithPriority ( InteractivePriority , ( ) => {
328+ runWithPriority ( UserBlockingPriority , ( ) => {
329329 scheduleCallback ( ( ) => {
330330 doWork ( 'Parent callback' , 100 ) ;
331331 scheduleCallback ( ( ) => {
@@ -336,7 +336,7 @@ describe('Scheduler', () => {
336336
337337 expect ( flushWork ( 100 ) ) . toEqual ( [ 'Parent callback' ] ) ;
338338
339- // The nested callback has interactive priority, so it should
339+ // The nested callback has user-blocking priority, so it should
340340 // expire quickly.
341341 advanceTime ( 250 + 100 ) ;
342342 expect ( clearYieldedValues ( ) ) . toEqual ( [ 'Nested callback' ] ) ;
@@ -360,7 +360,7 @@ describe('Scheduler', () => {
360360 scheduleCallback ( work ) ;
361361 expect ( flushWork ( 100 ) ) . toEqual ( [ 'A' , 'Yield!' ] ) ;
362362
363- runWithPriority ( InteractivePriority , ( ) => {
363+ runWithPriority ( UserBlockingPriority , ( ) => {
364364 scheduleCallback ( ( ) => doWork ( 'High pri' , 100 ) ) ;
365365 } ) ;
366366
@@ -379,7 +379,7 @@ describe('Scheduler', () => {
379379 if ( task [ 0 ] === 'B' ) {
380380 // Schedule high pri work from inside another callback
381381 yieldValue ( 'Schedule high pri' ) ;
382- runWithPriority ( InteractivePriority , ( ) =>
382+ runWithPriority ( UserBlockingPriority , ( ) =>
383383 scheduleCallback ( ( ) => doWork ( 'High pri' , 100 ) ) ,
384384 ) ;
385385 }
@@ -438,24 +438,24 @@ describe('Scheduler', () => {
438438 } ) ;
439439 } ) ;
440440 const wrappedInteractiveCallback = runWithPriority (
441- InteractivePriority ,
441+ UserBlockingPriority ,
442442 ( ) =>
443443 wrapCallback ( ( ) => {
444444 scheduleCallback ( ( ) => {
445- doWork ( 'Interactive ' , 100 ) ;
445+ doWork ( 'User-blocking ' , 100 ) ;
446446 } ) ;
447447 } ) ,
448448 ) ;
449449
450450 // This should schedule a normal callback
451451 wrappedCallback ( ) ;
452- // This should schedule an interactive callback
452+ // This should schedule an user-blocking callback
453453 wrappedInteractiveCallback ( ) ;
454454
455455 advanceTime ( 249 ) ;
456456 expect ( clearYieldedValues ( ) ) . toEqual ( [ ] ) ;
457457 advanceTime ( 1 ) ;
458- expect ( clearYieldedValues ( ) ) . toEqual ( [ 'Interactive ' ] ) ;
458+ expect ( clearYieldedValues ( ) ) . toEqual ( [ 'User-blocking ' ] ) ;
459459
460460 advanceTime ( 10000 ) ;
461461 expect ( clearYieldedValues ( ) ) . toEqual ( [ 'Normal' ] ) ;
@@ -468,26 +468,26 @@ describe('Scheduler', () => {
468468 } ) ;
469469 } ) ;
470470 const wrappedInteractiveCallback = runWithPriority (
471- InteractivePriority ,
471+ UserBlockingPriority ,
472472 ( ) =>
473473 wrapCallback ( ( ) => {
474474 scheduleCallback ( ( ) => {
475- doWork ( 'Interactive ' , 100 ) ;
475+ doWork ( 'User-blocking ' , 100 ) ;
476476 } ) ;
477477 } ) ,
478478 ) ;
479479
480- runWithPriority ( InteractivePriority , ( ) => {
480+ runWithPriority ( UserBlockingPriority , ( ) => {
481481 // This should schedule a normal callback
482482 wrappedCallback ( ) ;
483- // This should schedule an interactive callback
483+ // This should schedule an user-blocking callback
484484 wrappedInteractiveCallback ( ) ;
485485 } ) ;
486486
487487 advanceTime ( 249 ) ;
488488 expect ( clearYieldedValues ( ) ) . toEqual ( [ ] ) ;
489489 advanceTime ( 1 ) ;
490- expect ( clearYieldedValues ( ) ) . toEqual ( [ 'Interactive ' ] ) ;
490+ expect ( clearYieldedValues ( ) ) . toEqual ( [ 'User-blocking ' ] ) ;
491491
492492 advanceTime ( 10000 ) ;
493493 expect ( clearYieldedValues ( ) ) . toEqual ( [ 'Normal' ] ) ;
@@ -536,7 +536,7 @@ describe('Scheduler', () => {
536536 yieldValue ( getCurrentPriorityLevel ( ) ) ;
537537 runWithPriority ( NormalPriority , ( ) => {
538538 yieldValue ( getCurrentPriorityLevel ( ) ) ;
539- runWithPriority ( InteractivePriority , ( ) => {
539+ runWithPriority ( UserBlockingPriority , ( ) => {
540540 yieldValue ( getCurrentPriorityLevel ( ) ) ;
541541 } ) ;
542542 } ) ;
@@ -547,7 +547,7 @@ describe('Scheduler', () => {
547547 NormalPriority ,
548548 ImmediatePriority ,
549549 NormalPriority ,
550- InteractivePriority ,
550+ UserBlockingPriority ,
551551 ImmediatePriority ,
552552 ] ) ;
553553 } ) ;
0 commit comments