diff options
Diffstat (limited to 'dom/base/test/meta_viewport/test_meta_viewport_valid_width_and_negative_height.html')
-rw-r--r-- | dom/base/test/meta_viewport/test_meta_viewport_valid_width_and_negative_height.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dom/base/test/meta_viewport/test_meta_viewport_valid_width_and_negative_height.html b/dom/base/test/meta_viewport/test_meta_viewport_valid_width_and_negative_height.html new file mode 100644 index 0000000000..10bce57d87 --- /dev/null +++ b/dom/base/test/meta_viewport/test_meta_viewport_valid_width_and_negative_height.html @@ -0,0 +1,26 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <title>valid width and negative height in meta viewport</title> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> + <meta name="viewport" content="width=400, height=-200"> + <script src="viewport_helpers.js"></script> +</head> +<body> + <p>width=400, height=-200</p> + <script type="application/javascript"> + "use strict"; + + add_task(async function valid_width_and_negative_height() { + await SpecialPowers.pushPrefEnv(scaleRatio(1.0)); + + let info = getViewportInfo(800, 480); + is(info.width, 400, "width should be 400"); + is(info.height, 240, "height should be 240 which is the result of the " + + "display height * viewport width / display width"); + }); + </script> +</body> +</html> |