Skip to content

Data: Drop the tests relying on applets #2166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2015
Merged

Data: Drop the tests relying on applets #2166

merged 1 commit into from
Mar 25, 2015

Conversation

mgol
Copy link
Member

@mgol mgol commented Mar 25, 2015

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

(note to myself: if accepted, remember to cherry-pick this to 2.1-stable & 1.11-stable together with #2028)

Original description:

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.

// Skip it on TestSwarm.
if ( location.search.indexOf( "swarmURL=" ) === -1 ) {
ok( jQuery.acceptData( document.createElement( "applet" ) ), "applet" );
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do this; just drop the assertion unconditionally and let the preceding one cover it. See #1938 (comment) ("we don't need an applet or applet object") and observe that applet and embed get identical treatment:

jquery/src/data.js

Lines 242 to 249 in 7b11131

// The following elements (space-suffixed to avoid Object.prototype collisions)
// throw uncatchable exceptions if you attempt to set expando properties
noData: {
"applet ": true,
"embed ": true,
// ...but Flash objects (which have this classid) *can* handle expandos
"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
},

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -773,7 +773,6 @@ test("jQuery.acceptData", 11, function() {
ok( jQuery.acceptData( document.documentElement ), "documentElement" );
ok( jQuery.acceptData( {} ), "object" );
ok( jQuery.acceptData( document.createElement( "embed" ) ), "embed" );
ok( jQuery.acceptData( document.createElement( "applet" ) ), "applet" );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decrement the expected count to 10, then it's all set.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this time I run it and the tests pass. ;)

@mgol mgol force-pushed the java branch 2 times, most recently from 3e28421 to 47860e1 Compare March 25, 2015 21:59
@mgol
Copy link
Member Author

mgol commented Mar 25, 2015

@gibson042 I had to drop one other test that was creating an applet, can you have a look? All those tests are run on embed as well so it should be fine.

I'm doing it all today in case of BrowserStack fixing this "Java out of date" bug so that I can be sure this time I've really fixed it.

@mgol mgol changed the title Data: Skip the acceptData(applet) assertion on TestSwarm. Data: Drop the tests relying on applets Mar 25, 2015
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 jquerygh-1938
Closes jquerygh-2166
@mgol mgol merged commit 95c0a10 into jquery:master Mar 25, 2015
@mgol mgol deleted the java branch March 25, 2015 22:18
@mgol
Copy link
Member Author

mgol commented Mar 25, 2015

I landed this; I didn't want to wait as it was causing TestSwarm to continuously restart IE data tests. It worked: http://swarm.jquery.org/job/216. Cherry-picking in progress...

mgol added a commit that referenced this pull request Mar 25, 2015
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 pull request Mar 25, 2015
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 added a commit that referenced this pull request Nov 10, 2015
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
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Disable test(s) relying on Java applets on BrowserStack
3 participants