| <!DOCTYPE HTML> |
| <title>The "systemLanguage" attribute matching is case insensitive (eg. "en" matches "EN")</title> |
| <link rel="help" href="https://www.w3.org/TR/SVG2/struct.html#ConditionalProcessingSystemLanguageAttribute"> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <svg id="mysvg"> |
| </svg> |
| <script> |
| test(() => { |
| |
| internals.setUserPreferredLanguages(["en"]); |
| var text1 = document.createElementNS('http://www.w3.org/2000/svg', 'text'); |
| text1.setAttribute('systemLanguage', 'en'); |
| text1.textContent = 'English-US'; |
| |
| var mysvg = document.getElementById("mysvg"); |
| mysvg.appendChild(text1); |
| |
| assert_greater_than(text1.getBoundingClientRect().width, 0); |
| |
| mysvg.removeChild(text1); |
| |
| text1.setAttribute('systemLanguage', 'EN'); |
| |
| mysvg.appendChild(text1); |
| |
| assert_greater_than(text1.getBoundingClientRect().width, 0); |
| |
| }); |
| |
| </script> |