chore(test): disable tests based on Intl API in non-Chrome browsers

Closes #3692
This commit is contained in:
Marc Laval
2015-08-18 16:16:30 +02:00
parent f0e7f13f30
commit 873b6da120
5 changed files with 120 additions and 73 deletions

View File

@ -85,3 +85,10 @@ export function stringifyElement(el): string {
return result;
}
// The Intl API is only properly supported in Chrome and Opera.
// Note: Edge is disguised as Chrome 42, so checking the "Edge" part is needed,
// see https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
export function supportsIntlApi(): boolean {
return DOM.getUserAgent().indexOf('Chrome') > -1 && DOM.getUserAgent().indexOf('Edge') == -1;
}