| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/dom/SelectorQuery.h" | 5 #include "core/dom/SelectorQuery.h" |
| 6 | 6 |
| 7 #include "core/css/parser/CSSParser.h" | 7 #include "core/css/parser/CSSParser.h" |
| 8 #include "core/css/parser/CSSParserContext.h" |
| 8 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 9 #include "core/html/HTMLDocument.h" | 10 #include "core/html/HTMLDocument.h" |
| 10 #include "core/html/HTMLHtmlElement.h" | 11 #include "core/html/HTMLHtmlElement.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include <memory> | 13 #include <memory> |
| 13 | 14 |
| 14 namespace blink { | 15 namespace blink { |
| 15 | 16 |
| 16 TEST(SelectorQueryTest, NotMatchingPseudoElement) { | 17 TEST(SelectorQueryTest, NotMatchingPseudoElement) { |
| 17 Document* document = Document::create(); | 18 Document* document = Document::create(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 CSSParserContext::StaticProfile), | 53 CSSParserContext::StaticProfile), |
| 53 nullptr, "p:last-of-type"); | 54 nullptr, "p:last-of-type"); |
| 54 std::unique_ptr<SelectorQuery> query = | 55 std::unique_ptr<SelectorQuery> query = |
| 55 SelectorQuery::adopt(std::move(selectorList)); | 56 SelectorQuery::adopt(std::move(selectorList)); |
| 56 Element* elm = query->queryFirst(*document); | 57 Element* elm = query->queryFirst(*document); |
| 57 ASSERT_TRUE(elm); | 58 ASSERT_TRUE(elm); |
| 58 EXPECT_EQ("last", elm->idForStyleResolution()); | 59 EXPECT_EQ("last", elm->idForStyleResolution()); |
| 59 } | 60 } |
| 60 | 61 |
| 61 } // namespace blink | 62 } // namespace blink |
| OLD | NEW |