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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-010.html

Issue 1899623002: Import latest web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle new failures 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/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-010.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-010.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-010.html
index ff6d771349b4e2a0910a141e94c800f624d0ac9b..ff830125ad205835faf5078360e8ed742a54289b 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-010.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-010.html
@@ -12,29 +12,30 @@ policies and contribution forms [3].
<head>
<title>Shadow DOM Test: A_10_01_02_09</title>
<link rel="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
-<link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#shadow-root-methods">
-<meta name="assert" content="ShadowRoot Object: Invoking the cloneNode() method on a ShadowRoot instance must always throw a DATA_CLONE_ERR exception.">
+<link rel="help" href="https://dom.spec.whatwg.org/#dom-node-clonenode">
+<meta name="assert" content="If context object is a shadow root, throw a NotSupportedError exception.">
<script src="../../../../../../../resources/testharness.js"></script>
<script src="../../../../../../../resources/testharnessreport.js"></script>
-<script src="../../../testcommon.js"></script>
+<script src="../../../../../html/resources/common.js"></script>
+<script src="../../../../resources/shadow-dom-utils.js"></script>
</head>
<body>
<div id="log"></div>
<script>
test(unit(function (ctx) {
- var d = newRenderedHTMLDocument(ctx);
+ var d = newRenderedHTMLDocument(ctx);
+ var host = d.createElement('div');
+ d.body.appendChild(host);
+ var s = host.attachShadow({mode: 'open'});
- var host = d.createElement('div');
- d.body.appendChild(host);
- var s = host.createShadowRoot();
-
- try {
- s.cloneNode();
- assert_true(false, 'Invoking the cloneNode() method on a ShadowRoot instance must always ' +
- 'throw a DATA_CLONE_ERR exception.');
- } catch (e) {
- assert_equals(e.code, 25, 'Wrong exceprion type');
- }
+ try {
+ s.cloneNode();
+ assert_true(false, 'Invoking the cloneNode() method on a ShadowRoot instance must always ' +
+ 'throw a NotSupportedError (code 9) exception.');
+ } catch (e) {
+ assert_equals(e.code, 9, 'Wrong exception type');
+ assert_equals(e.name, 'NotSupportedError', 'Wrong exception name');
+ }
}), 'A_10_01_02_09_T01');
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698