-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
test/web-platform-tests/to-upstream/dom/nodes/ParentNode-querySelector-All-multiple-not.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<title>:not() with multiple selectors in the list</title> | ||
<meta charset="utf-8"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<!-- Regression test for https://github.com/jsdom/jsdom/issues/3297 --> | ||
|
||
<div id="container"> | ||
<div id="container-inner-1"></div> | ||
<div id="container-inner-2"> | ||
<p>Foo</p> | ||
<button>Bar</button> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
"use strict"; | ||
test(() => { | ||
const container = document.getElementById("container"); | ||
assert_equals(container.querySelectorAll(":not(svg, svg *)").length, 4); | ||
}); | ||
</script> |
22 changes: 22 additions & 0 deletions
22
test/web-platform-tests/to-upstream/dom/nodes/ParentNode-querySelector-svg-not-root.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<title>svg:not(:root) in a HTML document</title> | ||
<meta charset="utf-8"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<!-- Regression test for https://github.com/jsdom/jsdom/issues/1750 --> | ||
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100" viewBox="0 0 3 2" id="the-svg"> | ||
<rect width="1" height="2" x="0" fill="#008d46" /> | ||
<rect width="1" height="2" x="1" fill="#ffffff" /> | ||
<rect width="1" height="2" x="2" fill="#d2232c" /> | ||
</svg> | ||
|
||
<script> | ||
"use strict"; | ||
test(() => { | ||
const theSvg = document.getElementById("the-svg"); | ||
assert_not_equals(theSvg, null, "precondition check: getElementById works"); | ||
|
||
assert_equals(document.querySelector("svg:not(:root)"), theSvg); | ||
}); | ||
</script> |
22 changes: 22 additions & 0 deletions
22
...platform-tests/to-upstream/dom/nodes/ParentNode-querySelector-underscore-local-name.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>Element local name with an underscore in querySelector</title> | ||
<meta charset="utf-8"/> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<!-- Regression test for https://github.com/jsdom/jsdom/issues/3015 --> | ||
</head> | ||
<body> | ||
<data><_g><b>hey</b></_g></data> | ||
|
||
<script> | ||
/*<![CDATA[*/ | ||
"use strict"; | ||
test(() => { | ||
assert_equals(document.querySelector("data > _g > b").textContent, "hey"); | ||
}); | ||
/*]]>*/ | ||
</script> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
test/web-platform-tests/to-upstream/dom/nodes/ParentNode-querySelectorAll-svg-class.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<title>Selecting a svg element with a class selector</title> | ||
<meta charset="utf-8"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<!-- Regression test for https://github.com/jsdom/jsdom/issues/2114 --> | ||
|
||
<div class="test"> | ||
</div> | ||
<svg class="test"> | ||
</svg> | ||
|
||
<script> | ||
"use strict"; | ||
test(() => { | ||
assert_equals(document.querySelectorAll("svg.test").length, 1); | ||
}); | ||
</script> |