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

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

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 years, 1 month 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 2565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 } 2576 }
2577 2577
2578 static void configueCompositingWebView(WebSettings* settings) { 2578 static void configueCompositingWebView(WebSettings* settings) {
2579 settings->setAcceleratedCompositingEnabled(true); 2579 settings->setAcceleratedCompositingEnabled(true);
2580 settings->setPreferCompositingToLCDTextEnabled(true); 2580 settings->setPreferCompositingToLCDTextEnabled(true);
2581 } 2581 }
2582 2582
2583 TEST_P(WebViewTest, ShowPressOnTransformedLink) { 2583 TEST_P(WebViewTest, ShowPressOnTransformedLink) {
2584 std::unique_ptr<FrameTestHelpers::TestWebViewClient> 2584 std::unique_ptr<FrameTestHelpers::TestWebViewClient>
2585 fakeCompositingWebViewClient = 2585 fakeCompositingWebViewClient =
2586 wrapUnique(new FrameTestHelpers::TestWebViewClient()); 2586 makeUnique<FrameTestHelpers::TestWebViewClient>();
2587 FrameTestHelpers::WebViewHelper webViewHelper; 2587 FrameTestHelpers::WebViewHelper webViewHelper;
2588 WebViewImpl* webViewImpl = webViewHelper.initialize( 2588 WebViewImpl* webViewImpl = webViewHelper.initialize(
2589 true, nullptr, fakeCompositingWebViewClient.get(), nullptr, 2589 true, nullptr, fakeCompositingWebViewClient.get(), nullptr,
2590 &configueCompositingWebView); 2590 &configueCompositingWebView);
2591 2591
2592 int pageWidth = 640; 2592 int pageWidth = 640;
2593 int pageHeight = 480; 2593 int pageHeight = 480;
2594 webViewImpl->resize(WebSize(pageWidth, pageHeight)); 2594 webViewImpl->resize(WebSize(pageWidth, pageHeight));
2595 2595
2596 WebURL baseURL = URLTestHelpers::toKURL("http://example.com/"); 2596 WebURL baseURL = URLTestHelpers::toKURL("http://example.com/");
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
4316 .translate(50, 55) 4316 .translate(50, 55)
4317 .scale(1. / 2.f); 4317 .scale(1. / 2.f);
4318 EXPECT_EQ(expectedMatrix, 4318 EXPECT_EQ(expectedMatrix,
4319 webViewImpl->getDeviceEmulationTransformForTesting()); 4319 webViewImpl->getDeviceEmulationTransformForTesting());
4320 // visibleContentRect doesn't change. 4320 // visibleContentRect doesn't change.
4321 EXPECT_EQ(IntRect(50, 55, 50, 75), 4321 EXPECT_EQ(IntRect(50, 55, 50, 75),
4322 *devToolsEmulator->visibleContentRectForPainting()); 4322 *devToolsEmulator->visibleContentRectForPainting());
4323 } 4323 }
4324 4324
4325 } // namespace blink 4325 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | third_party/WebKit/Source/wtf/FilePrintStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698