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

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

Issue 2813863003: Rewrite references to "wtf/" to "platform/wtf/" in core/css and core/style. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 /* 1 /*
2 * Copyright (c) 2014, Google Inc. All rights reserved. 2 * Copyright (c) 2014, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 12 matching lines...) Expand all
23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27 * OF THE POSSIBILITY OF SUCH DAMAGE. 27 * OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #include "core/css/RuleSet.h" 30 #include "core/css/RuleSet.h"
31 31
32 #include "core/css/CSSTestHelper.h" 32 #include "core/css/CSSTestHelper.h"
33 #include "platform/wtf/text/StringBuilder.h"
33 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
34 #include "wtf/text/StringBuilder.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 TEST(RuleSetTest, findBestRuleSetAndAdd_CustomPseudoElements) { 38 TEST(RuleSetTest, findBestRuleSetAndAdd_CustomPseudoElements) {
39 CSSTestHelper helper; 39 CSSTestHelper helper;
40 40
41 helper.AddCSSRules("summary::-webkit-details-marker { }"); 41 helper.AddCSSRules("summary::-webkit-details-marker { }");
42 RuleSet& rule_set = helper.GetRuleSet(); 42 RuleSet& rule_set = helper.GetRuleSet();
43 AtomicString str("-webkit-details-marker"); 43 AtomicString str("-webkit-details-marker");
44 const TerminatedArray<RuleData>* rules = 44 const TerminatedArray<RuleData>* rules =
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 CSSTestHelper helper; 210 CSSTestHelper helper;
211 helper.AddCSSRules(builder.ToString().Ascii().Data()); 211 helper.AddCSSRules(builder.ToString().Ascii().Data());
212 const RuleSet& rule_set = helper.GetRuleSet(); 212 const RuleSet& rule_set = helper.GetRuleSet();
213 const HeapTerminatedArray<RuleData>* rules = rule_set.TagRules("b"); 213 const HeapTerminatedArray<RuleData>* rules = rule_set.TagRules("b");
214 ASSERT_EQ(1u, rules->size()); 214 ASSERT_EQ(1u, rules->size());
215 EXPECT_EQ("b", rules->at(0).Selector().TagQName().LocalName()); 215 EXPECT_EQ("b", rules->at(0).Selector().TagQName().LocalName());
216 EXPECT_FALSE(rule_set.TagRules("span")); 216 EXPECT_FALSE(rule_set.TagRules("span"));
217 } 217 }
218 218
219 } // namespace blink 219 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleSet.cpp ('k') | third_party/WebKit/Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698