Disable test(s) relying on Java applets on BrowserStack #1938

Closed
mgol opened this Issue Dec 17, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@mgol
Member

mgol commented Dec 17, 2014

Per our IRC conversation - from time to time BrowserStack has an out-of-date Java which causes the test run to hang, causing failures for the whole module that uses it. It seems it's just the jQuery.acceptData test:

jquery/test/unit/data.js

Lines 136 to 162 in d39fef8

test("jQuery.acceptData", function() {
expect( 11 );
var flash, applet;
ok( jQuery.acceptData( document ), "document" );
ok( jQuery.acceptData( document.documentElement ), "documentElement" );
ok( jQuery.acceptData( {} ), "object" );
ok( !jQuery.acceptData( document.createElement( "embed" ) ), "embed" );
ok( !jQuery.acceptData( document.createElement( "applet" ) ), "applet" );
flash = document.createElement( "object" );
flash.setAttribute( "classid", "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" );
ok( jQuery.acceptData( flash ), "flash" );
applet = document.createElement( "object" );
applet.setAttribute( "classid", "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" );
ok( !jQuery.acceptData( applet ), "applet" );
ok( !jQuery.acceptData( document.createComment( "" ) ), "comment" );
ok( !jQuery.acceptData( document.createTextNode( "" ) ), "text" );
ok( !jQuery.acceptData( document.createDocumentFragment() ), "documentFragment" );
ok( jQuery.acceptData(
jQuery( "#form" ).append( "<input id='nodeType'/><input id='nodeName'/>" )[ 0 ] ),
"form with aliased DOM properties" );
});

This seems to matter for IE8 only, the master branch doesn't have any special logic for classid handling. It seems there's a hight chance someone from the team will run the test suite on IE8 manually at least once in a while which would catch potential problems; we should disable this test just on BrowserStack then.

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Dec 17, 2014

Member

As @jzaefferer mentioned, the whole test doesn't need to be dropped, just the classid part.

Member

mgol commented Dec 17, 2014

As @jzaefferer mentioned, the whole test doesn't need to be dropped, just the classid part.

@mgol mgol added this to the 3.0.0 milestone Dec 17, 2014

@mgol mgol added the Build label Dec 17, 2014

@gibson042

This comment has been minimized.

Show comment
Hide comment
@gibson042

gibson042 Dec 17, 2014

Member

Looking at the source (and wondering why it's in two places 😕), I think it's important for the noData part of that test to check three things:

  • no data for applet and/or embed
  • data for Flash object
  • no data for non-Flash object

So we don't need an applet or applet object, but we do need a non-Flash object—maybe PDF (clsid:CA8A9780-280D-11CF-A24D-444553540000)? It seems to work on at least IE7-9, Android 2.3, iOS 5.1, and modern Chrome and Firefox.

Member

gibson042 commented Dec 17, 2014

Looking at the source (and wondering why it's in two places 😕), I think it's important for the noData part of that test to check three things:

  • no data for applet and/or embed
  • data for Flash object
  • no data for non-Flash object

So we don't need an applet or applet object, but we do need a non-Flash object—maybe PDF (clsid:CA8A9780-280D-11CF-A24D-444553540000)? It seems to work on at least IE7-9, Android 2.3, iOS 5.1, and modern Chrome and Firefox.

@mgol mgol self-assigned this Jan 5, 2015

mgol added a commit to mgol/jquery that referenced this issue Jan 25, 2015

Data: Use a PDF object instead of a Java applet for acceptData testing
This should fix "Java out of date" errors on BrowserStack.

Fixes gh-1938

mgol added a commit to mgol/jquery that referenced this issue Jan 25, 2015

Data: Use a PDF object instead of a Java applet for acceptData testing
This should fix "Java out of date" errors on BrowserStack.

Fixes gh-1938
Closes gh-2028

mgol added a commit to mgol/jquery that referenced this issue Jan 29, 2015

Data: Use a PDF object instead of a Java applet for acceptData testing
This should fix "Java out of date" errors on BrowserStack.

Fixes gh-1938
Closes gh-2028

@mgol mgol closed this in #2028 Jan 29, 2015

mgol added a commit that referenced this issue Jan 29, 2015

Data: Use a PDF object instead of a Java applet for acceptData testing
This should fix "Java out of date" errors on BrowserStack.

(cherry-picked from 087d280)

Fixes gh-1938
Closes gh-2028
@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Mar 25, 2015

Member

Seems we didn't achieve the intended result... Reopening.
screen shot 2015-03-25 at 19 33 20

Member

mgol commented Mar 25, 2015

Seems we didn't achieve the intended result... Reopening.
screen shot 2015-03-25 at 19 33 20

@mgol mgol reopened this Mar 25, 2015

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Mar 25, 2015

Member

The following code triggers the dialog:

jQuery.acceptData( document.createElement( "applet" ) );

see

ok( jQuery.acceptData( document.createElement( "applet" ) ), "applet" );

Member

mgol commented Mar 25, 2015

The following code triggers the dialog:

jQuery.acceptData( document.createElement( "applet" ) );

see

ok( jQuery.acceptData( document.createElement( "applet" ) ), "applet" );

mgol added a commit to mgol/jquery that referenced this issue Mar 25, 2015

Data: Skip the acceptData(applet) assertion on TestSwarm.
BrowserStack regularly has outdated Java in their IE instances causing our
data tests to hang & give no output. Skip the assertion if the test is run
via TestSwarm.

Fix gh-1938

mgol added a commit to mgol/jquery that referenced this issue Mar 25, 2015

Data: Drop the acceptData(applet) assertion.
BrowserStack regularly has outdated Java in their IE instances causing our
data tests to hang & give no output. Skip the acceptData(applet) assertion,
it's treated in the same way as an embed element which we're already testing.

Fix gh-1938

mgol added a commit to mgol/jquery that referenced this issue Mar 25, 2015

Data: Drop the acceptData(applet) assertion.
BrowserStack regularly has outdated Java in their IE instances causing our
data tests to hang & give no output. Skip the acceptData(applet) assertion,
it's treated in the same way as an embed element which we're already testing.

Fix gh-1938

mgol added a commit to mgol/jquery that referenced this issue Mar 25, 2015

Data: Drop the tests relying on applets
BrowserStack regularly has outdated Java in their IE instances causing our
data tests to hang & give no output. Skip the tests that create applets,
applets are treated in the same way as an embed elements which we're already
testing.

Fixes gh-1938
Closes gh-2166

@mgol mgol closed this in #2166 Mar 25, 2015

mgol added a commit that referenced this issue Mar 25, 2015

Data: Drop the tests relying on applets
BrowserStack regularly has outdated Java in their IE instances causing our
data tests to hang & give no output. Skip the tests that create applets,
applets are treated in the same way as an embed elements which we're already
testing.

Fixes gh-1938
Refs gh-2028
Refs gh-2166

mgol added a commit that referenced this issue Mar 25, 2015

Data: Drop the tests relying on applets
BrowserStack regularly has outdated Java in their IE instances causing our
data tests to hang & give no output. Skip the tests that create applets,
applets are treated in the same way as an embed elements which we're already
testing.

(partially cherry-picked from a4a18e8)

Fixes gh-1938
Refs gh-2028
Refs gh-2166
@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Mar 25, 2015

Member

Fixes were landed on master, compat, 2.1-stable & 1.11-stable. This should have been really fixed this time.

Member

mgol commented Mar 25, 2015

Fixes were landed on master, compat, 2.1-stable & 1.11-stable. This should have been really fixed this time.

mgol added a commit that referenced this issue Nov 10, 2015

Data: Use a PDF object instead of a Java applet for acceptData testing
This should fix "Java out of date" errors on BrowserStack.

Fixes gh-1938
Closes gh-2028

mgol added a commit that referenced this issue Nov 10, 2015

Data: Drop the tests relying on applets
BrowserStack regularly has outdated Java in their IE instances causing our
data tests to hang & give no output. Skip the tests that create applets,
applets are treated in the same way as an embed elements which we're already
testing.

Fixes gh-1938
Closes gh-2166

@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 2016

@cssmagic cssmagic referenced this issue in cssmagic/ChangeLog May 18, 2016

Open

jQuery #5

@jquery jquery locked as resolved and limited conversation to collaborators Jun 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.