Remove WebNode::remove().

The only user was inside blink in WebFrameTest and we can just use the
real Node::remove() there.

Review URL: https://codereview.chromium.org/1343403004

git-svn-id: svn://svn.chromium.org/blink/trunk@202467 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 7114f51..c6fcd05 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -209,7 +209,7 @@
     Node* firstChild() const;
     Node* lastChild() const;
 
-    void remove(ExceptionState&);
+    void remove(ExceptionState& = ASSERT_NO_EXCEPTION);
 
     Node* pseudoAwareNextSibling() const;
     Node* pseudoAwarePreviousSibling() const;
diff --git a/Source/web/WebNode.cpp b/Source/web/WebNode.cpp
index 28f6b0e..b8a5c4b 100644
--- a/Source/web/WebNode.cpp
+++ b/Source/web/WebNode.cpp
@@ -283,13 +283,6 @@
     return m_private->focused();
 }
 
-bool WebNode::remove()
-{
-    TrackExceptionState exceptionState;
-    m_private->remove(exceptionState);
-    return !exceptionState.hadException();
-}
-
 WebPluginContainer* WebNode::pluginContainer() const
 {
     if (isNull())
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 2ea914d..ff43880 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -257,6 +257,13 @@
         return frame->nodeImage(*element);
     }
 
+    void removeElementById(WebLocalFrameImpl* frame, const AtomicString& id)
+    {
+        Element* element = frame->frame()->document()->getElementById(id);
+        ASSERT(element);
+        element->remove();
+    }
+
     std::string m_baseURL;
     std::string m_notBaseURL;
     std::string m_chromeURL;
@@ -3924,7 +3931,7 @@
     RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame());
 
     // Detach the frame before finding.
-    EXPECT_TRUE(mainFrame->document().getElementById("frame").remove());
+    removeElementById(mainFrame, "frame");
 
     EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0));
     EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false, 0));
@@ -3969,7 +3976,7 @@
     EXPECT_FALSE(client.findResultsAreReady());
 
     // Detach the frame between finding and scoping.
-    EXPECT_TRUE(mainFrame->document().getElementById("frame").remove());
+    removeElementById(mainFrame, "frame");
 
     mainFrame->resetMatchCount();
 
@@ -4013,7 +4020,7 @@
         frame->scopeStringMatches(kFindIdentifier, searchText, options, true);
 
     // The first scopeStringMatches will have reset the state. Detach before it actually scopes.
-    EXPECT_TRUE(mainFrame->document().getElementById("frame").remove());
+    removeElementById(mainFrame, "frame");
 
     runPendingTasks();
     EXPECT_TRUE(client.findResultsAreReady());
diff --git a/public/web/WebNode.h b/public/web/WebNode.h
index bcd2c44..9b10ef8 100644
--- a/public/web/WebNode.h
+++ b/public/web/WebNode.h
@@ -123,7 +123,6 @@
     BLINK_EXPORT void querySelectorAll(const WebString& selector, WebVector<WebElement>& results) const;
 
     BLINK_EXPORT bool focused() const;
-    BLINK_EXPORT bool remove();
 
     BLINK_EXPORT WebPluginContainer* pluginContainer() const;