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

Side by Side Diff: third_party/WebKit/Source/core/paint/HTMLCanvasPainterTest.cpp

Issue 2970833002: Be explicit about namespace testing to not mix it with blink::testing (Closed)
Patch Set: Created 3 years, 5 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
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 "core/paint/HTMLCanvasPainter.h" 5 #include "core/paint/HTMLCanvasPainter.h"
6 6
7 #include "core/frame/LocalFrameView.h" 7 #include "core/frame/LocalFrameView.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/html/HTMLCanvasElement.h" 9 #include "core/html/HTMLCanvasElement.h"
10 #include "core/html/canvas/CanvasContextCreationAttributes.h" 10 #include "core/html/canvas/CanvasContextCreationAttributes.h"
11 #include "core/html/canvas/CanvasRenderingContext.h" 11 #include "core/html/canvas/CanvasRenderingContext.h"
12 #include "core/loader/EmptyClients.h" 12 #include "core/loader/EmptyClients.h"
13 #include "core/paint/StubChromeClientForSPv2.h" 13 #include "core/paint/StubChromeClientForSPv2.h"
14 #include "core/testing/DummyPageHolder.h" 14 #include "core/testing/DummyPageHolder.h"
15 #include "platform/graphics/Canvas2DImageBufferSurface.h" 15 #include "platform/graphics/Canvas2DImageBufferSurface.h"
16 #include "platform/graphics/Canvas2DLayerBridge.h" 16 #include "platform/graphics/Canvas2DLayerBridge.h"
17 #include "platform/graphics/test/FakeGLES2Interface.h" 17 #include "platform/graphics/test/FakeGLES2Interface.h"
18 #include "platform/graphics/test/FakeWebGraphicsContext3DProvider.h" 18 #include "platform/graphics/test/FakeWebGraphicsContext3DProvider.h"
19 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" 19 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
20 #include "public/platform/WebLayer.h" 20 #include "public/platform/WebLayer.h"
21 #include "public/platform/WebSize.h" 21 #include "public/platform/WebSize.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 23
24 // Integration tests of canvas painting code (in SPv2 mode). 24 // Integration tests of canvas painting code (in SPv2 mode).
25 25
26 namespace blink { 26 namespace blink {
27 27
28 class HTMLCanvasPainterTestForSPv2 : public ::testing::Test, 28 class HTMLCanvasPainterTestForSPv2 : public ::testing::Test,
29 public testing::WithParamInterface<bool>, 29 public ::testing::WithParamInterface<bool>,
30 private ScopedSlimmingPaintV2ForTest, 30 private ScopedSlimmingPaintV2ForTest,
31 private ScopedRootLayerScrollingForTest { 31 private ScopedRootLayerScrollingForTest {
32 public: 32 public:
33 HTMLCanvasPainterTestForSPv2() 33 HTMLCanvasPainterTestForSPv2()
34 : ScopedSlimmingPaintV2ForTest(true), 34 : ScopedSlimmingPaintV2ForTest(true),
35 ScopedRootLayerScrollingForTest(GetParam()) {} 35 ScopedRootLayerScrollingForTest(GetParam()) {}
36 36
37 protected: 37 protected:
38 void SetUp() override { 38 void SetUp() override {
39 chrome_client_ = new StubChromeClientForSPv2(); 39 chrome_client_ = new StubChromeClientForSPv2();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Fetch the layer associated with the <canvas>, and check that it was 93 // Fetch the layer associated with the <canvas>, and check that it was
94 // correctly configured in the layer tree. 94 // correctly configured in the layer tree.
95 const WebLayer* layer = context->PlatformLayer(); 95 const WebLayer* layer = context->PlatformLayer();
96 ASSERT_TRUE(layer); 96 ASSERT_TRUE(layer);
97 EXPECT_TRUE(HasLayerAttached(*layer)); 97 EXPECT_TRUE(HasLayerAttached(*layer));
98 EXPECT_EQ(WebSize(300, 200), layer->Bounds()); 98 EXPECT_EQ(WebSize(300, 200), layer->Bounds());
99 } 99 }
100 100
101 } // namespace blink 101 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698