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

Unified Diff: LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change.html

Issue 21165005: Support author Shadow DOM for INPUT elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test should work on Windows and Linux. Created 7 years, 3 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: LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change.html
diff --git a/LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change.html b/LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change.html
new file mode 100644
index 0000000000000000000000000000000000000000..d80b98075f6bb218afa6739e777fdc6bd4e1020d
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<body>
+<script src="../../js/resources/js-test-pre.js"></script>
+<style>
+input, input[type="datetime-local"] {
+ padding: 0;
+ border: none;
+ display: inilne-block;
+ font-family: monospace;
+}
+</style>
+<input type="email">
+<script>
+description('Test if changing input type keeps author ShadowRoot content.');
+
+var input1 = document.querySelector('input');
+var initialWidth = input1.offsetWidth;
+shouldNotBe('initialWidth', '0');
+
+var root = input1.createShadowRoot();
+root.innerHTML = '<span>a</span>';
+var widthWithShadow = input1.offsetWidth;
+shouldNotBe('widthWithShadow', 'initialWidth');
+
+shouldBe('input1.type = "hidden"; input1.offsetWidth', '0');
+shouldBe('input1.type = "datetime-local"; input1.offsetWidth', 'widthWithShadow');
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698