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 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 size_t length; | 1233 size_t length; |
1234 EXPECT_TRUE(toWebViewImpl(webView)->caretOrSelectionRange(&location, &length
)); | 1234 EXPECT_TRUE(toWebViewImpl(webView)->caretOrSelectionRange(&location, &length
)); |
1235 EXPECT_EQ(location, 0UL); | 1235 EXPECT_EQ(location, 0UL); |
1236 EXPECT_EQ(length, testWord.length()); | 1236 EXPECT_EQ(length, testWord.length()); |
1237 } | 1237 } |
1238 | 1238 |
1239 static void configueCompositingWebView(WebSettings* settings) | 1239 static void configueCompositingWebView(WebSettings* settings) |
1240 { | 1240 { |
1241 settings->setAcceleratedCompositingEnabled(true); | 1241 settings->setAcceleratedCompositingEnabled(true); |
1242 settings->setPreferCompositingToLCDTextEnabled(true); | 1242 settings->setPreferCompositingToLCDTextEnabled(true); |
1243 settings->setAcceleratedCompositingForOverflowScrollEnabled(true); | |
1244 } | 1243 } |
1245 | 1244 |
1246 TEST_F(WebViewTest, ShowPressOnTransformedLink) | 1245 TEST_F(WebViewTest, ShowPressOnTransformedLink) |
1247 { | 1246 { |
1248 OwnPtr<FrameTestHelpers::TestWebViewClient> fakeCompositingWebViewClient = a
doptPtr(new FrameTestHelpers::TestWebViewClient()); | 1247 OwnPtr<FrameTestHelpers::TestWebViewClient> fakeCompositingWebViewClient = a
doptPtr(new FrameTestHelpers::TestWebViewClient()); |
1249 FrameTestHelpers::WebViewHelper webViewHelper; | 1248 FrameTestHelpers::WebViewHelper webViewHelper; |
1250 WebViewImpl* webViewImpl = webViewHelper.initialize(true, 0, fakeCompositing
WebViewClient.get(), &configueCompositingWebView); | 1249 WebViewImpl* webViewImpl = webViewHelper.initialize(true, 0, fakeCompositing
WebViewClient.get(), &configueCompositingWebView); |
1251 | 1250 |
1252 int pageWidth = 640; | 1251 int pageWidth = 640; |
1253 int pageHeight = 480; | 1252 int pageHeight = 480; |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2148 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webView->mainFrame()); | 2147 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webView->mainFrame()); |
2149 frame->executeScript(WebScriptSource(WebString::fromUTF8("document.execComma
nd('SelectAll', false, null)"))); | 2148 frame->executeScript(WebScriptSource(WebString::fromUTF8("document.execComma
nd('SelectAll', false, null)"))); |
2150 std::string actual = frame->selectionAsText().utf8(); | 2149 std::string actual = frame->selectionAsText().utf8(); |
2151 | 2150 |
2152 const int kMaxOutputCharacters = 1024; | 2151 const int kMaxOutputCharacters = 1024; |
2153 std::string expected = frame->contentAsText(kMaxOutputCharacters).utf8(); | 2152 std::string expected = frame->contentAsText(kMaxOutputCharacters).utf8(); |
2154 EXPECT_EQ(expected, actual); | 2153 EXPECT_EQ(expected, actual); |
2155 } | 2154 } |
2156 | 2155 |
2157 } // namespace | 2156 } // namespace |
OLD | NEW |