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

AmbientLightSensor: add some basic functionality tests #3696

Merged

Conversation

Honry
Copy link
Contributor

@Honry Honry commented Sep 12, 2016

Cover start(), stop(), onchange, onstatechange and also secure stuff when browsing context

@wpt-pr-bot
Copy link
Collaborator

Reviewers for this pull request are: @Volker-E, @dontcallmedom, @riju, @tobie, and @zqzhang.

});

test(function() {
assert_equals(sensor.state, "activating");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is better to put all these assertions in this test file together within ambient-light/AmbientLightSensor_onstatechange.html.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zqzhang, thanks for your comments! Agree!

@zqzhang
Copy link
Contributor

zqzhang commented Sep 13, 2016

@Honry I mean it is better to combine all the tests in AmbientLightSensor_{onchange|start|stop}.html into one test file, and to check things in each state, e.g. before and after start, before and after stop. Then the duplicates go away by nature.

@Honry
Copy link
Contributor Author

Honry commented Sep 13, 2016

@zqzhang, initially I designed 3 test files for onstatechange, start, and stop since they may be extended with more checkpoints in future, such as permission, 'active' state, reporting mode and etc., to make each test file distinct. WDYT?

Cover start(), stop(), onchange, onstatechange and secure stuff when browsing context
Which has been covered in AmbientLightSensor_onstatechange.html
@zqzhang zqzhang merged commit ba98b4f into web-platform-tests:master Sep 18, 2016
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.

None yet

3 participants