diff options
Diffstat (limited to '')
-rw-r--r-- | dom/base/test/meta_viewport/test_meta_viewport_removing_content_attribute.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dom/base/test/meta_viewport/test_meta_viewport_removing_content_attribute.html b/dom/base/test/meta_viewport/test_meta_viewport_removing_content_attribute.html new file mode 100644 index 0000000000..784a503e9f --- /dev/null +++ b/dom/base/test/meta_viewport/test_meta_viewport_removing_content_attribute.html @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <title>removing content attribute</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"> + <meta name="viewport" content="width=800"> + <script src="viewport_helpers.js"></script> +</head> +<body> + <script> + "use strict"; + + add_task(async function multiple_viewport_tags() { + await SpecialPowers.pushPrefEnv(scaleRatio(1.0)); + + let info = getViewportInfo(800, 480); + // The latter meta viewport tag is used. + is(info.width, 800, "width should be 800"); + + const secondMeta = + document.querySelector("meta[name=viewport][content='width=800']"); + secondMeta.removeAttribute("content"); + + info = getViewportInfo(800, 480); + // The latter meta viewport tag is still used. + is(info.width, 800, "width should be 800"); + }); + </script> +</body> +</html> |