http-equiv-and-name-1.html (1154B)
1 <!doctype html> 2 <title>Setting both http-equiv and name attributes on a meta element</title> 3 <meta http-equiv=content-language name=color-scheme content=dark> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="color-scheme/support/compute-root-color-scheme.js"></script> 7 <!-- 8 NOTE: This test assumes that the browser's default color-scheme is "light", 9 see https://github.com/web-platform-tests/wpt/pull/31268 for reasoning 10 --> 11 <script> 12 // This creates a test() 13 assert_root_color_scheme("dark", "<meta> set the color-scheme to dark"); 14 15 // We can't test content-language against :lang(), because CSS Selectors 4 16 // references BCP 47 syntax and RFC4647 "Matching of Language Tags", but 17 // "dark" is not a well-formed BCP 47 tag and therefore cannot be matched. 18 // Therefore, the test that content-language gets set is split off to a 19 // separate testcase using a well-formed lang tag as the content. 20 // test(() => { 21 // assert_equals(document.querySelector(":root:lang(dark)"), document.documentElement); 22 // }, "<meta> set the content-language to dark"); 23 </script>