| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/css/parser/CSSPropertyParser.h" | 6 #include "core/css/parser/CSSPropertyParser.h" |
| 7 | 7 |
| 8 #include "core/css/CSSValueList.h" | 8 #include "core/css/CSSValueList.h" |
| 9 #include "core/css/parser/CSSParser.h" | 9 #include "core/css/parser/CSSParser.h" |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 {CSSPropertyGridTemplateColumns, "repeat(1000000, 10%)", 1000000}, | 35 {CSSPropertyGridTemplateColumns, "repeat(1000000, 10%)", 1000000}, |
| 36 {CSSPropertyGridTemplateRows, "repeat(1000000, 10%)", 1000000}, | 36 {CSSPropertyGridTemplateRows, "repeat(1000000, 10%)", 1000000}, |
| 37 {CSSPropertyGridTemplateColumns, "repeat(1000000, (first) min-content (l
ast))", 1000000}, | 37 {CSSPropertyGridTemplateColumns, "repeat(1000000, (first) min-content (l
ast))", 1000000}, |
| 38 {CSSPropertyGridTemplateRows, "repeat(1000000, (first) min-content (last
))", 1000000}, | 38 {CSSPropertyGridTemplateRows, "repeat(1000000, (first) min-content (last
))", 1000000}, |
| 39 {CSSPropertyGridTemplateColumns, "repeat(1000001, auto)", 1000000}, | 39 {CSSPropertyGridTemplateColumns, "repeat(1000001, auto)", 1000000}, |
| 40 {CSSPropertyGridTemplateRows, "repeat(1000001, auto)", 1000000}, | 40 {CSSPropertyGridTemplateRows, "repeat(1000001, auto)", 1000000}, |
| 41 {CSSPropertyGridTemplateColumns, "repeat(400000, 2em minmax(10px, max-co
ntent) 0.5fr)", 999999}, | 41 {CSSPropertyGridTemplateColumns, "repeat(400000, 2em minmax(10px, max-co
ntent) 0.5fr)", 999999}, |
| 42 {CSSPropertyGridTemplateRows, "repeat(400000, 2em minmax(10px, max-conte
nt) 0.5fr)", 999999}, | 42 {CSSPropertyGridTemplateRows, "repeat(400000, 2em minmax(10px, max-conte
nt) 0.5fr)", 999999}, |
| 43 {CSSPropertyGridTemplateColumns, "repeat(600000, (first) 3vh 10% 2fr (na
v) 10px auto 1fr 6em (last))", 999999}, | 43 {CSSPropertyGridTemplateColumns, "repeat(600000, (first) 3vh 10% 2fr (na
v) 10px auto 1fr 6em (last))", 999999}, |
| 44 {CSSPropertyGridTemplateRows, "repeat(600000, (first) 3vh 10% 2fr (nav)
10px auto 1fr 6em (last))", 999999}, | 44 {CSSPropertyGridTemplateRows, "repeat(600000, (first) 3vh 10% 2fr (nav)
10px auto 1fr 6em (last))", 999999}, |
| 45 {CSSPropertyGridTemplateColumns, "repeat(100000000000000000000, 10% 1fr)
", 1000000}, |
| 46 {CSSPropertyGridTemplateRows, "repeat(100000000000000000000, 10% 1fr)",
1000000}, |
| 47 {CSSPropertyGridTemplateColumns, "repeat(100000000000000000000, 10% 5em
1fr auto auto 15px min-content)", 999999}, |
| 48 {CSSPropertyGridTemplateRows, "repeat(100000000000000000000, 10% 5em 1fr
auto auto 15px min-content)", 999999}, |
| 45 }; | 49 }; |
| 46 | 50 |
| 47 for (unsigned i = 0; i < WTF_ARRAY_LENGTH(testCases); ++i) { | 51 for (unsigned i = 0; i < WTF_ARRAY_LENGTH(testCases); ++i) { |
| 48 RefPtrWillBeRawPtr<CSSValue> value = CSSParser::parseSingleValue(testCas
es[i].propertyID, testCases[i].input); | 52 RefPtrWillBeRawPtr<CSSValue> value = CSSParser::parseSingleValue(testCas
es[i].propertyID, testCases[i].input); |
| 49 ASSERT_TRUE(value); | 53 ASSERT_TRUE(value); |
| 50 ASSERT_TRUE(value->isValueList()); | 54 ASSERT_TRUE(value->isValueList()); |
| 51 EXPECT_EQ(computeNumberOfTracks(toCSSValueList(value.get())), testCases[
i].output); | 55 EXPECT_EQ(computeNumberOfTracks(toCSSValueList(value.get())), testCases[
i].output); |
| 52 } | 56 } |
| 53 } | 57 } |
| 54 | 58 |
| 55 } // namespace blink | 59 } // namespace blink |
| OLD | NEW |