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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/Document-prototype-importNode.html

Issue 1924663004: Import web-platform-tests@c969f975ca64b67ebcdddfefa0ef1d7d82680d88 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TestExpectations for web animations instead of skipping Created 4 years, 8 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: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/Document-prototype-importNode.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/Document-prototype-importNode.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/Document-prototype-importNode.html
new file mode 100644
index 0000000000000000000000000000000000000000..d718d42697c789453d565fccf22cc14c8f228e06
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/Document-prototype-importNode.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>DOM and Shadow DOM: Document.prototype.importNode</title>
+<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
+<meta name="assert" content="The importNode(node, deep) method must throw a NotSupportedError exception if node is a shadow root.">
+<link rel="help" href="https://dom.spec.whatwg.org/#dom-document-importnode">
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+
+function testImportNode(mode) {
+ test(function () {
+ var newDocument = document.implementation.createHTMLDocument();
+ assert_throws({'name': 'NotSupportedError'}, function () {
+ var element = document.createElement('div');
+ var shadowRoot = element.attachShadow({mode: mode});
+ newDocument.importNode(shadowRoot);
+ });
+ }, 'importNode on a shadow root in ' + mode + ' mode must throw a NotSupportedError');
+}
+
+testImportNode('open');
+testImportNode('closed');
+
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698