Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensors: Cleanup iframe-related tests. #25626

Merged
merged 1 commit into from Sep 21, 2020
Merged

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 18, 2020

Even after r807421 those tests are presenting some occasional flakiness in
the form of timeouts and, in a few cases, crashes in other parts of the
stack.

Clean up the code a little bit to make the code easier to follow and perhaps
reduce the chance of timeouts:

  • send_message_to_frame() does not need to be an async function.
  • Use t.add_cleanup() to a few tests to make sure any iframe we add is
    properly removed even if an error occurs.
  • Remove all calls to the assert_*() functions from both the code path used
    by initialize_generic_sensor_tests() as well as generic_sensor_mocks.js,
    so that we no longer need to include testharness.js in the iframe handler
    page.
  • Make the onmessage handler in the iframe page also send a reply when
    errors occur.

Bug: 1073865
Change-Id: Id6f682c95212d7ad9662f8aadad31c866752b0af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418333
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808497}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

The review process for this patch is being conducted in the Chromium project.

Loading

Even after r807421 those tests are presenting some occasional flakiness in
the form of timeouts and, in a few cases, crashes in other parts of the
stack.

Clean up the code a little bit to make the code easier to follow and perhaps
reduce the chance of timeouts:
* send_message_to_frame() does not need to be an async function.
* Use t.add_cleanup() to a few tests to make sure any iframe we add is
  properly removed even if an error occurs.
* Remove all calls to the assert_*() functions from both the code path used
  by initialize_generic_sensor_tests() as well as generic_sensor_mocks.js,
  so that we no longer need to include testharness.js in the iframe handler
  page.
* Make the onmessage handler in the iframe page also send a reply when
  errors occur.

Bug: 1073865
Change-Id: Id6f682c95212d7ad9662f8aadad31c866752b0af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418333
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808497}
@rakuco
Copy link
Contributor

@rakuco rakuco commented Sep 21, 2020

@stephenmcgruer can you force-merge this one? This is https://crbug.com/1126926 again (there's a fix in the works that should land soon).

Loading

@stephenmcgruer stephenmcgruer merged commit 9fa293b into master Sep 21, 2020
22 of 24 checks passed
Loading
@stephenmcgruer stephenmcgruer deleted the chromium-export-cl-2418333 branch Sep 21, 2020
@rakuco
Copy link
Contributor

@rakuco rakuco commented Sep 21, 2020

Whoa, that was fast :-) Thanks!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants