Index: third_party/WebKit/Source/core/dom/DocumentTest.cpp |
diff --git a/third_party/WebKit/Source/core/dom/DocumentTest.cpp b/third_party/WebKit/Source/core/dom/DocumentTest.cpp |
index df592898ecdc892382732b589870bf50156a047e..d9e2f2fa11a05e89f2ccce87903289a10a8db15c 100644 |
--- a/third_party/WebKit/Source/core/dom/DocumentTest.cpp |
+++ b/third_party/WebKit/Source/core/dom/DocumentTest.cpp |
@@ -123,10 +123,6 @@ |
return m_contextDestroyedCalledCounter; |
} |
- const HeapVector<Member<const Element>>& attributeChangedElements() const { |
- return m_attributeChangedElements; |
- } |
- |
const HeapVector<Member<const ContainerNode>>& childrenChangedNodes() const { |
return m_childrenChangedNodes; |
} |
@@ -162,7 +158,6 @@ |
private: |
// Implement |SynchronousMutationObserver| member functions. |
void contextDestroyed(Document*) final; |
- void didChangeAttribute(const Element&) final; |
void didChangeChildren(const ContainerNode&) final; |
void didMergeTextNodes(const Text&, const NodeWithIndex&, unsigned) final; |
void didMoveTreeToNewDocument(const Node& root) final; |
@@ -175,7 +170,6 @@ |
void nodeWillBeRemoved(Node&) final; |
int m_contextDestroyedCalledCounter = 0; |
- HeapVector<Member<const Element>> m_attributeChangedElements; |
HeapVector<Member<const ContainerNode>> m_childrenChangedNodes; |
HeapVector<Member<MergeTextNodesRecord>> m_mergeTextNodesRecords; |
HeapVector<Member<const Node>> m_moveTreeToNewDocumentNodes; |
@@ -196,11 +190,6 @@ |
++m_contextDestroyedCalledCounter; |
} |
-void TestSynchronousMutationObserver::didChangeAttribute( |
- const Element& element) { |
- m_attributeChangedElements.push_back(&element); |
-} |
- |
void TestSynchronousMutationObserver::didChangeChildren( |
const ContainerNode& container) { |
m_childrenChangedNodes.push_back(&container); |
@@ -242,7 +231,6 @@ |
} |
DEFINE_TRACE(TestSynchronousMutationObserver) { |
- visitor->trace(m_attributeChangedElements); |
visitor->trace(m_childrenChangedNodes); |
visitor->trace(m_mergeTextNodesRecords); |
visitor->trace(m_moveTreeToNewDocumentNodes); |
@@ -517,24 +505,6 @@ |
EXPECT_EQ(1, observer.countContextDestroyedCalled()); |
} |
-TEST_F(DocumentTest, SynchronousMutationNotifierChangeAttribute) { |
- auto& observer = *new TestSynchronousMutationObserver(document()); |
- Element* divNode = document().createElement("div"); |
- document().body()->appendChild(divNode); |
- divNode->setAttribute(HTMLNames::classAttr, "foo"); |
- |
- ASSERT_EQ(1u, observer.attributeChangedElements().size()); |
- EXPECT_EQ(divNode, observer.attributeChangedElements()[0]); |
- |
- divNode->setAttribute(HTMLNames::classAttr, "bar"); |
- ASSERT_EQ(2u, observer.attributeChangedElements().size()); |
- EXPECT_EQ(divNode, observer.attributeChangedElements()[1]); |
- |
- divNode->removeAttribute(HTMLNames::classAttr); |
- ASSERT_EQ(3u, observer.attributeChangedElements().size()); |
- EXPECT_EQ(divNode, observer.attributeChangedElements()[2]); |
-} |
- |
TEST_F(DocumentTest, SynchronousMutationNotifieAppendChild) { |
auto& observer = *new TestSynchronousMutationObserver(document()); |
document().body()->appendChild(document().createTextNode("a123456789")); |