|
|
@@ -3,7 +3,7 @@
|
|
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
|
*/
|
|
|
|
|
|
-import env, { isEdge, isMac, isGecko, isSafari, isAndroid, isRegExpUnicodePropertySupported } from '../src/env';
|
|
|
+import env, { isMac, isGecko, isSafari, isAndroid, isRegExpUnicodePropertySupported } from '../src/env';
|
|
|
|
|
|
function toLowerCase( str ) {
|
|
|
return str.toLowerCase();
|
|
|
@@ -20,12 +20,6 @@ describe( 'Env', () => {
|
|
|
} );
|
|
|
} );
|
|
|
|
|
|
- describe( 'isEdge', () => {
|
|
|
- it( 'is a boolean', () => {
|
|
|
- expect( env.isEdge ).to.be.a( 'boolean' );
|
|
|
- } );
|
|
|
- } );
|
|
|
-
|
|
|
describe( 'isGecko', () => {
|
|
|
it( 'is a boolean', () => {
|
|
|
expect( env.isGecko ).to.be.a( 'boolean' );
|
|
|
@@ -74,35 +68,6 @@ describe( 'Env', () => {
|
|
|
} );
|
|
|
} );
|
|
|
|
|
|
- describe( 'isEdge()', () => {
|
|
|
- it( 'returns true for Edge UA strings', () => {
|
|
|
- expect( isEdge( 'edge/12' ) ).to.be.true;
|
|
|
- expect( isEdge( 'foo edge/12 bar' ) ).to.be.true;
|
|
|
-
|
|
|
- expect( isEdge( toLowerCase(
|
|
|
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' +
|
|
|
- 'Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393'
|
|
|
- ) ) ).to.be.true;
|
|
|
- } );
|
|
|
-
|
|
|
- it( 'returns false for non–Edge UA strings', () => {
|
|
|
- expect( isEdge( '' ) ).to.be.false;
|
|
|
- expect( isEdge( 'mac' ) ).to.be.false;
|
|
|
- expect( isEdge( 'foo' ) ).to.be.false;
|
|
|
- expect( isEdge( 'ledge' ) ).to.be.false;
|
|
|
- expect( isEdge( 'foo edge bar' ) ).to.be.false;
|
|
|
-
|
|
|
- // Chrome
|
|
|
- expect( isEdge( toLowerCase(
|
|
|
- 'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36'
|
|
|
- ) ) ).to.be.false;
|
|
|
- // IE11
|
|
|
- expect( isEdge( toLowerCase(
|
|
|
- 'Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko'
|
|
|
- ) ) ).to.be.false;
|
|
|
- } );
|
|
|
- } );
|
|
|
-
|
|
|
describe( 'isGecko()', () => {
|
|
|
it( 'returns true for Firefox UA strings', () => {
|
|
|
expect( isGecko( 'gecko/42' ) ).to.be.true;
|