diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /layout/style/test/file_specified_value_serialization_individual_transforms.html | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/style/test/file_specified_value_serialization_individual_transforms.html')
-rw-r--r-- | layout/style/test/file_specified_value_serialization_individual_transforms.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/layout/style/test/file_specified_value_serialization_individual_transforms.html b/layout/style/test/file_specified_value_serialization_individual_transforms.html new file mode 100644 index 0000000000..9dcf85f955 --- /dev/null +++ b/layout/style/test/file_specified_value_serialization_individual_transforms.html @@ -0,0 +1,65 @@ +<!doctype html> +<meta charset=utf-8> +<title>Test for Bug 1207734 (individual transforms)</title> +<!-- + FIXME: This is only here in a separate file since it needs the + layout.css.individual-transform.enabled pref to be set when it runs and the + pref= annotation in mochitest.ini doesn't work on Android (bug 1393326). + Once we turn on that pref by default or fix bug 1393326 we can move this back + into test_specified_value_serialization.html. +--> +<script> +const is = opener.is.bind(opener); +function finish() { + const o = opener; + self.close(); + o.SimpleTest.finish(); +} + +function runTest() { + // Test for rotate property serialization. + [ + [" 90deg ", "90deg"], + [" 100grad ", "100grad"], + [" 100gRaD ", "100grad"], + [" 0.25turn ", "0.25turn"], + [" 0.25tUrN ", "0.25turn"], + [" 1.57RaD ", "1.57rad"], + ].forEach(function(arr) { + document.documentElement.style.rotate = arr[0]; + is(document.documentElement.style.rotate, arr[1], + "bug-1207734: incorrect rotate serialization"); + }); + document.documentElement.style.rotate = ""; + + // Test for translate property serialization. + [ + [" 50% 5px 6px ", "50% 5px 6px"], + [" 50% 10px 100px ", "50% 10px 100px"], + [" 4px 5px ", "4px 5px"], + [" 10% 10% 99px ", "10% 10% 99px"], + [" 50px ", "50px"], + ].forEach(function(arr) { + document.documentElement.style.translate = arr[0]; + is(document.documentElement.style.translate, arr[1], + "bug-1207734: incorrect translate serialization"); + }); + document.documentElement.style.translate = ""; + + // Test for scale property serialization. + [ + [" 10 ", "10"], + [" 10 20.5 ", "10 20.5"], + [" 10 20 30 ", "10 20 30"], + ].forEach(function(arr) { + document.documentElement.style.scale = arr[0]; + is(document.documentElement.style.scale, arr[1], + "bug-1207734: incorrect scale serialization"); + }); + + document.documentElement.style.scale = ""; +} + +runTest(); +finish(); +</script> |