Fix a bug that document.importNode() doesn't clone Attr nodes with namespace.

We should just call Attr::Clone().

Bug: 812089, 812105
Change-Id: I163769e134a52d82b88834ae29083a01a3480e95
Reviewed-on: https://chromium-review.googlesource.com/925865
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537730}
diff --git a/dom/nodes/Document-importNode.html b/dom/nodes/Document-importNode.html
index 32e2f31..d27cce6 100644
--- a/dom/nodes/Document-importNode.html
+++ b/dom/nodes/Document-importNode.html
@@ -54,4 +54,14 @@
   assert_equals(newDiv.ownerDocument, document);
   assert_equals(newDiv.firstChild, null);
 }, "False 'deep' argument.")
+
+test(function() {
+  let doc = document.implementation.createHTMLDocument("Title");
+  doc.body.setAttributeNS("http://example.com/", "p:name", "value");
+  let originalAttr = doc.body.getAttributeNodeNS("http://example.com/", "name");
+  let imported = document.importNode(originalAttr, true);
+  assert_equals(imported.prefix, originalAttr.prefix);
+  assert_equals(imported.namespaceURI, originalAttr.namespaceURI);
+  assert_equals(imported.localName, originalAttr.localName);
+}, "Import an Attr node with namespace/prefix correctly.");
 </script>