chromium/third_party/blink/web_tests/svg/dom/systemLanguage-reflect-user-language.html

<!DOCTYPE HTML>
<title>The "systemLanguage" attribute match user preferred languages</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>
<switch id="myswitch">
</switch>
</svg>
<script>
async function languageChange() {
	return new Promise(resolve => window.onlanguagechange = resolve);
}

promise_test(async () => {
        internals.setUserPreferredLanguages(["es"]);
	var languageChangePromise = languageChange();
	testRunner.setAcceptLanguages("en-US,en");
	await languageChangePromise;

	var text1 = document.createElementNS('http://www.w3.org/2000/svg', 'text');
	text1.setAttribute('systemLanguage', 'es, de');
	text1.textContent = 'EspaƱol';

	var text2 = document.createElementNS('http://www.w3.org/2000/svg', 'text');
	text2.setAttribute('systemLanguage', 'de, it, en-GB');
	text2.textContent = 'English';

	var myswitch = document.getElementById("myswitch");
	myswitch.appendChild(text1);
	myswitch.appendChild(text2);

	assert_greater_than(text2.getBoundingClientRect().width, 0);
	assert_equals(text1.getBoundingClientRect().width, 0);

	myswitch.removeChild(text1);
	myswitch.removeChild(text2);

	languageChangePromise = languageChange();
	testRunner.setAcceptLanguages("it, en-AU");
	await languageChangePromise;

	myswitch.appendChild(text1);
	myswitch.appendChild(text2);

	assert_greater_than(text2.getBoundingClientRect().width, 0);
	assert_equals(text1.getBoundingClientRect().width, 0);
});
</script>