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

Side by Side Diff: third_party/WebKit/Source/core/dom/SelectorQueryTest.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 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 <memory>
7 #include "core/css/parser/CSSParser.h" 8 #include "core/css/parser/CSSParser.h"
8 #include "core/css/parser/CSSParserContext.h" 9 #include "core/css/parser/CSSParserContext.h"
9 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
10 #include "core/html/HTMLDocument.h" 11 #include "core/html/HTMLDocument.h"
11 #include "core/html/HTMLHtmlElement.h" 12 #include "core/html/HTMLHtmlElement.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 #include <memory>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 TEST(SelectorQueryTest, NotMatchingPseudoElement) { 17 TEST(SelectorQueryTest, NotMatchingPseudoElement) {
18 Document* document = Document::create(); 18 Document* document = Document::create();
19 HTMLHtmlElement* html = HTMLHtmlElement::create(*document); 19 HTMLHtmlElement* html = HTMLHtmlElement::create(*document);
20 document->appendChild(html); 20 document->appendChild(html);
21 document->documentElement()->setInnerHTML( 21 document->documentElement()->setInnerHTML(
22 "<body><style>span::before { content: 'X' }</style><span></span></body>"); 22 "<body><style>span::before { content: 'X' }</style><span></span></body>");
23 23
(...skipping 29 matching lines...) Expand all
53 CSSParserContext::StaticProfile), 53 CSSParserContext::StaticProfile),
54 nullptr, "p:last-of-type"); 54 nullptr, "p:last-of-type");
55 std::unique_ptr<SelectorQuery> query = 55 std::unique_ptr<SelectorQuery> query =
56 SelectorQuery::adopt(std::move(selectorList)); 56 SelectorQuery::adopt(std::move(selectorList));
57 Element* elm = query->queryFirst(*document); 57 Element* elm = query->queryFirst(*document);
58 ASSERT_TRUE(elm); 58 ASSERT_TRUE(elm);
59 EXPECT_EQ("last", elm->idForStyleResolution()); 59 EXPECT_EQ("last", elm->idForStyleResolution());
60 } 60 }
61 61
62 } // namespace blink 62 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/SelectorQuery.cpp ('k') | third_party/WebKit/Source/core/dom/StyleElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698