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

Side by Side Diff: Source/core/html/LinkRelAttributeTest.cpp

Issue 1171323003: Fix unit test style in core/{dom,editing,html}/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: whitespace fix 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/html/LinkRelAttribute.h" 32 #include "core/html/LinkRelAttribute.h"
33
33 #include "platform/RuntimeEnabledFeatures.h" 34 #include "platform/RuntimeEnabledFeatures.h"
34
35 #include "wtf/text/CString.h" 35 #include "wtf/text/CString.h"
36 #include <gtest/gtest.h> 36 #include <gtest/gtest.h>
37 37
38 using namespace blink; 38 namespace blink {
39
40 namespace {
41 39
42 class LinkRelAttributeTest : public testing::Test { 40 class LinkRelAttributeTest : public testing::Test {
43 protected: 41 protected:
44 virtual void SetUp() 42 void SetUp() override
45 { 43 {
46 m_touchIconLoadingEnabled = RuntimeEnabledFeatures::touchIconLoadingEnab led(); 44 m_touchIconLoadingEnabled = RuntimeEnabledFeatures::touchIconLoadingEnab led();
47 m_presentationEnabled = RuntimeEnabledFeatures::presentationEnabled(); 45 m_presentationEnabled = RuntimeEnabledFeatures::presentationEnabled();
48 } 46 }
49 47
50 virtual void TearDown() 48 void TearDown() override
51 { 49 {
52 RuntimeEnabledFeatures::setTouchIconLoadingEnabled(m_touchIconLoadingEna bled); 50 RuntimeEnabledFeatures::setTouchIconLoadingEnabled(m_touchIconLoadingEna bled);
53 RuntimeEnabledFeatures::setPresentationEnabled(m_presentationEnabled); 51 RuntimeEnabledFeatures::setPresentationEnabled(m_presentationEnabled);
54 } 52 }
55 53
56 private: 54 private:
57 bool m_touchIconLoadingEnabled; 55 bool m_touchIconLoadingEnabled;
58 bool m_presentationEnabled; 56 bool m_presentationEnabled;
59 }; 57 };
60 58
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 146
149 TEST_F(LinkRelAttributeTest, ConstructorDefaultPresentation) 147 TEST_F(LinkRelAttributeTest, ConstructorDefaultPresentation)
150 { 148 {
151 RuntimeEnabledFeatures::setPresentationEnabled(false); 149 RuntimeEnabledFeatures::setPresentationEnabled(false);
152 EXPECT_FALSE(LinkRelAttribute("default-presentation").isDefaultPresentation( )); 150 EXPECT_FALSE(LinkRelAttribute("default-presentation").isDefaultPresentation( ));
153 151
154 RuntimeEnabledFeatures::setPresentationEnabled(true); 152 RuntimeEnabledFeatures::setPresentationEnabled(true);
155 EXPECT_TRUE(LinkRelAttribute("default-presentation").isDefaultPresentation() ); 153 EXPECT_TRUE(LinkRelAttribute("default-presentation").isDefaultPresentation() );
156 } 154 }
157 155
158 } // namespace 156 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextFormControlElementTest.cpp ('k') | Source/core/html/TimeRangesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698