mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
Tests/LibWeb: Rebaseline createElement and createElementNS WPT tests
These tests were previously not aligned against the DOM standard.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
ab2e732da9
commit
f263a1a6b2
Notes:
github-actions[bot]
2025-07-09 08:58:38 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/f263a1a6b23 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5365 Reviewed-by: https://github.com/gmta ✅
@@ -58,18 +58,20 @@ function runTest(t, i, desc) {
|
||||
assert_equals(element.nodeType, element.ELEMENT_NODE)
|
||||
assert_equals(element.nodeValue, null)
|
||||
assert_equals(element.ownerDocument, doc)
|
||||
var qualified = String(qualifiedName), names = []
|
||||
var qualified = String(qualifiedName)
|
||||
var tagName = String(qualifiedName)
|
||||
var names = [];
|
||||
var firstColonIndex = qualified.indexOf(":")
|
||||
if (firstColonIndex >= 0) {
|
||||
names.push(qualified.substring(0, firstColonIndex));
|
||||
names.push(qualified.substring(firstColonIndex + 1));
|
||||
names = qualifiedName.split(":", 2);
|
||||
tagName = names.join(":");
|
||||
} else {
|
||||
names = [null, qualified]
|
||||
}
|
||||
assert_equals(element.prefix, names[0], 'element.prefix')
|
||||
assert_equals(element.localName, names[1], 'element.localName')
|
||||
assert_equals(element.tagName, qualified, 'element.tagName')
|
||||
assert_equals(element.nodeName, qualified, 'element.nodeName')
|
||||
assert_equals(element.tagName, tagName, 'element.tagName')
|
||||
assert_equals(element.nodeName, tagName, 'element.nodeName')
|
||||
assert_equals(element.namespaceURI,
|
||||
namespace === undefined || namespace === "" ? null
|
||||
: namespace,
|
||||
|
||||
Reference in New Issue
Block a user