amphtml
amphtml copied to clipboard
In `Viewer` constructor, call `documentStateFor` with `win` param
Expected behavior would have the Viewer get the DocumentState from the window object passed as a parameter to the constructor rather that the global window object. Using the expected behavior would potentially allow for more flexibility in testing by mocking the DocumentState on the window object passed to the Viewer.
See the Viewer constructor in viewer-impl.js. The specific code is:
this.docState_ = documentStateFor(window);
Closed by #2080.