Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/utils.js

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/utils.js
diff --git a/LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/utils.js b/LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/utils.js
new file mode 100644
index 0000000000000000000000000000000000000000..8f5497ec57e5cdaeea37954756b8d4cbd48cdd3c
--- /dev/null
+++ b/LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/utils.js
@@ -0,0 +1,14 @@
+function getElementsByIds(ids) {
+ var result = [];
+ ids.forEach(function(id) {
+ result.push(document.getElementById(id));
+ });
+ return result;
+}
+
+function testSelector(selector, expected, testName) {
+ test(function(){
+ var elements = document.querySelectorAll(selector);
+ assert_array_equals(elements, getElementsByIds(expected));
+ }, testName);
+}

Powered by Google App Engine
This is Rietveld 408576698