@@ -8,12 +8,12 @@ import {Lexer} from 'change_detection/src/parser/lexer';
88import { reflector } from 'reflection/src/reflection' ;
99import { arrayChangesAsString , kvChangesAsString } from './util' ;
1010
11- import { ChangeDispatcher , DynamicChangeDetector , ChangeDetectionError , ContextWithVariableBindings }
12- from 'change_detection/change_detection' ;
11+ import { ChangeDispatcher , DynamicChangeDetector , ChangeDetectionError , ContextWithVariableBindings ,
12+ CHECK_ALWAYS , CHECK_ONCE , CHECKED , DETACHED } from 'change_detection/change_detection' ;
1313
1414
1515import { JitProtoChangeDetector , DynamicProtoChangeDetector } from 'change_detection/src/proto_change_detector' ;
16- import { CHECK_ALWAYS , CHECK_ONCE , CHECKED , DETACHED } from 'change_detection/src/interfaces ' ;
16+ import { ChangeDetectionUtil } from 'change_detection/src/change_detection_util ' ;
1717
1818
1919export function main ( ) {
@@ -517,7 +517,7 @@ export function main() {
517517 } ) ;
518518 } ) ;
519519
520- describe ( "markAsCheckOnce " , ( ) => {
520+ describe ( "markPathToRootAsCheckOnce " , ( ) => {
521521 function changeDetector ( mode , parent ) {
522522 var cd = createProtoChangeDetector ( ) . instantiate ( null , null ) ;
523523 cd . mode = mode ;
@@ -531,16 +531,18 @@ export function main() {
531531 var root = changeDetector ( CHECK_ALWAYS , null ) ;
532532 var disabled = changeDetector ( DETACHED , root ) ;
533533 var parent = changeDetector ( CHECKED , disabled ) ;
534- var child = changeDetector ( CHECK_ALWAYS , parent ) ;
535- var grandChild = changeDetector ( CHECKED , child ) ;
534+ var checkAlwaysChild = changeDetector ( CHECK_ALWAYS , parent ) ;
535+ var checkOnceChild = changeDetector ( CHECK_ONCE , checkAlwaysChild ) ;
536+ var checkedChild = changeDetector ( CHECKED , checkOnceChild ) ;
536537
537- grandChild . markAsCheckOnce ( ) ;
538+ ChangeDetectionUtil . markPathToRootAsCheckOnce ( checkedChild ) ;
538539
539540 expect ( root . mode ) . toEqual ( CHECK_ALWAYS ) ;
540541 expect ( disabled . mode ) . toEqual ( DETACHED ) ;
541542 expect ( parent . mode ) . toEqual ( CHECK_ONCE ) ;
542- expect ( child . mode ) . toEqual ( CHECK_ALWAYS ) ;
543- expect ( grandChild . mode ) . toEqual ( CHECK_ONCE ) ;
543+ expect ( checkAlwaysChild . mode ) . toEqual ( CHECK_ALWAYS ) ;
544+ expect ( checkOnceChild . mode ) . toEqual ( CHECK_ONCE ) ;
545+ expect ( checkedChild . mode ) . toEqual ( CHECK_ONCE ) ;
544546 } ) ;
545547 } ) ;
546548 } ) ;
0 commit comments