Code review comment for lp:~edwin-grubbs/launchpad/bug-421898-cross-site-timeline-graph

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Summary
-------

A user wanted to embed the timeline graph on their website. This was not working due to the timeline graph's javascript trying to access the parent of the iframe across domain names, which triggered a browser security error. This branch fixes the problem by changing resize_frame to default to an empty string instead of nothing, since that gets converted to "None", since that variable is usually a string matching the id of the iframe.

Tests
-----

./bin/lp-windmill test=lib/canonical/launchpad/windmill/tests/test_registry/test_timeline_graph.py firefox http://launchpad.dev:8085

Demo and Q/A
------------

Demo:
* Start up launchpad.dev
  * Open http://launchpadlibrarian.net/32631714/test_iframe.html
  * You should see the timeline graph, even though the iframe is on the launchpadlibrarian.net domain.

QA:
* Open http://launchpadlibrarian.net/32632477/test_edge_iframe.html
  * You should see the timeline graph, even though the iframe is on the launchpadlibrarian.net domain.

« Back to merge proposal