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

Side by Side Diff: Source/platform/weborigin/KnownPortsTest.cpp

Issue 1184673003: Fix unit test style in Source/platform/, part 2. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "platform/weborigin/KnownPorts.h" 6 #include "platform/weborigin/KnownPorts.h"
7 7
8 #include <gtest/gtest.h> 8 #include <gtest/gtest.h>
9 9
10 using blink::isDefaultPortForProtocol; 10 namespace blink {
11
12 namespace {
13 11
14 TEST(KnownPortsTest, IsDefaultPortForProtocol) 12 TEST(KnownPortsTest, IsDefaultPortForProtocol)
15 { 13 {
16 struct TestCase { 14 struct TestCase {
17 const unsigned short port; 15 const unsigned short port;
18 const char* protocol; 16 const char* protocol;
19 const bool isKnown; 17 const bool isKnown;
20 }; 18 };
21 19
22 TestCase inputs[] = { 20 TestCase inputs[] = {
(...skipping 14 matching lines...) Expand all
37 { 80, "HTTP", false }, 35 { 80, "HTTP", false },
38 { 443, "Https", false }, 36 { 443, "Https", false },
39 }; 37 };
40 38
41 for (TestCase test : inputs) { 39 for (TestCase test : inputs) {
42 bool result = isDefaultPortForProtocol(test.port, test.protocol); 40 bool result = isDefaultPortForProtocol(test.port, test.protocol);
43 EXPECT_EQ(test.isKnown, result); 41 EXPECT_EQ(test.isKnown, result);
44 } 42 }
45 } 43 }
46 44
47 } 45 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698