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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 1924043002: Switch the inheritance of WebViewClient from WebWidgetClient to protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix new test Created 4 years, 7 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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 static void configueCompositingWebView(WebSettings* settings) 1745 static void configueCompositingWebView(WebSettings* settings)
1746 { 1746 {
1747 settings->setAcceleratedCompositingEnabled(true); 1747 settings->setAcceleratedCompositingEnabled(true);
1748 settings->setPreferCompositingToLCDTextEnabled(true); 1748 settings->setPreferCompositingToLCDTextEnabled(true);
1749 } 1749 }
1750 1750
1751 TEST_F(WebViewTest, ShowPressOnTransformedLink) 1751 TEST_F(WebViewTest, ShowPressOnTransformedLink)
1752 { 1752 {
1753 OwnPtr<FrameTestHelpers::TestWebViewClient> fakeCompositingWebViewClient = a doptPtr(new FrameTestHelpers::TestWebViewClient()); 1753 OwnPtr<FrameTestHelpers::TestWebViewClient> fakeCompositingWebViewClient = a doptPtr(new FrameTestHelpers::TestWebViewClient());
1754 FrameTestHelpers::WebViewHelper webViewHelper; 1754 FrameTestHelpers::WebViewHelper webViewHelper;
1755 WebViewImpl* webViewImpl = webViewHelper.initialize(true, 0, fakeCompositing WebViewClient.get(), &configueCompositingWebView); 1755 WebViewImpl* webViewImpl = webViewHelper.initialize(true, nullptr, fakeCompo sitingWebViewClient.get(), nullptr, &configueCompositingWebView);
1756 1756
1757 int pageWidth = 640; 1757 int pageWidth = 640;
1758 int pageHeight = 480; 1758 int pageHeight = 480;
1759 webViewImpl->resize(WebSize(pageWidth, pageHeight)); 1759 webViewImpl->resize(WebSize(pageWidth, pageHeight));
1760 1760
1761 WebURL baseURL = URLTestHelpers::toKURL("http://example.com/"); 1761 WebURL baseURL = URLTestHelpers::toKURL("http://example.com/");
1762 FrameTestHelpers::loadHTMLString(webViewImpl->mainFrame(), "<a href='http:// www.test.com' style='position: absolute; left: 20px; top: 20px; width: 200px; tr ansform:translateZ(0);'>A link to highlight</a>", baseURL); 1762 FrameTestHelpers::loadHTMLString(webViewImpl->mainFrame(), "<a href='http:// www.test.com' style='position: absolute; left: 20px; top: 20px; width: 200px; tr ansform:translateZ(0);'>A link to highlight</a>", baseURL);
1763 1763
1764 WebGestureEvent event; 1764 WebGestureEvent event;
1765 event.type = WebInputEvent::GestureShowPress; 1765 event.type = WebInputEvent::GestureShowPress;
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
3053 frame->setAutofillClient(&client); 3053 frame->setAutofillClient(&client);
3054 webView->setInitialFocus(false); 3054 webView->setInitialFocus(false);
3055 3055
3056 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel lo").c_str()))); 3056 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel lo").c_str())));
3057 EXPECT_EQ(1, client.textChangesFromUserGesture()); 3057 EXPECT_EQ(1, client.textChangesFromUserGesture());
3058 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); 3058 EXPECT_FALSE(UserGestureIndicator::processingUserGesture());
3059 frame->setAutofillClient(0); 3059 frame->setAutofillClient(0);
3060 } 3060 }
3061 3061
3062 } // namespace blink 3062 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698