@@ -24,6 +24,8 @@ import {
24
24
} from './input-container-errors' ;
25
25
import { MD_PLACEHOLDER_GLOBAL_OPTIONS } from '../core/placeholder/placeholder-options' ;
26
26
27
+ /** Whether the current specs are running inside of Safari 9. */
28
+ const IS_SAFARI_9 = / .+ A p p l e W e b K i t .+ V e r s i o n \/ 9 .+ S a f a r i .+ / . test ( navigator . userAgent ) ;
27
29
28
30
describe ( 'MdInputContainer' , function ( ) {
29
31
beforeEach ( async ( ( ) => {
@@ -108,7 +110,7 @@ describe('MdInputContainer', function () {
108
110
109
111
it ( 'should not be treated as empty if type is date' ,
110
112
inject ( [ Platform ] , ( platform : Platform ) => {
111
- if ( ! ( platform . TRIDENT || platform . FIREFOX || platform . SAFARI ) ) {
113
+ if ( ! ( platform . TRIDENT || platform . FIREFOX || ( IS_SAFARI_9 && ! platform . IOS ) ) ) {
112
114
let fixture = TestBed . createComponent ( MdInputContainerDateTestController ) ;
113
115
fixture . detectChanges ( ) ;
114
116
@@ -121,7 +123,7 @@ describe('MdInputContainer', function () {
121
123
// Firefox and IE don't support type="date" and fallback to type="text".
122
124
it ( 'should be treated as empty if type is date on Firefox and IE' ,
123
125
inject ( [ Platform ] , ( platform : Platform ) => {
124
- if ( platform . TRIDENT || platform . FIREFOX || platform . SAFARI ) {
126
+ if ( platform . TRIDENT || platform . FIREFOX || ( IS_SAFARI_9 && ! platform . IOS ) ) {
125
127
let fixture = TestBed . createComponent ( MdInputContainerDateTestController ) ;
126
128
fixture . detectChanges ( ) ;
127
129
0 commit comments