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

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

Issue 1164413003: Fix unit test style in core/{animation,css,fetch,frame,layout,style,timing}/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: anonymous Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutTableRowTest.cpp ('k') | Source/core/layout/OverflowModelTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/layout/LayoutTheme.h" 6 #include "core/layout/LayoutTheme.h"
7 7
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/HTMLDocument.h" 10 #include "core/html/HTMLDocument.h"
11 #include "core/html/HTMLElement.h" 11 #include "core/html/HTMLElement.h"
12 #include "core/style/ComputedStyle.h" 12 #include "core/style/ComputedStyle.h"
13 #include "core/page/FocusController.h" 13 #include "core/page/FocusController.h"
14 #include "core/page/Page.h" 14 #include "core/page/Page.h"
15 #include "core/testing/DummyPageHolder.h" 15 #include "core/testing/DummyPageHolder.h"
16 #include "platform/graphics/Color.h" 16 #include "platform/graphics/Color.h"
17 #include <gtest/gtest.h> 17 #include <gtest/gtest.h>
18 18
19 using namespace blink; 19 namespace blink {
20
21 namespace {
22 20
23 class LayoutThemeTest : public ::testing::Test { 21 class LayoutThemeTest : public ::testing::Test {
24
25 protected: 22 protected:
26 virtual void SetUp() override; 23 void SetUp() override;
27 HTMLDocument& document() const { return *m_document; } 24 HTMLDocument& document() const { return *m_document; }
28 void setHtmlInnerHTML(const char* htmlContent); 25 void setHtmlInnerHTML(const char* htmlContent);
29 26
30 private: 27 private:
31 OwnPtr<DummyPageHolder> m_dummyPageHolder; 28 OwnPtr<DummyPageHolder> m_dummyPageHolder;
32 HTMLDocument* m_document; 29 HTMLDocument* m_document;
33 }; 30 };
34 31
35 void LayoutThemeTest::SetUp() 32 void LayoutThemeTest::SetUp()
36 { 33 {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Change focus ring color. 79 // Change focus ring color.
83 LayoutTheme::theme().setCustomFocusRingColor(customColor); 80 LayoutTheme::theme().setCustomFocusRingColor(customColor);
84 Page::platformColorsChanged(); 81 Page::platformColorsChanged();
85 document().view()->updateLayoutAndStyleForPainting(); 82 document().view()->updateLayoutAndStyleForPainting();
86 83
87 // Check that the focus ring color is updated. 84 // Check that the focus ring color is updated.
88 EXPECT_NE(BNONE, outlineStyle(span)); 85 EXPECT_NE(BNONE, outlineStyle(span));
89 EXPECT_EQ(customColor, outlineColor(span)); 86 EXPECT_EQ(customColor, outlineColor(span));
90 } 87 }
91 88
92 } 89 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTableRowTest.cpp ('k') | Source/core/layout/OverflowModelTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698