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

Add tests for some of the assumptions of the test suite #4411

Merged
merged 2 commits into from Feb 9, 2017

Conversation

gsnedders
Copy link
Member

@gsnedders gsnedders commented Jan 2, 2017

This starts to resolve #3827


This change is Reviewable

Copy link
Contributor

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

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

r+ if you fix the li.

}, "ul > li is display: block");

test(function() {
var ol_li = document.getElementsByTagName("li")[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

This one's ul > li, not ol > li


for (var i = 0; i < a_styles.length; i++) {
var property = a_styles[i];
assert_equals(property, b_styles[i], "Same property on #a and #b");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not quite sure if all of this is guaranteed, but I'm not going to worry about it until someone complains.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure why?

Copy link
Member Author

Choose a reason for hiding this comment

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

Like, why aren't you sure if it's all guaranteed?

@w3c-bots
Copy link

w3c-bots commented Feb 8, 2017

Chrome (unstable channel)

Testing web-platform-tests at revision d9d5f21
Using browser at version 58.0.3004.3 dev
Starting 10 test iterations
All results were stable

All results

/assumptions/initial-color.html
Subtest Results
PASS
/assumptions/min-font-size.html
Subtest Results
PASS
/assumptions/html-elements.html
Subtest Results
OK
table is display: table PASS
(pre-req for comparison tests) initial CSS value supported PASS
Compare CSS span definitions (only valid if pre-reqs pass) PASS
tbody is display: table-row-group PASS
(pre-req for comparison tests) all CSS short-hand supported PASS
Compare CSS div definitions (only valid if pre-reqs pass) PASS
ul > li is display: list-item PASS
p is display: block PASS
tr is display: table-row PASS
ol > li is display: list-item PASS
td is display: table-cell PASS
/assumptions/medium-font-size.html
Subtest Results
PASS
/assumptions/canvas-background.html
Subtest Results
PASS

@w3c-bots
Copy link

w3c-bots commented Feb 8, 2017

Firefox (nightly channel)

Testing web-platform-tests at revision d9d5f21
Using browser at version BuildID 20170123125947; SourceStamp 36486fdc3813ef7943ae5b07b4128866d1938a6c
Starting 10 test iterations
All results were stable

All results

/assumptions/initial-color.html
Subtest Results
PASS
/assumptions/min-font-size.html
Subtest Results
PASS
/assumptions/html-elements.html
Subtest Results
OK
table is display: table PASS
(pre-req for comparison tests) initial CSS value supported PASS
Compare CSS span definitions (only valid if pre-reqs pass) PASS
tbody is display: table-row-group PASS
(pre-req for comparison tests) all CSS short-hand supported PASS
Compare CSS div definitions (only valid if pre-reqs pass) FAIL
ul > li is display: list-item PASS
p is display: block PASS
tr is display: table-row PASS
ol > li is display: list-item PASS
td is display: table-cell PASS
/assumptions/medium-font-size.html
Subtest Results
PASS
/assumptions/canvas-background.html
Subtest Results
PASS

@gsnedders gsnedders force-pushed the test-assumptions branch 2 times, most recently from dba11f5 to 6e54ae6 Compare February 8, 2017 14:38
@Ms2ger
Copy link
Contributor

Ms2ger commented Feb 8, 2017

w3c-test:mirror

@gsnedders
Copy link
Member Author

@Ms2ger r?


test(function() {
assert_in_array(window.getComputedStyle(document.querySelector("div.c")).backgroundColor,
["rgba(0, 0, 0, 0)", "transparent"]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation

var a_styles = window.getComputedStyle(a);
var b_styles = window.getComputedStyle(b);

assert_equals(a_styles.length, b_styles.length, "Same properties on both #a and #b");
Copy link
Contributor

Choose a reason for hiding this comment

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

Going to fix the #a references?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought I'd pushed that fix.

var ul_li = document.querySelector("ul > li");
var styles = window.getComputedStyle(ul_li);
assert_equals(styles["display"], "list-item");
}, "ul > li is display: block");
Copy link
Contributor

Choose a reason for hiding this comment

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

No it isn't

}, "tr is display: table-row");

test(function() {
var td = document.getElementsByTagName("td")[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth testing th?

Copy link
Member Author

Choose a reason for hiding this comment

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

This hasn't historically been a documented assumption, hence it wasn't included here. (Nor colgroup, etc.)

@@ -0,0 +1,9 @@
<!doctype html>
<title>Check 1px and 2px font-sizes are different</title>
<link rel="mismatch" href="min-font-size-ref.html">
Copy link
Contributor

Choose a reason for hiding this comment

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

Could use -notref. Not sure what our policy is on that.

Copy link
Member Author

Choose a reason for hiding this comment

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

There isn't one.

@Ms2ger Ms2ger merged commit 4fd5751 into web-platform-tests:master Feb 9, 2017
@gsnedders gsnedders deleted the test-assumptions branch February 9, 2017 16:01
@foolip foolip added infra and removed infra labels Mar 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document assumptions and add tests for them
5 participants