forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverwrite-content-alignment.html
34 lines (32 loc) · 1.25 KB
/
overwrite-content-alignment.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<style>
.parent {
display: -webkit-flex;
}
.parent .child {
display: -webkit-flex;
justify-content: unsafe flex-end;
align-content: safe center;
}
#parentId .child {
justify-content: space-between;
align-content: space-around;
}
</style>
<script src="../resources/js-test.js"></script>
<div class="parent">
<div id="childOfDefaultParent" class="child"></div>
</div>
<div id="parentId" class="parent">
<div id="childOfParentId" class="child"></div>
</div>
<script src="resources/alignment-parsing-utils.js"></script>
<script>
description('Test overwriting justify-content and align-content works as expected');
var childOfDefaultParent = document.getElementById("childOfDefaultParent");
shouldBeEqualToString("getComputedStyle(childOfDefaultParent, '').getPropertyValue('justify-content')", "unsafe flex-end");
shouldBeEqualToString("getComputedStyle(childOfDefaultParent, '').getPropertyValue('align-content')", "safe center");
var childOfParentId = document.getElementById("childOfParentId");
shouldBeEqualToString("getComputedStyle(childOfParentId, '').getPropertyValue('justify-content')", "space-between");
shouldBeEqualToString("getComputedStyle(childOfParentId, '').getPropertyValue('align-content')", "space-around");
</script>