diff options
Diffstat (limited to 'testing/web-platform/tests/css/zoom')
12 files changed, 155 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/zoom/tentative/background-image-ref.html b/testing/web-platform/tests/css/zoom/tentative/background-image-ref.html new file mode 100644 index 0000000000..6fe548f343 --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/background-image-ref.html @@ -0,0 +1,10 @@ +<!doctype html> +<title>CSS Test Reference</title> +<style> +div { + width: 10px; + height: 10px; + background-image: image-set(url("/images/pattern.png") 2x); +} +</style> +<div></div> diff --git a/testing/web-platform/tests/css/zoom/tentative/background-image.html b/testing/web-platform/tests/css/zoom/tentative/background-image.html new file mode 100644 index 0000000000..db6baa60db --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/background-image.html @@ -0,0 +1,12 @@ +<!doctype html> +<title>Zoom affects background-image intrinsic sizes</title> +<link rel="match" href="background-image-ref.html"> +<style> +div { + width: 20px; + height: 20px; + zoom: 0.5; + background-image: url("/images/pattern.png"); /* 20x20 */ +} +</style> +<div></div> diff --git a/testing/web-platform/tests/css/zoom/tentative/basic-ref.html b/testing/web-platform/tests/css/zoom/tentative/basic-ref.html new file mode 100644 index 0000000000..5de90caf7f --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/basic-ref.html @@ -0,0 +1,10 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS test reference</title> +<style> +div { + background-color: green; +} +</style> +<div style="width: 100px; height: 100px"></div> +<div style="width: 200px; height: 200px;"></div> diff --git a/testing/web-platform/tests/css/zoom/tentative/basic.html b/testing/web-platform/tests/css/zoom/tentative/basic.html new file mode 100644 index 0000000000..fcd1761cfa --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/basic.html @@ -0,0 +1,15 @@ +<!doctype html> +<meta charset="utf-8"> +<title>zoom property: basic test</title> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.com" title="Mozilla"> +<link rel="match" href="basic-ref.html"> +<style> +div { + width: 100px; + height: 100px; + background-color: green; +} +</style> +<div></div> +<div style="zoom: 2"></div> diff --git a/testing/web-platform/tests/css/zoom/tentative/green-square-100px.html b/testing/web-platform/tests/css/zoom/tentative/green-square-100px.html new file mode 100644 index 0000000000..6677176230 --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/green-square-100px.html @@ -0,0 +1,3 @@ +<!doctype html> +<meta charset="utf-8"> +<div style="width: 100px; height: 100px; background-color: green"></div> diff --git a/testing/web-platform/tests/css/zoom/tentative/image-intrinsic-size.html b/testing/web-platform/tests/css/zoom/tentative/image-intrinsic-size.html new file mode 100644 index 0000000000..d152bb24ee --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/image-intrinsic-size.html @@ -0,0 +1,14 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Zoom affects image intrinsic sizes</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<link rel="help" href="https://drafts.csswg.org/css-viewport/#zoom-property"> +<link rel="match" href="background-image-ref.html"> +<style> +img { + vertical-align: top; + zoom: .5; +} +</style> +<img src="/images/pattern.png"> diff --git a/testing/web-platform/tests/css/zoom/tentative/inherited-length.html b/testing/web-platform/tests/css/zoom/tentative/inherited-length.html new file mode 100644 index 0000000000..2bc04ff0cb --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/inherited-length.html @@ -0,0 +1,14 @@ +<!doctype html> +<meta charset="utf-8"> +<title>zoom property: inherited length into zoom</title> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.com" title="Mozilla"> +<link rel="match" href="green-square-100px.html"> +<style> +div { + background-color: green; +} +</style> +<div style="width: 100px; height: 100px;"> + <div style="zoom: 2; width: inherit;"></div> +</div> diff --git a/testing/web-platform/tests/css/zoom/tentative/inherited.html b/testing/web-platform/tests/css/zoom/tentative/inherited.html new file mode 100644 index 0000000000..baa7f7ed8a --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/inherited.html @@ -0,0 +1,20 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Effective zoom value is inherited</title> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.com" title="Mozilla"> +<link rel="match" href="basic-ref.html"> +<style> +.container { + zoom: 2; +} +.child { + width: 100px; + height: 100px; + background-color: green; +} +</style> +<div class="child"></div> +<div class="container"> + <div class="child"></div> +</div> diff --git a/testing/web-platform/tests/css/zoom/tentative/parsing/zoom-computed.html b/testing/web-platform/tests/css/zoom/tentative/parsing/zoom-computed.html new file mode 100644 index 0000000000..3737901490 --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/parsing/zoom-computed.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Test: getComputedStyle().zoom</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<div id="target"></div> +<script> +test_computed_value("zoom", "normal", "1"); + +test_computed_value("zoom", "1", "1"); +test_computed_value("zoom", "1.5", "1.5"); +test_computed_value("zoom", "0.75", "0.75"); + +test_computed_value("zoom", "100%", "1"); +test_computed_value("zoom", "150%", "1.5"); +test_computed_value("zoom", "75%", "0.75"); + +// Legacy crap, wat +test_computed_value("zoom", "0", "1"); +test_computed_value("zoom", "0%", "1"); +</script> diff --git a/testing/web-platform/tests/css/zoom/tentative/parsing/zoom-valid.html b/testing/web-platform/tests/css/zoom/tentative/parsing/zoom-valid.html new file mode 100644 index 0000000000..3db16e0748 --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/parsing/zoom-valid.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Test: parsing zoom with valid and invalid values</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.com"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<body> +<script> +test_valid_value("zoom", "normal"); +test_valid_value("zoom", "1"); +test_valid_value("zoom", "100%"); +test_valid_value("zoom", "0"); +test_valid_value("zoom", "0%"); +test_valid_value("zoom", "1.5"); +test_valid_value("zoom", "150%") +test_valid_value("zoom", "75%"); +test_valid_value("zoom", "0.5"); + +test_invalid_value("zoom", "auto"); +test_invalid_value("zoom", "-100%"); +test_invalid_value("zoom", "-200%"); +test_invalid_value("zoom", "-1"); +test_invalid_value("zoom", "-2"); +</script> diff --git a/testing/web-platform/tests/css/zoom/tentative/scroll-corner-crash.html b/testing/web-platform/tests/css/zoom/tentative/scroll-corner-crash.html new file mode 100644 index 0000000000..0ec88deb74 --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/scroll-corner-crash.html @@ -0,0 +1,7 @@ +<style> +* { + overflow: scroll scroll; +} +</style> +<h4 style="zoom: 3"> +<figure> diff --git a/testing/web-platform/tests/css/zoom/tentative/scrollbar-crash.html b/testing/web-platform/tests/css/zoom/tentative/scrollbar-crash.html new file mode 100644 index 0000000000..791022407f --- /dev/null +++ b/testing/web-platform/tests/css/zoom/tentative/scrollbar-crash.html @@ -0,0 +1,2 @@ +<textarea style="zoom: 0.20"> + |