Skip to main content

Bug Tracker

Side navigation

#9555 closed bug (fixed)

Opened June 09, 2011 02:12PM UTC

Closed July 12, 2011 09:12PM UTC

jQuery.support fails in iframe

Reported by: Krinkle Owned by:
Priority: low Milestone: 1.next
Component: support Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

The test suite for jQuery.support has been failing for a looong time in the TestSwarm. From my rough estimates I think my jquery-swarm vm spends over 30% of the time re-testing jQuery.support).

Not a single browser that is in the swarm returns something at all for that module. (they all time-out or throw exceptions).

This can be seen here:

http://swarm.jquery.org/job/1238/

It fails everywhere.

However when running it standalone, such as from here:

http://swarm.jquery.org/git/jquery/39c6c85/test/index.html?filter=support

... then it works fine.

Steps to reproduce

  • Go to a random page with jQuery on it (say, the last url linked above)
  • Open up the console and execute:
jQuery('body').html( '<iframe src="http://swarm.jquery.org/git/jquery/39c6c85/test/index.html?filter=support" width="100%" height="100%">' );
  • Result:
TypeError: Result of expression 'window.top.supportCallback' [undefined] is not a function.
Attachments (0)
Change History (10)

Changed June 29, 2011 07:00PM UTC by timmywil comment:1

component: unfiledmisc
priority: undecidedlow
resolution: → invalid
status: newclosed

I'm not sure what's going on there, but it doesn't seem like a jQuery core problem.

Changed June 29, 2011 07:41PM UTC by Krinkle comment:2

QUnit tests are part of jQuery's core repository. A failing test means either the test needs fixing or the unit being tested does.

I think the unit being tested is failing. Try preforming the jQuery actions in support from within an iframe. It's incorrectly accessing windows, assuming the rootjQuery is in the top window.

Changed July 11, 2011 06:44AM UTC by pascal.bach@siemens.com comment:3

I can confirm this problem. It makes it impossible to run the JQuery tests in TestSwarm.

Why is this marked as invalid?

Changed July 11, 2011 01:20PM UTC by timmywil comment:4

component: miscsupport
resolution: invalid
status: closedreopened

Changed July 11, 2011 01:23PM UTC by timmywil comment:5

status: reopenedopen

Now confirmed with test case

Changed July 11, 2011 01:25PM UTC by timmywil comment:6

This above link runs your local jQuery test suite, adjust the address as needed.

Changed July 11, 2011 05:19PM UTC by Krinkle comment:7

Not sure jsFiddle allows echo/html through GET (I couldn't get it to work).

Here's a test case off jsFiddle: http://toolserver.org/~krinkle/tmp/jqbug-9555-frame/

Steps to reproduce:

  • check out fresh github-jquery-jquery-master
  • include github-jquery-qunit as well in /test/qunit
  • Create a new .html page only containing an iframe pointing to jquery/test/index.html?filter=support

Changed July 12, 2011 05:55PM UTC by rwaldron comment:8

Confirmed. "Uncaught TypeError: Object [object DOMWindow] has no method 'supportCallback'"

Changed July 12, 2011 07:37PM UTC by Krinkle comment:9

Changed July 12, 2011 09:12PM UTC by Krinkle comment:10

resolution: → fixed
status: openclosed

Landing pull request 433. Fix testswarm test cases. Fixes #9555.

More Details:

Changeset: 28b470d7d38c5c3d7d478f9c3f3b743bdae57b1b