blob: e5d32f0cd8a505f02cbe2da220fc8992ad73bc52 [file] [edit]
<!DOCTYPE html>
<meta charset="utf-8">
<title>-webkit-border-image: width with a fixed length before a non-length edge round-trips</title>
<link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=320355">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<body>
<script>
function roundTrip(value) {
const el = document.createElement("div");
el.style.setProperty("-webkit-border-image", value);
return el.style.getPropertyValue("-webkit-border-image");
}
test(() => {
assert_not_equals(roundTrip('url("dummy://x") 10 / 5% 10px stretch'), "",
"percentage-then-length width should round-trip");
}, "-webkit-border-image width `5% 10px` (non-length before length) serializes");
test(() => {
assert_not_equals(roundTrip('url("dummy://x") 10 / 10px 5% stretch'), "",
"length-then-percentage width should round-trip");
}, "-webkit-border-image width `10px 5%` (length before non-length) serializes");
</script>
</body>