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

[css-typed-om] Clean up StylePropertyMap.delete tests. #9080

Merged
merged 1 commit into from Jan 18, 2018

Conversation

Projects
None yet
4 participants
@chromium-wpt-export-bot
Copy link
Collaborator

chromium-wpt-export-bot commented Jan 18, 2018

This patch does the following to clean up the StylePropertyMap.delete
tests for WPT:

  • We split happy cases and sad cases into separate files.

  • We used to test delete by calling .delete and then checking if .has
    returns false. There are a few problems with this:

    • it's arbitrary why we use .has (and not, say, .get) to check if the
      property was deleted.
    • our tests for .delete depend on .has to be implemented correctly.
    • we are not actually testing that the property was removed from
      element's style (i.e. the style map may not propagate changes to the
      element's style correctly and the tests wouldn't catch that).

    So, to avoid these downsides, we change the tests to call .delete
    and then checking the element's actual style from CSSOM.

  • For some reason declared didn't have .delete tests but had an
    expectation file. We add a test for declared .delete, which is
    basically the same as the inline tests but using a rule instead of
    an element.

  • We removed the .tentative extension.

Bug: 774887
Change-Id: Ie911b62e493d0ce371b85b1a1a0597fac4ca3f4e
Reviewed-on: https://chromium-review.googlesource.com/872515
Commit-Queue: Darren Shen shend@chromium.org
Reviewed-by: nainar nainar@chromium.org
Cr-Commit-Position: refs/heads/master@{#530113}

@wpt-pr-bot
Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Jan 18, 2018

Build PASSED

Started: 2018-01-18 11:16:21
Finished: 2018-01-18 11:42:07

Failing Jobs

  • safari:11.0
  • MicrosoftEdge:14.14393

View more information about this build on:

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-872515 branch from abe9395 to 0091b00 Jan 18, 2018

[css-typed-om] Clean up StylePropertyMap.delete tests.
This patch does the following to clean up the StylePropertyMap.delete
tests for WPT:

- We split happy cases and sad cases into separate files.

- We used to test delete by calling .delete and then checking if .has
  returns false. There are a few problems with this:
  - it's arbitrary why we use .has (and not, say, .get) to check if the
    property was deleted.
  - our tests for .delete depend on .has to be implemented correctly.
  - we are not actually testing that the property was removed from
    element's style (i.e. the style map may not propagate changes to the
    element's style correctly and the tests wouldn't catch that).

  So, to avoid these downsides, we change the tests to call .delete
  and then checking the element's actual style from CSSOM.

- For some reason declared didn't have .delete tests but had an
  expectation file. We add a test for declared .delete, which is
  basically the same as the inline tests but using a rule instead of
  an element.

- We removed the .tentative extension.

Bug: 774887
Change-Id: Ie911b62e493d0ce371b85b1a1a0597fac4ca3f4e
Reviewed-on: https://chromium-review.googlesource.com/872515
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530113}

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-872515 branch from 0091b00 to 25682b2 Jan 18, 2018

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 4f82697 into master Jan 18, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-872515 branch Jan 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.