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

Unified Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 2315223003: Move didUpdateTextOfFocusedElementByNonUserInput from WebViewClient to WebWidgetClient. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/public/web/WebViewClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebViewTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
index a3a86773fd60918bff91ce7492e17f02ed4c7118..b46bb927fd28696d16ef8cf5e0a19098fcacd4a0 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -2714,9 +2714,9 @@ TEST_F(WebViewTest, DeleteElementWithRegisteredHandler)
EXPECT_FALSE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent));
}
-class NonUserInputTextUpdateWebViewClient : public FrameTestHelpers::TestWebViewClient {
+class NonUserInputTextUpdateWebWidgetClient: public FrameTestHelpers::TestWebWidgetClient {
public:
- NonUserInputTextUpdateWebViewClient() : m_textIsUpdated(false) { }
+ NonUserInputTextUpdateWebWidgetClient() : m_textIsUpdated(false) { }
// WebWidgetClient methods
void didUpdateTextOfFocusedElementByNonUserInput() override
@@ -2741,10 +2741,9 @@ private:
// This test verifies the text input flags are correctly exposed to script.
TEST_F(WebViewTest, TextInputFlags)
{
- NonUserInputTextUpdateWebViewClient client;
std::string url = m_baseURL + "text_input_flags.html";
URLTestHelpers::registerMockedURLLoad(toKURL(url), "text_input_flags.html");
- WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true, 0, &client);
+ WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true);
webViewImpl->setInitialFocus(false);
WebLocalFrameImpl* frame = webViewImpl->mainFrameImpl();
@@ -2791,10 +2790,10 @@ TEST_F(WebViewTest, TextInputFlags)
// called iff value of a focused element is modified via script.
TEST_F(WebViewTest, NonUserInputTextUpdate)
{
- NonUserInputTextUpdateWebViewClient client;
+ NonUserInputTextUpdateWebWidgetClient client;
std::string url = m_baseURL + "non_user_input_text_update.html";
URLTestHelpers::registerMockedURLLoad(toKURL(url), "non_user_input_text_update.html");
- WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true, 0, &client);
+ WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true, nullptr, nullptr, &client);
webViewImpl->setInitialFocus(false);
WebLocalFrameImpl* frame = webViewImpl->mainFrameImpl();
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698