File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 39
39
) ;
40
40
} , this ) ;
41
41
42
+ this . forcePolyfillAttachedStateSynchrony ( ) ;
43
+
42
44
if ( generatedDoms . length < 2 ) {
43
45
return generatedDoms [ 0 ] ;
44
46
}
89
91
this . generatedDomStack = [ ] ;
90
92
91
93
this . _elementsFixtured = false ;
94
+
95
+ this . forcePolyfillAttachedStateSynchrony ( ) ;
96
+ } ,
97
+
98
+ forcePolyfillAttachedStateSynchrony : function ( ) {
99
+ // Force synchrony in attachedCallback and detachedCallback where
100
+ // implemented, in the event that we are dealing with the async Web
101
+ // Components Polyfill.
102
+ if ( window . CustomElements && window . CustomElements . takeRecords ) {
103
+ window . CustomElements . takeRecords ( ) ;
104
+ }
92
105
} ,
93
106
94
107
collectElementChildren : function ( parent ) {
Original file line number Diff line number Diff line change 91
91
attachedFixture . restore ( ) ;
92
92
} ) ;
93
93
94
- // TODO(cdata): Make this test pass somehow. Currently it fails in
95
- // not-Chrome due to an implementation detail of the Web Components
96
- // polyfill.
97
- xit ( 'detaches the fixtured DOM when it is restored' , function ( ) {
94
+ it ( 'detaches the fixtured DOM when it is restored' , function ( ) {
98
95
var detached = false ;
99
96
100
97
element . onDetached = function ( ) {
You can’t perform that action at this time.
0 commit comments