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

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

Issue 476273003: Rename acceleratedCompositingForFixedPosition to preferCompositingToLCDText. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm-fixedpos: rebase Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | public/web/WebSettings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 size_t location; 1232 size_t location;
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->setAcceleratedCompositingForFixedPositionEnabled(true); 1242 settings->setPreferCompositingToLCDTextEnabled(true);
1243 settings->setAcceleratedCompositingForOverflowScrollEnabled(true); 1243 settings->setAcceleratedCompositingForOverflowScrollEnabled(true);
1244 settings->setCompositedScrollingForFramesEnabled(true); 1244 settings->setCompositedScrollingForFramesEnabled(true);
1245 } 1245 }
1246 1246
1247 TEST_F(WebViewTest, ShowPressOnTransformedLink) 1247 TEST_F(WebViewTest, ShowPressOnTransformedLink)
1248 { 1248 {
1249 OwnPtr<FrameTestHelpers::TestWebViewClient> fakeCompositingWebViewClient = a doptPtr(new FrameTestHelpers::TestWebViewClient()); 1249 OwnPtr<FrameTestHelpers::TestWebViewClient> fakeCompositingWebViewClient = a doptPtr(new FrameTestHelpers::TestWebViewClient());
1250 FrameTestHelpers::WebViewHelper webViewHelper; 1250 FrameTestHelpers::WebViewHelper webViewHelper;
1251 WebViewImpl* webViewImpl = webViewHelper.initialize(true, 0, fakeCompositing WebViewClient.get(), &configueCompositingWebView); 1251 WebViewImpl* webViewImpl = webViewHelper.initialize(true, 0, fakeCompositing WebViewClient.get(), &configueCompositingWebView);
1252 1252
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webView->mainFrame()); 2149 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webView->mainFrame());
2150 frame->executeScript(WebScriptSource(WebString::fromUTF8("document.execComma nd('SelectAll', false, null)"))); 2150 frame->executeScript(WebScriptSource(WebString::fromUTF8("document.execComma nd('SelectAll', false, null)")));
2151 std::string actual = frame->selectionAsText().utf8(); 2151 std::string actual = frame->selectionAsText().utf8();
2152 2152
2153 const int kMaxOutputCharacters = 1024; 2153 const int kMaxOutputCharacters = 1024;
2154 std::string expected = frame->contentAsText(kMaxOutputCharacters).utf8(); 2154 std::string expected = frame->contentAsText(kMaxOutputCharacters).utf8();
2155 EXPECT_EQ(expected, actual); 2155 EXPECT_EQ(expected, actual);
2156 } 2156 }
2157 2157
2158 } // namespace 2158 } // namespace
OLDNEW
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | public/web/WebSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698