Bug Tracker

Modify

Ticket #9555 (closed bug: fixed)

Opened 2 years ago

Last modified 23 months ago

jQuery.support fails in iframe

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

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.
    

Change History

comment:1 Changed 2 years ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed
  • Component changed from unfiled to misc

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

comment:2 Changed 2 years ago by Krinkle

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.

comment:3 Changed 23 months ago by pascal.bach@…

I can confirm this problem. It makes it impossible to run the JQuery tests in TestSwarm. Why is this marked as invalid?

comment:4 Changed 23 months ago by timmywil

  • Status changed from closed to reopened
  • Resolution invalid deleted
  • Component changed from misc to support

comment:5 Changed 23 months ago by timmywil

  • Status changed from reopened to open

Now confirmed with  test case

comment:6 Changed 23 months ago by timmywil

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

comment:7 Changed 23 months ago by Krinkle

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

comment:8 Changed 23 months ago by rwaldron

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

comment:10 Changed 23 months ago by Krinkle

  • Status changed from open to closed
  • Resolution set to fixed

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

More Details:

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.