Skip to content
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

Pass down the parent URL to disable glade in doubleclick test #3102

Merged
merged 1 commit into from
May 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions test/integration/test-amp-ad-doubleclick.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,10 @@ describe('Rendering of one ad', () => {
function replaceUrl(win) {
// TODO(#2402) Support glade as well.
const path = '/test/fixtures/doubleclick.html?google_glade=0';
try {
win.location.hash = 'google_glade=0';
win.history.replaceState(null, null, path);
} catch (e) {
// Browsers are weird. Firefox gets here. We do, however, also in
// firefox pass down the parent URL. So we change that, which we
// can. We just need to change it back after the test.
beforeHref = win.parent.location.href;
win.parent.history.replaceState(null, null, path);
}
// We pass down the parent URL. So we change that, which we
// can. We just need to change it back after the test.
beforeHref = win.parent.location.href;
win.parent.history.replaceState(null, null, path);
}

beforeEach(() => {
Expand Down