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

Allow tests to access local version of web worker. #9475

Merged
merged 8 commits into from May 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/web-worker/amp-worker.js
Expand Up @@ -74,9 +74,10 @@ class AmpWorker {
loc = win.testLocation;
}
// Use RTV to make sure we fetch prod/canary/experiment correctly.
const useRtvVersion = !getMode().localDev && !getMode().test;
const useLocal = getMode().localDev || getMode().test;
const useRtvVersion = !useLocal;
const url = calculateEntryPointScriptUrl(
loc, 'ww', getMode().localDev, useRtvVersion);
loc, 'ww', useLocal, useRtvVersion);
dev().fine(TAG, 'Fetching web worker from', url);

/** @private {Worker} */
Expand Down