amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

In `Viewer` constructor, call `documentStateFor` with `win` param

Open britice opened this issue 10 years ago • 1 comments

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);

britice avatar Feb 12 '16 22:02 britice

Closed by #2080.

jridgewell avatar Feb 17 '16 23:02 jridgewell