Skip to content

Commit

Permalink
Tests: Add Microsoft Edge results (from Windows 10 build 10130)
Browse files Browse the repository at this point in the history
The Microsoft Edge user agent contains "Chrome" so it needs to be checked
before Chrome.
  • Loading branch information
mgol committed Jun 13, 2015
1 parent c17543f commit 8e111df
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions test/unit/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,13 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
var expected,
userAgent = window.navigator.userAgent;

if ( /chrome/i.test( userAgent ) ) {
// Catches Chrome on Android as well (i.e. the default
// Android browser on Android >= 4.4).
if ( /edge\/12/i.test( userAgent ) ) {

This comment has been minimized.

Copy link
@jacobrossi

jacobrossi Jun 15, 2015

The 12 number will change. Why not leave this just looking for Edge?

This comment has been minimized.

Copy link
@mgol

mgol Jun 15, 2015

Author Member

I didn't know. :) What can drive this change considering Edge has no versions planned?

I'll change it to /edge\//i. This is just for unit tests, though (we don't UA-sniff in source), so it doesn't matter too much.

This comment has been minimized.

Copy link
@mgol

mgol Jun 16, 2015

Author Member

Changed in 5a1217e for master & 1d052bd for compat.

This comment has been minimized.

Copy link
@mgol

mgol Jun 24, 2015

Author Member

@jacobrossi What's the meaning of this 12 and when can it change? We identify each browser in our infra by name + version, so currently it'll be:

{
    "browserFamily": "Edge",
    "browserMajor": "12"
}

This comment has been minimized.

Copy link
@mgol

mgol Jun 25, 2015

Author Member

For reference: jquery/testswarm@57bc81a.

This comment has been minimized.

Copy link
@jacobrossi

jacobrossi via email Jun 25, 2015

This comment has been minimized.

Copy link
@mgol

mgol Jun 25, 2015

Author Member

@jacobrossi Thanks!

expected = {
"ajax": true,
"boxSizingReliable": true,
"checkClone": true,
"checkOn": true,
"clearCloneStyle": true,
"clearCloneStyle": false,
"cors": true,
"createHTMLDocument": true,
"focusin": false,
Expand Down Expand Up @@ -107,6 +105,26 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": false,
"reliableMarginRight": true
};
} else if ( /chrome/i.test( userAgent ) ) {
// Catches Chrome on Android as well (i.e. the default
// Android browser on Android >= 4.4).
expected = {
"ajax": true,
"boxSizingReliable": true,
"checkClone": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
"createHTMLDocument": true,
"focusin": false,
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"pixelMarginRight": true,
"pixelPosition": true,
"radioValue": true,
"reliableMarginRight": true
};
} else if ( /8\.0(\.\d+|) safari/i.test( userAgent ) ) {
expected = {
"ajax": true,
Expand Down

0 comments on commit 8e111df

Please sign in to comment.