If page is an iframed test page, use parent's location to determine script's location#6710
Merged
aghassemi merged 4 commits intoampproject:masterfrom Dec 16, 2016
Merged
Conversation
Contributor
Author
|
@dvoytenko As discussed, switched to using testLocation |
dvoytenko
approved these changes
Dec 16, 2016
testing/iframe.js
Outdated
| // the test iframe is about:srcdoc. | ||
| // Unfortunately location object is not configurable, so we have to define | ||
| // a new property. | ||
| win.testLocation = new FakeLocation(window.location.href, window); |
Contributor
There was a problem hiding this comment.
Second argument is intended to be win.
| // Flag as being a test window. | ||
| win.AMP_TEST_IFRAME = true; | ||
| win.AMP_TEST = true; | ||
| // Set the testLocation on iframe to parent's location since location of |
Contributor
There was a problem hiding this comment.
Please do the same in the createIframePromise right after iframe.contentWindow.AMP_TEST_IFRAME = true;
And if possible, please also do this in RealWinFixture, right after win.AMP_TEST_IFRAME = true;.
Lith
pushed a commit
to Lith/amphtml
that referenced
this pull request
Dec 22, 2016
Lith
pushed a commit
to Lith/amphtml
that referenced
this pull request
Dec 22, 2016
torch2424
pushed a commit
to torch2424/amphtml
that referenced
this pull request
Jan 3, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#6686 is blocked by this PR.
@chenshay After this PR, you should no longer need to add amp-video script to the video-players.html and we can leave the integration test to be in the backward compatibility mode.