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

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

Issue 2905283003: Remove a bunch of dead code around WindowFeatures (Closed)
Patch Set: Use WebWindowFeatures everywhere Created 3 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
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/CreateWindow.h"
6 6
7 #include <gtest/gtest.h> 7 #include <gtest/gtest.h>
8 #include "platform/wtf/text/WTFString.h" 8 #include "platform/wtf/text/WTFString.h"
9 #include "public/web/WebWindowFeatures.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
12 using WindowFeaturesTest = ::testing::Test; 13 using WindowFeaturesTest = ::testing::Test;
13 14
14 TEST_F(WindowFeaturesTest, NoOpener) { 15 TEST_F(WindowFeaturesTest, NoOpener) {
15 static const struct { 16 static const struct {
16 const char* feature_string; 17 const char* feature_string;
17 bool noopener; 18 bool noopener;
18 } kCases[] = { 19 } kCases[] = {
19 {"", false}, 20 {"", false},
20 {"something", false}, 21 {"something", false},
21 {"something, something", false}, 22 {"something, something", false},
22 {"notnoopener", false}, 23 {"notnoopener", false},
23 {"noopener", true}, 24 {"noopener", true},
24 {"something, noopener", true}, 25 {"something, noopener", true},
25 {"noopener, something", true}, 26 {"noopener, something", true},
26 {"NoOpEnEr", true}, 27 {"NoOpEnEr", true},
27 }; 28 };
28 29
29 for (const auto& test : kCases) { 30 for (const auto& test : kCases) {
30 WindowFeatures features(test.feature_string); 31 EXPECT_EQ(test.noopener,
31 EXPECT_EQ(test.noopener, features.noopener) 32 GetWindowFeaturesFromString(test.feature_string).noopener)
32 << "Testing '" << test.feature_string << "'"; 33 << "Testing '" << test.feature_string << "'";
33 } 34 }
34 } 35 }
35 36
36 } // namespace blink 37 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698