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

Side by Side Diff: third_party/WebKit/Source/core/html/canvas/CanvasFontCacheTest.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/html/canvas/CanvasFontCache.h" 5 #include "core/html/canvas/CanvasFontCache.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/html/HTMLDocument.h" 8 #include "core/html/HTMLDocument.h"
9 #include "core/html/canvas/CanvasContextCreationAttributes.h" 9 #include "core/html/canvas/CanvasContextCreationAttributes.h"
10 #include "core/html/canvas/CanvasRenderingContext.h" 10 #include "core/html/canvas/CanvasRenderingContext.h"
(...skipping 13 matching lines...) Expand all
24 void SetUp() override; 24 void SetUp() override;
25 25
26 DummyPageHolder& page() const { return *m_dummyPageHolder; } 26 DummyPageHolder& page() const { return *m_dummyPageHolder; }
27 HTMLDocument& document() const { return *m_document; } 27 HTMLDocument& document() const { return *m_document; }
28 HTMLCanvasElement& canvasElement() const { return *m_canvasElement; } 28 HTMLCanvasElement& canvasElement() const { return *m_canvasElement; }
29 CanvasRenderingContext* context2d() const; 29 CanvasRenderingContext* context2d() const;
30 CanvasFontCache* cache() { return m_document->canvasFontCache(); } 30 CanvasFontCache* cache() { return m_document->canvasFontCache(); }
31 31
32 private: 32 private:
33 OwnPtr<DummyPageHolder> m_dummyPageHolder; 33 OwnPtr<DummyPageHolder> m_dummyPageHolder;
34 RefPtrWillBePersistent<HTMLDocument> m_document; 34 Persistent<HTMLDocument> m_document;
35 RefPtrWillBePersistent<HTMLCanvasElement> m_canvasElement; 35 Persistent<HTMLCanvasElement> m_canvasElement;
36 }; 36 };
37 37
38 CanvasFontCacheTest::CanvasFontCacheTest() 38 CanvasFontCacheTest::CanvasFontCacheTest()
39 { } 39 { }
40 40
41 CanvasRenderingContext* CanvasFontCacheTest::context2d() const 41 CanvasRenderingContext* CanvasFontCacheTest::context2d() const
42 { 42 {
43 // If the following check fails, perhaps you forgot to call createContext 43 // If the following check fails, perhaps you forgot to call createContext
44 // in your test? 44 // in your test?
45 EXPECT_NE(nullptr, canvasElement().renderingContext()); 45 EXPECT_NE(nullptr, canvasElement().renderingContext());
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 EXPECT_FALSE(cache()->isInCache("15px sans-serif")); 95 EXPECT_FALSE(cache()->isInCache("15px sans-serif"));
96 96
97 page().page().setVisibilityState(PageVisibilityStateVisible, false); 97 page().page().setVisibilityState(PageVisibilityStateVisible, false);
98 context2d()->setFont("15px sans-serif"); 98 context2d()->setFont("15px sans-serif");
99 context2d()->setFont("10px sans-serif"); 99 context2d()->setFont("10px sans-serif");
100 EXPECT_TRUE(cache()->isInCache("10px sans-serif")); 100 EXPECT_TRUE(cache()->isInCache("10px sans-serif"));
101 EXPECT_TRUE(cache()->isInCache("15px sans-serif")); 101 EXPECT_TRUE(cache()->isInCache("15px sans-serif"));
102 } 102 }
103 103
104 } // namespace blink 104 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698