| OLD | NEW |
| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 TEST(RuleSetTest, findBestRuleSetAndAdd_DivWithContent) | 125 TEST(RuleSetTest, findBestRuleSetAndAdd_DivWithContent) |
| 126 { | 126 { |
| 127 CSSTestHelper helper; | 127 CSSTestHelper helper; |
| 128 | 128 |
| 129 helper.addCSSRules("div::content { }"); | 129 helper.addCSSRules("div::content { }"); |
| 130 RuleSet& ruleSet = helper.ruleSet(); | 130 RuleSet& ruleSet = helper.ruleSet(); |
| 131 AtomicString str("div"); | 131 AtomicString str("div"); |
| 132 const TerminatedArray<RuleData>* rules = ruleSet.tagRules(str); | 132 const TerminatedArray<RuleData>* rules = ruleSet.tagRules(str); |
| 133 ASSERT_EQ(1u, rules->size()); | 133 ASSERT_EQ(1u, rules->size()); |
| 134 AtomicString valueStr("content"); | 134 AtomicString valueStr("content"); |
| 135 ASSERT_EQ(valueStr, rules->at(0).selector().value()); | 135 ASSERT_EQ(valueStr, rules->at(0).selector().tagHistory()->value()); |
| 136 } | 136 } |
| 137 | 137 |
| 138 TEST(RuleSetTest, findBestRuleSetAndAdd_Host) | 138 TEST(RuleSetTest, findBestRuleSetAndAdd_Host) |
| 139 { | 139 { |
| 140 CSSTestHelper helper; | 140 CSSTestHelper helper; |
| 141 | 141 |
| 142 helper.addCSSRules(":host { }"); | 142 helper.addCSSRules(":host { }"); |
| 143 RuleSet& ruleSet = helper.ruleSet(); | 143 RuleSet& ruleSet = helper.ruleSet(); |
| 144 const WillBeHeapVector<RuleData>* rules = ruleSet.shadowHostRules(); | 144 const WillBeHeapVector<RuleData>* rules = ruleSet.shadowHostRules(); |
| 145 ASSERT_EQ(1u, rules->size()); | 145 ASSERT_EQ(1u, rules->size()); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 { | 203 { |
| 204 CSSTestHelper helper; | 204 CSSTestHelper helper; |
| 205 | 205 |
| 206 helper.addCSSRules(".foo:host-context(*) { }"); | 206 helper.addCSSRules(".foo:host-context(*) { }"); |
| 207 RuleSet& ruleSet = helper.ruleSet(); | 207 RuleSet& ruleSet = helper.ruleSet(); |
| 208 const WillBeHeapVector<RuleData>* rules = ruleSet.shadowHostRules(); | 208 const WillBeHeapVector<RuleData>* rules = ruleSet.shadowHostRules(); |
| 209 ASSERT_EQ(0u, rules->size()); | 209 ASSERT_EQ(0u, rules->size()); |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace blink | 212 } // namespace blink |
| OLD | NEW |