mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
Update web-platform-tests to revision 36634cbcf3253dfe8d220990a27ad4eeebf8ec2f
This commit is contained in:
parent
0964d055cd
commit
7295abcc2a
245 changed files with 5966 additions and 1901 deletions
|
@ -14,21 +14,32 @@ iframe {
|
|||
<div id="log"></div>
|
||||
<div id="ancestor"><iframe></iframe></div>
|
||||
<script>
|
||||
function assert_dir_properties(style, propBase, value, state) {
|
||||
for (let dir of ["Top", "Right", "Bottom", "Left"]) {
|
||||
let prop = propBase.replace('{}', dir);
|
||||
assert_equals(style[prop], value, `${state} ${prop} style`);
|
||||
}
|
||||
}
|
||||
|
||||
async_test(t => {
|
||||
const ancestor = document.getElementById('ancestor');
|
||||
const iframe = ancestor.firstChild;
|
||||
|
||||
const initialStyle = getComputedStyle(iframe);
|
||||
assert_equals(initialStyle.border, '1px solid rgb(0, 0, 255)', 'initial border style');
|
||||
assert_equals(initialStyle.padding, '1px', 'initial padding style');
|
||||
assert_dir_properties(initialStyle, 'border{}Width', '1px', 'initial');
|
||||
assert_dir_properties(initialStyle, 'border{}Style', 'solid', 'initial');
|
||||
assert_dir_properties(initialStyle, 'border{}Color', 'rgb(0, 0, 255)', 'initial');
|
||||
assert_dir_properties(initialStyle, 'padding{}', '1px', 'initial');
|
||||
assert_equals(initialStyle.transform, 'matrix(0.5, 0, 0, 0.5, 0, 0)', 'initial transform style');
|
||||
|
||||
trusted_request(t, iframe);
|
||||
|
||||
document.addEventListener('fullscreenchange', t.step_func_done(() => {
|
||||
const fullscreenStyle = getComputedStyle(iframe);
|
||||
assert_equals(fullscreenStyle.border, '0px none rgb(0, 0, 0)', 'fullscreen border style');
|
||||
assert_equals(fullscreenStyle.padding, '0px', 'fullscreen padding style');
|
||||
assert_dir_properties(fullscreenStyle, 'border{}Width', '0px', 'fullscreen');
|
||||
assert_dir_properties(fullscreenStyle, 'border{}Style', 'none', 'fullscreen');
|
||||
assert_dir_properties(fullscreenStyle, 'border{}Color', 'rgb(0, 0, 0)', 'fullscreen');
|
||||
assert_dir_properties(fullscreenStyle, 'padding{}', '0px', 'fullscreen');
|
||||
assert_equals(fullscreenStyle.transform, 'none', 'fullscreen transform style');
|
||||
}));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue