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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFormControlElementTest.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/HTMLFormControlElement.h" 5 #include "core/html/HTMLFormControlElement.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/LocalFrameView.h" 9 #include "core/frame/LocalFrameView.h"
10 #include "core/html/HTMLInputElement.h" 10 #include "core/html/HTMLInputElement.h"
(...skipping 23 matching lines...) Expand all
34 34
35 void HideValidationMessage(const Element& anchor) override { 35 void HideValidationMessage(const Element& anchor) override {
36 if (anchor_ == &anchor) 36 if (anchor_ == &anchor)
37 anchor_ = nullptr; 37 anchor_ = nullptr;
38 } 38 }
39 39
40 bool IsValidationMessageVisible(const Element& anchor) override { 40 bool IsValidationMessageVisible(const Element& anchor) override {
41 return anchor_ == &anchor; 41 return anchor_ == &anchor;
42 } 42 }
43 43
44 void WillUnloadDocument(const Document&) override {}
45 void DocumentDetached(const Document&) override {}
46 void WillBeDestroyed() override {} 44 void WillBeDestroyed() override {}
47 DEFINE_INLINE_VIRTUAL_TRACE() { 45 DEFINE_INLINE_VIRTUAL_TRACE() {
48 visitor->Trace(anchor_); 46 visitor->Trace(anchor_);
49 ValidationMessageClient::Trace(visitor); 47 ValidationMessageClient::Trace(visitor);
50 } 48 }
51 49
52 private: 50 private:
53 Member<const Element> anchor_; 51 Member<const Element> anchor_;
54 }; 52 };
55 } 53 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 Page::OrdinaryPages().insert(&GetPage()); 131 Page::OrdinaryPages().insert(&GetPage());
134 132
135 HTMLInputElement* input = 133 HTMLInputElement* input =
136 toHTMLInputElement(GetDocument().getElementById("input")); 134 toHTMLInputElement(GetDocument().getElementById("input"));
137 ScopedPageSuspender suspender; // print() suspends the page. 135 ScopedPageSuspender suspender; // print() suspends the page.
138 input->reportValidity(); 136 input->reportValidity();
139 EXPECT_FALSE(validation_message_client->IsValidationMessageVisible(*input)); 137 EXPECT_FALSE(validation_message_client->IsValidationMessageVisible(*input));
140 } 138 }
141 139
142 } // namespace blink 140 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentTest.cpp ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698