Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/traversal/traversal-support.js |
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/traversal/traversal-support.js b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/traversal/traversal-support.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0d5d8ad74fce7dcd4d60a1a11525c5134407f8ba |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/traversal/traversal-support.js |
@@ -0,0 +1,10 @@ |
+// |expected| should be an object indicating the expected type of node. |
+function assert_node(actual, expected) |
+{ |
+ assert_true(actual instanceof expected.type, |
+ 'Node type mismatch: actual = ' + actual.nodeType + ', expected = ' + expected.nodeType); |
+ if (typeof(expected.id) !== 'undefined') |
+ assert_equals(actual.id, expected.id); |
+ if (typeof(expected.nodeValue) !== 'undefined') |
+ assert_equals(actual.nodeValue, expected.nodeValue); |
+} |