sensors: Only call test_driver.set_permission from the top-level window. #25649
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.
testdriver.js' documentation says "presently, testdriver.js only works
in the top-level test browsing context (and not therefore in any frame
or window opened from it".
If we do not restrict the set_permission() call here, the call to
initialize_generic_sensor_tests() in
generic-sensor/resources/iframe_sensor_handler.html will time out
waiting for it to complete when running the iframe tests outside the
Chromium CI (i.e. in wpt.fyi or with "wpt run").
Change-Id: I522a5ebacb7da9e35bbe2ea3564d3288a34c653b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421671
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Robert Ma <robertma@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#808874}