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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutThemeTest.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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/layout/LayoutTheme.h" 5 #include "core/layout/LayoutTheme.h"
6 6
7 #include "core/dom/NodeComputedStyle.h" 7 #include "core/dom/NodeComputedStyle.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/html/HTMLDocument.h" 9 #include "core/html/HTMLDocument.h"
10 #include "core/html/HTMLElement.h" 10 #include "core/html/HTMLElement.h"
11 #include "core/page/FocusController.h" 11 #include "core/page/FocusController.h"
12 #include "core/page/Page.h" 12 #include "core/page/Page.h"
13 #include "core/style/ComputedStyle.h" 13 #include "core/style/ComputedStyle.h"
14 #include "core/testing/DummyPageHolder.h" 14 #include "core/testing/DummyPageHolder.h"
15 #include "platform/graphics/Color.h" 15 #include "platform/graphics/Color.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include <memory>
17 18
18 namespace blink { 19 namespace blink {
19 20
20 class LayoutThemeTest : public ::testing::Test { 21 class LayoutThemeTest : public ::testing::Test {
21 protected: 22 protected:
22 void SetUp() override; 23 void SetUp() override;
23 HTMLDocument& document() const { return *m_document; } 24 HTMLDocument& document() const { return *m_document; }
24 void setHtmlInnerHTML(const char* htmlContent); 25 void setHtmlInnerHTML(const char* htmlContent);
25 26
26 private: 27 private:
27 OwnPtr<DummyPageHolder> m_dummyPageHolder; 28 std::unique_ptr<DummyPageHolder> m_dummyPageHolder;
28 Persistent<HTMLDocument> m_document; 29 Persistent<HTMLDocument> m_document;
29 }; 30 };
30 31
31 void LayoutThemeTest::SetUp() 32 void LayoutThemeTest::SetUp()
32 { 33 {
33 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); 34 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
34 m_document = toHTMLDocument(&m_dummyPageHolder->document()); 35 m_document = toHTMLDocument(&m_dummyPageHolder->document());
35 ASSERT(m_document); 36 ASSERT(m_document);
36 } 37 }
37 38
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 131
131 for (const auto& testcase : tests) { 132 for (const auto& testcase : tests) {
132 RuntimeEnabledFeatures::setNewMediaPlaybackUiEnabled(testcase.newUi); 133 RuntimeEnabledFeatures::setNewMediaPlaybackUiEnabled(testcase.newUi);
133 EXPECT_EQ(testcase.expectedResult, 134 EXPECT_EQ(testcase.expectedResult,
134 LayoutTheme::theme().formatMediaControlsCurrentTime(testcase.time, t estcase.duration)); 135 LayoutTheme::theme().formatMediaControlsCurrentTime(testcase.time, t estcase.duration));
135 } 136 }
136 RuntimeEnabledFeatures::setNewMediaPlaybackUiEnabled(newUi); 137 RuntimeEnabledFeatures::setNewMediaPlaybackUiEnabled(newUi);
137 } 138 }
138 139
139 } // namespace blink 140 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTestHelper.h ('k') | third_party/WebKit/Source/core/layout/LayoutView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698