Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / frame / OriginsUsingFeaturesTest.cpp
blob797ef154c6d13605053be32df535fc9edb9d1594
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
3 // found in the LICENSE file.
5 #include "config.h"
6 #include "core/frame/OriginsUsingFeatures.h"
8 #include <gtest/gtest.h>
10 namespace blink {
12 TEST(OriginsUsingFeaturesTest, countName)
14 OriginsUsingFeatures originsUsingFeatures;
15 originsUsingFeatures.countName(OriginsUsingFeatures::Feature::EventPath, "test 1");
16 EXPECT_EQ(1u, originsUsingFeatures.valueByName().size());
17 originsUsingFeatures.countName(OriginsUsingFeatures::Feature::ElementCreateShadowRoot, "test 1");
18 EXPECT_EQ(1u, originsUsingFeatures.valueByName().size());
19 originsUsingFeatures.countName(OriginsUsingFeatures::Feature::EventPath, "test 2");
20 EXPECT_EQ(2u, originsUsingFeatures.valueByName().size());
22 EXPECT_TRUE(originsUsingFeatures.valueByName().get("test 1").get(OriginsUsingFeatures::Feature::EventPath));
23 EXPECT_TRUE(originsUsingFeatures.valueByName().get("test 1").get(OriginsUsingFeatures::Feature::ElementCreateShadowRoot));
24 EXPECT_FALSE(originsUsingFeatures.valueByName().get("test 1").get(OriginsUsingFeatures::Feature::DocumentRegisterElement));
25 EXPECT_TRUE(originsUsingFeatures.valueByName().get("test 2").get(OriginsUsingFeatures::Feature::EventPath));
26 EXPECT_FALSE(originsUsingFeatures.valueByName().get("test 2").get(OriginsUsingFeatures::Feature::ElementCreateShadowRoot));
27 EXPECT_FALSE(originsUsingFeatures.valueByName().get("test 2").get(OriginsUsingFeatures::Feature::DocumentRegisterElement));
29 originsUsingFeatures.clear();
32 } // namespace blink