OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |