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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html

Issue 2448433002: Import wpt@bd99724e428dae78082983eab4675480c43f6234 (Closed)
Patch Set: more Created 4 years, 2 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/wpt/custom-elements/reactions/Document.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html b/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
index 4bba91e4573315187381fa18506ded13cbbe1238..13f0d81b9eac44cf1026c8b63ce215f0404b55db 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
@@ -23,11 +23,17 @@ test(function () {
var newDoc = document.implementation.createHTMLDocument();
newDoc.importNode(instance);
- var logEntries = element.takeLog();
- assert_array_equals(logEntries.types(), ['constructed']);
- assert_equals(logEntries.last().oldDocument, document);
- assert_equals(logEntries.last().newDocument, newDoc);
-}, 'importNode on Document must construct a new custom element when importing a custom element');
+ assert_array_equals(element.takeLog().types(), []);
+}, 'importNode on Document must not construct a new custom element when importing a custom element into a window-less document');
+
+test(function () {
+ var element = define_new_custom_element();
+ var template = document.createElement('template');
+ template.innerHTML = `<${element.name}></${element.name}>`;
+ assert_array_equals(element.takeLog().types(), []);
+ document.importNode(template.content, true);
+ assert_array_equals(element.takeLog().types(), ['constructed']);
+}, 'importNode on Document must construct a new custom element when importing a custom element from a template');
test(function () {
var element = define_new_custom_element();

Powered by Google App Engine
This is Rietveld 408576698