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/MediaQuery.h" | 6 #include "core/css/MediaQuery.h" |
7 | 7 |
8 #include "core/css/MediaList.h" | 8 #include "core/css/MediaList.h" |
9 #include "wtf/PassOwnPtr.h" | 9 #include "wtf/PassOwnPtr.h" |
10 #include "wtf/text/StringBuilder.h" | 10 #include "wtf/text/StringBuilder.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 {"all an[isdfs bla())()]icalc(i)(()), (max-width: 400px)", "not all, (ma
x-width: 400px)", true}, | 152 {"all an[isdfs bla())()]icalc(i)(()), (max-width: 400px)", "not all, (ma
x-width: 400px)", true}, |
153 {"all an[isdfs bla())(]icalc(i)(()), (max-width: 500px)", "not all", tru
e}, | 153 {"all an[isdfs bla())(]icalc(i)(()), (max-width: 500px)", "not all", tru
e}, |
154 {"all an[isdfs bla())(]icalc(i)(())), (max-width: 600px)", "not all", tr
ue}, | 154 {"all an[isdfs bla())(]icalc(i)(())), (max-width: 600px)", "not all", tr
ue}, |
155 {"all an[isdfs bla())(]icalc(i)(()))], (max-width: 800px)", "not all, (m
ax-width: 800px)", true}, | 155 {"all an[isdfs bla())(]icalc(i)(()))], (max-width: 800px)", "not all, (m
ax-width: 800px)", true}, |
156 {"(max-width: '40px')", "not all", true}, | 156 {"(max-width: '40px')", "not all", true}, |
157 {"('max-width': 40px)", "not all", true}, | 157 {"('max-width': 40px)", "not all", true}, |
158 {"'\"'\", (max-width: 900px)", "not all", true}, | 158 {"'\"'\", (max-width: 900px)", "not all", true}, |
159 {"'\"\"\"', (max-width: 900px)", "not all, (max-width: 900px)", true}, | 159 {"'\"\"\"', (max-width: 900px)", "not all, (max-width: 900px)", true}, |
160 {"\"'\"', (max-width: 900px)", "not all", true}, | 160 {"\"'\"', (max-width: 900px)", "not all", true}, |
161 {"\"'''\", (max-width: 900px)", "not all, (max-width: 900px)", true}, | 161 {"\"'''\", (max-width: 900px)", "not all, (max-width: 900px)", true}, |
| 162 {"not not", "not all", true}, |
| 163 {"not and", "not all", true}, |
| 164 {"not only", "not all", true}, |
| 165 {"not or", "not all", true}, |
| 166 {"only not", "not all", true}, |
| 167 {"only and", "not all", true}, |
| 168 {"only only", "not all", true}, |
| 169 {"only or", "not all", true}, |
| 170 {"not (orientation)", "not all", true}, |
| 171 {"only (orientation)", "not all", true}, |
162 {0, 0} // Do not remove the terminator line. | 172 {0, 0} // Do not remove the terminator line. |
163 }; | 173 }; |
164 | 174 |
165 for (unsigned i = 0; testCases[i].input; ++i) { | 175 for (unsigned i = 0; testCases[i].input; ++i) { |
166 RefPtrWillBeRawPtr<MediaQuerySet> oldParserQuerySet = MediaQuerySet::cre
ate(testCases[i].input); | 176 RefPtrWillBeRawPtr<MediaQuerySet> oldParserQuerySet = MediaQuerySet::cre
ate(testCases[i].input); |
167 RefPtrWillBeRawPtr<MediaQuerySet> threadSafeQuerySet = MediaQuerySet::cr
eateOffMainThread(testCases[i].input); | 177 RefPtrWillBeRawPtr<MediaQuerySet> threadSafeQuerySet = MediaQuerySet::cr
eateOffMainThread(testCases[i].input); |
168 testMediaQuery(testCases[i], *oldParserQuerySet, true); | 178 testMediaQuery(testCases[i], *oldParserQuerySet, true); |
169 testMediaQuery(testCases[i], *threadSafeQuerySet, false); | 179 testMediaQuery(testCases[i], *threadSafeQuerySet, false); |
170 } | 180 } |
171 } | 181 } |
172 | 182 |
173 } // namespace | 183 } // namespace |
OLD | NEW |