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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentTest.cpp

Issue 2949593003: Move navigation-induced hiding of form-validation-bubble to the browser process. (Closed)
Patch Set: Remove now unnecessary call from WebContentsImpl::RenderViewTerminated to delegate_->HideValidation… Created 3 years, 6 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: 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 d06b908fbdbaf9f1fe161442c382920a4ad7efb7..673536c1c9554689d462dfbacefdfc037a5a4480 100644
--- a/third_party/WebKit/Source/core/dom/DocumentTest.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
@@ -258,12 +258,8 @@ class MockValidationMessageClient
MockValidationMessageClient() { Reset(); }
void Reset() {
show_validation_message_was_called = false;
- will_unload_document_was_called = false;
- document_detached_was_called = false;
}
bool show_validation_message_was_called;
- bool will_unload_document_was_called;
- bool document_detached_was_called;
// ValidationMessageClient functions.
void ShowValidationMessage(const Element& anchor,
@@ -277,12 +273,6 @@ class MockValidationMessageClient
bool IsValidationMessageVisible(const Element& anchor) override {
return true;
}
- void WillUnloadDocument(const Document&) override {
- will_unload_document_was_called = true;
- }
- void DocumentDetached(const Document&) override {
- document_detached_was_called = true;
- }
void WillBeDestroyed() override {}
// DEFINE_INLINE_VIRTUAL_TRACE() { ValidationMessageClient::trace(visitor); }
@@ -779,8 +769,6 @@ TEST_F(DocumentTest, ValidationMessageCleanup) {
// prepareForCommit() unloads the document, and shutdown.
GetDocument().GetFrame()->PrepareForCommit();
- EXPECT_TRUE(mock_client->will_unload_document_was_called);
- EXPECT_TRUE(mock_client->document_detached_was_called);
// Unload handler tried to show a validation message, but it should fail.
EXPECT_FALSE(mock_client->show_validation_message_was_called);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/html/HTMLFormControlElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698