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

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

Issue 2770123003: Replace ASSERT with DCHECK in core/layout/ excluding subdirs (Closed)
Patch Set: Split some DCHECKs and add DCHECK_ops wherever possible Created 3 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/layout/LayoutTheme.h" 5 #include "core/layout/LayoutTheme.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/NodeComputedStyle.h" 8 #include "core/dom/NodeComputedStyle.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/html/HTMLElement.h" 10 #include "core/html/HTMLElement.h"
(...skipping 14 matching lines...) Expand all
25 void setHtmlInnerHTML(const char* htmlContent); 25 void setHtmlInnerHTML(const char* htmlContent);
26 26
27 private: 27 private:
28 std::unique_ptr<DummyPageHolder> m_dummyPageHolder; 28 std::unique_ptr<DummyPageHolder> m_dummyPageHolder;
29 Persistent<Document> m_document; 29 Persistent<Document> m_document;
30 }; 30 };
31 31
32 void LayoutThemeTest::SetUp() { 32 void LayoutThemeTest::SetUp() {
33 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); 33 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
34 m_document = &m_dummyPageHolder->document(); 34 m_document = &m_dummyPageHolder->document();
35 ASSERT(m_document); 35 DCHECK(m_document);
36 } 36 }
37 37
38 void LayoutThemeTest::setHtmlInnerHTML(const char* htmlContent) { 38 void LayoutThemeTest::setHtmlInnerHTML(const char* htmlContent) {
39 document().documentElement()->setInnerHTML(String::fromUTF8(htmlContent)); 39 document().documentElement()->setInnerHTML(String::fromUTF8(htmlContent));
40 document().view()->updateAllLifecyclePhases(); 40 document().view()->updateAllLifecyclePhases();
41 } 41 }
42 42
43 inline Color outlineColor(Element* element) { 43 inline Color outlineColor(Element* element) {
44 return element->computedStyle()->visitedDependentColor( 44 return element->computedStyle()->visitedDependentColor(
45 CSSPropertyOutlineColor); 45 CSSPropertyOutlineColor);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 }; 96 };
97 97
98 for (const auto& testcase : tests) { 98 for (const auto& testcase : tests) {
99 EXPECT_EQ(testcase.expectedResult, 99 EXPECT_EQ(testcase.expectedResult,
100 LayoutTheme::theme().formatMediaControlsCurrentTime( 100 LayoutTheme::theme().formatMediaControlsCurrentTime(
101 testcase.time, testcase.duration)); 101 testcase.time, testcase.duration));
102 } 102 }
103 } 103 }
104 104
105 } // namespace blink 105 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMac.mm ('k') | third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698