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

Side by Side Diff: third_party/WebKit/Source/core/page/WindowFeaturesTest.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 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 "core/page/WindowFeatures.h" 5 #include "core/page/WindowFeatures.h"
6 6
7 #include <gtest/gtest.h>
7 #include "wtf/text/WTFString.h" 8 #include "wtf/text/WTFString.h"
8 #include <gtest/gtest.h>
9 9
10 namespace blink { 10 namespace blink {
11 11
12 using WindowFeaturesTest = ::testing::Test; 12 using WindowFeaturesTest = ::testing::Test;
13 13
14 TEST_F(WindowFeaturesTest, NoOpener) { 14 TEST_F(WindowFeaturesTest, NoOpener) {
15 static const struct { 15 static const struct {
16 const char* featureString; 16 const char* featureString;
17 bool noopener; 17 bool noopener;
18 } cases[] = { 18 } cases[] = {
19 {"", false}, 19 {"", false},
20 {"something", false}, 20 {"something", false},
21 {"something, something", false}, 21 {"something, something", false},
22 {"notnoopener", false}, 22 {"notnoopener", false},
23 {"noopener", true}, 23 {"noopener", true},
24 {"something, noopener", true}, 24 {"something, noopener", true},
25 {"noopener, something", true}, 25 {"noopener, something", true},
26 {"NoOpEnEr", true}, 26 {"NoOpEnEr", true},
27 }; 27 };
28 28
29 for (const auto& test : cases) { 29 for (const auto& test : cases) {
30 WindowFeatures features(test.featureString); 30 WindowFeatures features(test.featureString);
31 EXPECT_EQ(test.noopener, features.noopener) << "Testing '" 31 EXPECT_EQ(test.noopener, features.noopener) << "Testing '"
32 << test.featureString << "'"; 32 << test.featureString << "'";
33 } 33 }
34 } 34 }
35 35
36 } // namespace blink 36 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698