Skip to content

[wpt] Support MojoJS in Chrome Dev#24979

Merged
Hexcles merged 2 commits intomasterfrom
chrome-mojojs
Aug 14, 2020
Merged

[wpt] Support MojoJS in Chrome Dev#24979
Hexcles merged 2 commits intomasterfrom
chrome-mojojs

Conversation

@Hexcles
Copy link
Member

@Hexcles Hexcles commented Aug 12, 2020

Automatically download mojojs.zip and turn on relevant flags for Chrome
Dev. Follow-up to #24739.

Test: ./wpt run --channel dev --log-mach - chrome webxr

Automatically download mojojs.zip and turn on relevant flags for Chrome
Dev. Follow-up to #24739.
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24979 August 12, 2020 18:00 Inactive
Copy link
Contributor

@stephenmcgruer stephenmcgruer left a comment

Choose a reason for hiding this comment

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

LGTM, though I'm concerned that re-running mojoJS tests is going to needlessly grab them from the network


def install_mojojs(self, dest):
url = self._latest_chromium_snapshot_url() + "mojojs.zip"
def install_mojojs(self, dest, channel, browser_binary):
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this check if the mojojs bindings already exist before trying to download them?

Copy link
Member Author

Choose a reason for hiding this comment

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

We could, but we'd need to create a local lock file to record the version of the downloaded mojojs.zip; and it would only save us ~200KiB. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh for some reason I assumed the unzipped contents would be in a version-specific folder, and we could just check for that.

I'd still like to see us do this, but I'm ok to see it done in a future CL.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd still like to see us do this, but I'm ok to see it done in a future CL.

I just realized that this will happen for all tests that anyone runs on Chrome, rather than just mojojs tests (right?). Assuming I'm right, I will double down to I think we should do such caching... but again I'm ok with landing this as long as the follow-up happens :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. PTAL.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, this looks fine to me. So if someone goes between channels (or Chrome updates) they will re-download, but thats probably rare and thus fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. If I'm reading the source code correctly, the seed for message scrambling is the full version string; if so, then one doesn't need to redownload if they already have the exact same version of mojojs.zip regardless of the builder or channel. But that's a big if, and it also depends on an implementation detail, so I decided to be safe here.


def install_mojojs(self, dest):
url = self._latest_chromium_snapshot_url() + "mojojs.zip"
def install_mojojs(self, dest, channel, browser_binary):
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, this looks fine to me. So if someone goes between channels (or Chrome updates) they will re-download, but thats probably rare and thus fine.

@Hexcles Hexcles merged commit 4398d74 into master Aug 14, 2020
@Hexcles Hexcles deleted the chrome-mojojs branch August 14, 2020 20:58
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