Preloading WPT: run invalid-rules for prerender too #40667
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The purpose of this CL is to create a common/ directory, alongside prefetch/ and prerender/, and do the work necessary to support writing tests that cover both technologies at once.
The script-supports-speculationrules.html test moves there, as it's trivial. The more interesting one is invalid-rules.https.html.
To move that and generalize it to run for both prefetch and prerender, we need a framework that allows us to test either technology. I built one on top of RemoteContextHelper, generalizing some of the utilities that were already in prerender/resources/utils.js. Note that I had several choices:
We'll see how well my choice works in future CLs. In any case, to avoid adding yet another communications framework, I migrated prerender's RemoteContextHelper usage to this newer more-general framework (called "PreloadingRemoteContextHelper"), with minor specializations (in a "PrerenderingRemoteContextHelper" class). So at least the number of choices hasn't increased.
Bug: 1456579
Change-Id: Ibe90101faf351db7c787799d1583906c72ba9491
Reviewed-on: https://chromium-review.googlesource.com/4630875
WPT-Export-Revision: 2a3e270e8bf75b3b3cb471023d62abfc6932efae