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
Conversation
There was a problem hiding this 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
.
assumptions/html-elements.html
Outdated
}, "ul > li is display: block"); | ||
|
||
test(function() { | ||
var ol_li = document.getElementsByTagName("li")[0]; |
There was a problem hiding this comment.
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
assumptions/html-elements.html
Outdated
|
||
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"); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why?
There was a problem hiding this comment.
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?
430f244
to
24f08e8
Compare
Chrome (unstable channel)Testing web-platform-tests at revision d9d5f21 All results/assumptions/initial-color.html
/assumptions/min-font-size.html
/assumptions/html-elements.html
/assumptions/medium-font-size.html
/assumptions/canvas-background.html
|
Firefox (nightly channel)Testing web-platform-tests at revision d9d5f21 All results/assumptions/initial-color.html
/assumptions/min-font-size.html
/assumptions/html-elements.html
/assumptions/medium-font-size.html
/assumptions/canvas-background.html
|
dba11f5
to
6e54ae6
Compare
w3c-test:mirror |
This starts to resolve web-platform-tests#3827
6e54ae6
to
4aa5ab3
Compare
@Ms2ger r? |
assumptions/html-elements.html
Outdated
|
||
test(function() { | ||
assert_in_array(window.getComputedStyle(document.querySelector("div.c")).backgroundColor, | ||
["rgba(0, 0, 0, 0)", "transparent"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
assumptions/html-elements.html
Outdated
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"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
assumptions/html-elements.html
Outdated
var ul_li = document.querySelector("ul > li"); | ||
var styles = window.getComputedStyle(ul_li); | ||
assert_equals(styles["display"], "list-item"); | ||
}, "ul > li is display: block"); |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth testing th
?
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't one.
This starts to resolve #3827
This change is