| 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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); | 1243 settings->setAcceleratedCompositingForOverflowScrollEnabled(true); |
| 1244 settings->setCompositedScrollingForFramesEnabled(true); | |
| 1245 } | 1244 } |
| 1246 | 1245 |
| 1247 TEST_F(WebViewTest, ShowPressOnTransformedLink) | 1246 TEST_F(WebViewTest, ShowPressOnTransformedLink) |
| 1248 { | 1247 { |
| 1249 OwnPtr<FrameTestHelpers::TestWebViewClient> fakeCompositingWebViewClient = a
doptPtr(new FrameTestHelpers::TestWebViewClient()); | 1248 OwnPtr<FrameTestHelpers::TestWebViewClient> fakeCompositingWebViewClient = a
doptPtr(new FrameTestHelpers::TestWebViewClient()); |
| 1250 FrameTestHelpers::WebViewHelper webViewHelper; | 1249 FrameTestHelpers::WebViewHelper webViewHelper; |
| 1251 WebViewImpl* webViewImpl = webViewHelper.initialize(true, 0, fakeCompositing
WebViewClient.get(), &configueCompositingWebView); | 1250 WebViewImpl* webViewImpl = webViewHelper.initialize(true, 0, fakeCompositing
WebViewClient.get(), &configueCompositingWebView); |
| 1252 | 1251 |
| 1253 int pageWidth = 640; | 1252 int pageWidth = 640; |
| 1254 int pageHeight = 480; | 1253 int pageHeight = 480; |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2149 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webView->mainFrame()); | 2148 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webView->mainFrame()); |
| 2150 frame->executeScript(WebScriptSource(WebString::fromUTF8("document.execComma
nd('SelectAll', false, null)"))); | 2149 frame->executeScript(WebScriptSource(WebString::fromUTF8("document.execComma
nd('SelectAll', false, null)"))); |
| 2151 std::string actual = frame->selectionAsText().utf8(); | 2150 std::string actual = frame->selectionAsText().utf8(); |
| 2152 | 2151 |
| 2153 const int kMaxOutputCharacters = 1024; | 2152 const int kMaxOutputCharacters = 1024; |
| 2154 std::string expected = frame->contentAsText(kMaxOutputCharacters).utf8(); | 2153 std::string expected = frame->contentAsText(kMaxOutputCharacters).utf8(); |
| 2155 EXPECT_EQ(expected, actual); | 2154 EXPECT_EQ(expected, actual); |
| 2156 } | 2155 } |
| 2157 | 2156 |
| 2158 } // namespace | 2157 } // namespace |
| OLD | NEW |