test/unit/mdc-checkbox/foundation.test.js
// in Safari WebIDL attributes don't return get/set in descriptors.
in Safari WebIDL attributes don't return get/set in descriptors.
in Safari WebIDL attributes don ' t return get / set in descriptors .
function withMockCheckboxDescriptorReturning(descriptor, runTests) {
  const originalDesc = Object.getOwnPropertyDescriptor(Object, 'getOwnPropertyDescriptor');
  const mockGetOwnPropertyDescriptor = td.func('.getOwnPropertyDescriptor');
  const oneOf = (...validArgs) => td.matchers.argThat((x) => validArgs.indexOf(x) >= 0);
  td.when(mockGetOwnPropertyDescriptor(HTMLInputElement.prototype, oneOf('checked', 'indeterminate')))
    .thenReturn(descriptor);
  Object.defineProperty(Object, 'getOwnPropertyDescriptor', Object.assign({}, originalDesc, {
    value: mockGetOwnPropertyDescriptor,
  }));
  runTests(mockGetOwnPropertyDescriptor);
  Object.defineProperty(Object, 'getOwnPropertyDescriptor', originalDesc);
}
function withMockCheckboxDescriptorReturning ( descriptor , runTests ) { const originalDesc = Object . getOwnPropertyDescriptor ( Object , 'getOwnPropertyDescriptor' ) ; const mockGetOwnPropertyDescriptor = td . func ( '.getOwnPropertyDescriptor' ) ; const oneOf = ( ... validArgs ) => td . matchers . argThat ( ( x ) => validArgs . indexOf ( x ) >= 0 ) ; td . when ( mockGetOwnPropertyDescriptor ( HTMLInputElement . prototype , oneOf ( 'checked' , 'indeterminate' ) ) ) . thenReturn ( descriptor ) ; Object . defineProperty ( Object , 'getOwnPropertyDescriptor' , Object . assign ( { } , originalDesc , { value : mockGetOwnPropertyDescriptor , } ) ) ; runTests ( mockGetOwnPropertyDescriptor ) ; Object . defineProperty ( Object , 'getOwnPropertyDescriptor' , originalDesc ) ; }
in Safari WebIDL attributes don't return get/set in descriptors.
in Safari WebIDL attributes don ' t return get / set in descriptors .