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

Unified Diff: LayoutTests/fast/dom/HTMLTemplateElement/custom-element-wrapper-gc.html

Issue 48633006: Teach V8GCController how to traverse TemplateContentDocumentFragment::host (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 1 month 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/HTMLTemplateElement/custom-element-wrapper-gc-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/HTMLTemplateElement/custom-element-wrapper-gc.html
diff --git a/LayoutTests/fast/dom/HTMLTemplateElement/custom-element-wrapper-gc.html b/LayoutTests/fast/dom/HTMLTemplateElement/custom-element-wrapper-gc.html
new file mode 100644
index 0000000000000000000000000000000000000000..87ffd8b1a7cf6bd633ed2d9d241180da031a7a5d
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLTemplateElement/custom-element-wrapper-gc.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<div id="container">
+<template>
+<x-custom></x-custom>
+</template>
+</div>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script>
+description('Custom element wrappers in templates should be retained');
+
+document.register('x-custom', {
+ prototype: {
+ createdCallback: function() {
+ this.expando = 'present';
+ }
+ }
+});
+
+debug("Testing major GC...");
+gc();
+
+var template = document.querySelector('template');
+var customElement = template.content.querySelector('x-custom');
+shouldBeEqualToString('customElement.expando', 'present');
+
+container.innerHTML = container.innerHTML;
+
+debug("Testing minor GC...");
+minorGC();
+
+var template = document.querySelector('template');
+var customElement = template.content.querySelector('x-custom');
+shouldBeEqualToString('customElement.expando', 'present');
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLTemplateElement/custom-element-wrapper-gc-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698