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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/compositing/PaintArtifactCompositor.h" 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h"
6 6
7 #include "base/test/test_simple_task_runner.h" 7 #include "base/test/test_simple_task_runner.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/test/fake_compositor_frame_sink.h" 10 #include "cc/test/fake_compositor_frame_sink.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // Delay constructing the compositor until after the feature is set. 62 // Delay constructing the compositor until after the feature is set.
63 m_paintArtifactCompositor = PaintArtifactCompositor::create(); 63 m_paintArtifactCompositor = PaintArtifactCompositor::create();
64 m_paintArtifactCompositor->enableExtraDataForTesting(); 64 m_paintArtifactCompositor->enableExtraDataForTesting();
65 65
66 cc::LayerTreeSettings settings = 66 cc::LayerTreeSettings settings =
67 WebLayerTreeViewImplForTesting::defaultLayerTreeSettings(); 67 WebLayerTreeViewImplForTesting::defaultLayerTreeSettings();
68 settings.single_thread_proxy_scheduler = false; 68 settings.single_thread_proxy_scheduler = false;
69 settings.use_layer_lists = true; 69 settings.use_layer_lists = true;
70 m_webLayerTreeView = 70 m_webLayerTreeView =
71 wrapUnique(new WebLayerTreeViewWithCompositorFrameSink(settings)); 71 makeUnique<WebLayerTreeViewWithCompositorFrameSink>(settings);
72 m_webLayerTreeView->setRootLayer(*m_paintArtifactCompositor->getWebLayer()); 72 m_webLayerTreeView->setRootLayer(*m_paintArtifactCompositor->getWebLayer());
73 } 73 }
74 74
75 void TearDown() override { m_featuresBackup.restore(); } 75 void TearDown() override { m_featuresBackup.restore(); }
76 76
77 const cc::PropertyTrees& propertyTrees() { 77 const cc::PropertyTrees& propertyTrees() {
78 return *m_webLayerTreeView->layerTreeHost() 78 return *m_webLayerTreeView->layerTreeHost()
79 ->GetLayerTree() 79 ->GetLayerTree()
80 ->property_trees(); 80 ->property_trees();
81 } 81 }
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 scrollTree.current_scroll_offset(contentLayerAt(1)->id())); 652 scrollTree.current_scroll_offset(contentLayerAt(1)->id()));
653 653
654 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons & 654 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons &
655 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); 655 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
656 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons & 656 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons &
657 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); 657 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
658 } 658 }
659 659
660 } // namespace 660 } // namespace
661 } // namespace blink 661 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698