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

Side by Side Diff: third_party/WebKit/Source/core/dom/SelectorQueryTest.cpp

Issue 2580793005: Split the CSSParserContext class out of CSSParserMode into its own file. (Closed)
Patch Set: fix compile Created 3 years, 12 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698