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

Unified Diff: LayoutTests/fast/dom/custom/registration-context-isolation.html

Issue 132203012: Make Custom Element registration context creation explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nicer. Created 6 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/registration-context-isolation-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/custom/registration-context-isolation.html
diff --git a/LayoutTests/fast/dom/custom/registration-context-isolation.html b/LayoutTests/fast/dom/custom/registration-context-isolation.html
index 302a53f3516c7c70d18aaea422ad26754d71d25a..d82bb8fcb275a1cb27f1e5418c42907567708410 100644
--- a/LayoutTests/fast/dom/custom/registration-context-isolation.html
+++ b/LayoutTests/fast/dom/custom/registration-context-isolation.html
@@ -148,4 +148,41 @@ withFrame(t.step_func(function (frame) {
})();
+(function () {
+
+var t = async_test('registration context should not be created by ' +
+ 'DOMImplementation-created documents');
+
+withFrame(t.step_func(function (frame) {
+ // Test transitively sloughing off a registration context through
+ // multiple createDocument/createHTMLDocument steps.
+
+ var documentA = frame.contentDocument;
+
+ // This document is not HTML, XHTML; it will not process custom elements.
+ var documentB = documentA.implementation.createDocument(null, '');
+ assert_throws(
+ 'NOT_SUPPORTED_ERR',
+ function() { documentB.registerElement('x-a'); });
+
+ // This document will not process custom elements because there is
+ // nothing to inherit from B.
+ var documentC = documentB.implementation.createHTMLDocument();
+ assert_throws(
+ 'NOT_SUPPORTED_ERR',
+ function() { documentC.registerElement('x-b'); });
+
+ // Nor this one.
+ var documentD = documentC.implementation.createDocument(
+ 'http://www.w3.org/1999/xhtml', 'html');
+ assert_throws(
+ 'NOT_SUPPORTED_ERR',
+ function() { documentD.registerElement('x-c'); });
+
+ frame.remove();
+ t.done();
+}));
+
+})();
+
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/registration-context-isolation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698