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

Side by Side Diff: third_party/WebKit/Source/platform/WebIconSizesParserTest.cpp

Issue 2967013002: Be explicit about namespace testing to not mix it with blink::testing (Closed)
Patch Set: Dropped mojo parts that need another review. Created 3 years, 5 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 "public/platform/WebIconSizesParser.h" 5 #include "public/platform/WebIconSizesParser.h"
6 6
7 #include "platform/wtf/text/AtomicString.h" 7 #include "platform/wtf/text/AtomicString.h"
8 #include "public/platform/WebSize.h" 8 #include "public/platform/WebSize.h"
9 #include "public/platform/WebString.h" 9 #include "public/platform/WebString.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class WebIconSizesParserTest : public testing::Test {}; 14 class WebIconSizesParserTest : public ::testing::Test {};
15 15
16 TEST(WebIconSizesParserTest, parseSizes) { 16 TEST(WebIconSizesParserTest, parseSizes) {
17 WebString sizes_attribute = "32x33"; 17 WebString sizes_attribute = "32x33";
18 WebVector<WebSize> sizes; 18 WebVector<WebSize> sizes;
19 sizes = WebIconSizesParser::ParseIconSizes(sizes_attribute); 19 sizes = WebIconSizesParser::ParseIconSizes(sizes_attribute);
20 ASSERT_EQ(1U, sizes.size()); 20 ASSERT_EQ(1U, sizes.size());
21 EXPECT_EQ(32, sizes[0].width); 21 EXPECT_EQ(32, sizes[0].width);
22 EXPECT_EQ(33, sizes[0].height); 22 EXPECT_EQ(33, sizes[0].height);
23 23
24 sizes_attribute = "0x33"; 24 sizes_attribute = "0x33";
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 EXPECT_EQ(0, sizes[1].height); 91 EXPECT_EQ(0, sizes[1].height);
92 92
93 sizes_attribute = "32x33, 64x64"; 93 sizes_attribute = "32x33, 64x64";
94 sizes = WebIconSizesParser::ParseIconSizes(sizes_attribute); 94 sizes = WebIconSizesParser::ParseIconSizes(sizes_attribute);
95 ASSERT_EQ(1U, sizes.size()); 95 ASSERT_EQ(1U, sizes.size());
96 EXPECT_EQ(64, sizes[0].width); 96 EXPECT_EQ(64, sizes[0].width);
97 EXPECT_EQ(64, sizes[0].height); 97 EXPECT_EQ(64, sizes[0].height);
98 } 98 }
99 99
100 } // namespace blink 100 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/TimerTest.cpp ('k') | third_party/WebKit/Source/platform/bindings/RuntimeCallStatsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698