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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp

Issue 1634273003: Marked parsing as failed for invalid compound. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/css/parser/CSSSelectorParser.h" 5 #include "core/css/parser/CSSSelectorParser.h"
6 6
7 #include "core/css/CSSSelectorList.h" 7 #include "core/css/CSSSelectorList.h"
8 #include "core/css/StyleSheetContents.h" 8 #include "core/css/StyleSheetContents.h"
9 #include "core/css/parser/CSSTokenizer.h" 9 #include "core/css/parser/CSSTokenizer.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 "::shadow.class", 183 "::shadow.class",
184 "::selection:window-inactive::before", 184 "::selection:window-inactive::before",
185 "::-webkit-volume-slider.class", 185 "::-webkit-volume-slider.class",
186 "::content.a", 186 "::content.a",
187 "::content.a.b", 187 "::content.a.b",
188 ".a::content.b", 188 ".a::content.b",
189 "::before:not(.a)", 189 "::before:not(.a)",
190 "::shadow:not(::after)", 190 "::shadow:not(::after)",
191 "::content:not(#id)", 191 "::content:not(#id)",
192 "::-webkit-scrollbar:vertical:not(:first-child)", 192 "::-webkit-scrollbar:vertical:not(:first-child)",
193 "video::-webkit-media-text-track-region-container.scrolling" 193 "video::-webkit-media-text-track-region-container.scrolling",
194 "div ::before.a"
194 }; 195 };
195 196
196 for (auto testCase : testCases) { 197 for (auto testCase : testCases) {
197 CSSTokenizer::Scope scope(testCase); 198 CSSTokenizer::Scope scope(testCase);
198 CSSParserTokenRange range = scope.tokenRange(); 199 CSSParserTokenRange range = scope.tokenRange();
199 CSSSelectorList list = CSSSelectorParser::parseSelector(range, CSSParser Context(HTMLStandardMode, nullptr), nullptr); 200 CSSSelectorList list = CSSSelectorParser::parseSelector(range, CSSParser Context(HTMLStandardMode, nullptr), nullptr);
200 EXPECT_FALSE(list.isValid()); 201 EXPECT_FALSE(list.isValid());
201 } 202 }
202 } 203 }
203 204
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 SCOPED_TRACE(testCase[0]); 299 SCOPED_TRACE(testCase[0]);
299 CSSTokenizer::Scope scope(testCase[0]); 300 CSSTokenizer::Scope scope(testCase[0]);
300 CSSParserTokenRange range = scope.tokenRange(); 301 CSSParserTokenRange range = scope.tokenRange();
301 CSSSelectorList list = CSSSelectorParser::parseSelector(range, context, sheet.get()); 302 CSSSelectorList list = CSSSelectorParser::parseSelector(range, context, sheet.get());
302 EXPECT_TRUE(list.isValid()); 303 EXPECT_TRUE(list.isValid());
303 EXPECT_STREQ(testCase[1], list.selectorsText().ascii().data()); 304 EXPECT_STREQ(testCase[1], list.selectorsText().ascii().data());
304 } 305 }
305 } 306 }
306 307
307 } // namespace blink 308 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698