2011-06-06  MORITA Hajime <morrita@google.com>

        Reviewed by Kent Tamura.

        Verify cloning <details> and <summary> works.
        https://bugs.webkit.org/show_bug.cgi?id=61985

        * fast/html/details-clone-expected.txt: Added.
        * fast/html/details-clone.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b529665..d055cc0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2011-06-06  MORITA Hajime <morrita@google.com>
+
+        Reviewed by Kent Tamura.
+
+        Verify cloning <details> and <summary> works.
+        https://bugs.webkit.org/show_bug.cgi?id=61985
+
+        * fast/html/details-clone-expected.txt: Added.
+        * fast/html/details-clone.html: Added.
+
 2011-06-06  MORITA Hajime  <morrita@google.com>
 
         Unreviewed attempt to fix flakiness on Snow Leopard.
diff --git a/LayoutTests/fast/html/details-clone-expected.txt b/LayoutTests/fast/html/details-clone-expected.txt
new file mode 100644
index 0000000..69041e7
--- /dev/null
+++ b/LayoutTests/fast/html/details-clone-expected.txt
@@ -0,0 +1,4 @@
+Test to clone details and summary elements
+
+PASS targetMarkerPseudoId is clonedMarkerPseudoId
+
diff --git a/LayoutTests/fast/html/details-clone.html b/LayoutTests/fast/html/details-clone.html
new file mode 100644
index 0000000..6f62b5a
--- /dev/null
+++ b/LayoutTests/fast/html/details-clone.html
@@ -0,0 +1,33 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script>
+function runTest()
+{
+    var targetDetails = document.getElementById("targetDetails");
+    var clonedDetails = targetDetails.cloneNode(true);
+    document.body.appendChild(clonedDetails);
+    var targetSummary = document.getElementById("targetSummary");
+    var clonedSummary = targetSummary.cloneNode(true);
+    targetDetails.appendChild(clonedSummary);
+
+    if (!window.layoutTestController)
+        return;
+
+    // On cloned <details>, marker shadow element should be created
+    var targetDetailsSummaryShadow = layoutTestController.shadowRoot(targetDetails.querySelector("summary"));
+    targetMarkerPseudoId = layoutTestController.shadowPseudoId(targetDetailsSummaryShadow.firstChild);
+    var clonedDetailsSummaryShadow = layoutTestController.shadowRoot(clonedDetails.querySelector("summary"));
+    clonedMarkerPseudoId = layoutTestController.shadowPseudoId(clonedDetailsSummaryShadow.firstChild);
+    shouldBe("targetMarkerPseudoId", "clonedMarkerPseudoId");
+}
+</script>
+<body onload="runTest()">
+<p id="description">Test to clone details and summary elements</p>
+<div id="console"></div>
+<details id="targetDetails" open>
+   <summary id="targetSummary"></summary>
+</details>
+</body>
+</html>