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

Change error integration test to use fragment based dev-mode inference #1388

Merged
merged 1 commit into from
Jan 13, 2016

Conversation

cramforce
Copy link
Member

instead of the legacy attribute based code path.

Also fixes the validator integration test to use the new validator URL and provides for a way to turn on dev mode while a page is embedded into a viewer (through the viewer).

Part of #999

…es instead

of the legacy attribute based code path.

Also fixes the validator integration test to use the new validator URL
and provides for a way to turn on dev mode while a page is embedded into
a viewer (through the viewer).

Part of ampproject#999
@cramforce
Copy link
Member Author

CC @jmadler

@erwinmombay
Copy link
Member

@dvoytenko do you have any concerns?

@@ -59,11 +59,13 @@ function getMode_() {
// occur during local dev.
!!document.querySelector('script[src*="/dist/"],script[src*="/base/"]');

const overrideDevelopment = parseQueryString(location.hash)['development'];
const overrideDevelopment = parseQueryString(
// location.originalHash is set by the viewer when it removes the fragment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, Viewer also remembers all original args in hash and can return them via getParam(name). You can always use this if convenient/possible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't want mode.js depend on viewer.

@dvoytenko
Copy link
Contributor

Couple comments, but otherwise LGTM.

@erwinmombay erwinmombay assigned dvoytenko and unassigned erwinmombay Jan 13, 2016
cramforce added a commit that referenced this pull request Jan 13, 2016
Change error integration test to use fragment based dev-mode inference
@cramforce cramforce merged commit ffbbdb9 into ampproject:master Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants