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

Side by Side Diff: Source/core/css/MediaQuerySetTest.cpp

Issue 308733005: Fix assert on unknown rule type in the BisonCSSParser::endRuleHeader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 // 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 {"all an[isdfs bla())()]icalc(i)(()), (max-width: 400px)", "not all, (ma x-width: 400px)", true}, 150 {"all an[isdfs bla())()]icalc(i)(()), (max-width: 400px)", "not all, (ma x-width: 400px)", true},
151 {"all an[isdfs bla())(]icalc(i)(()), (max-width: 500px)", "not all", tru e}, 151 {"all an[isdfs bla())(]icalc(i)(()), (max-width: 500px)", "not all", tru e},
152 {"all an[isdfs bla())(]icalc(i)(())), (max-width: 600px)", "not all", tr ue}, 152 {"all an[isdfs bla())(]icalc(i)(())), (max-width: 600px)", "not all", tr ue},
153 {"all an[isdfs bla())(]icalc(i)(()))], (max-width: 800px)", "not all, (m ax-width: 800px)", true}, 153 {"all an[isdfs bla())(]icalc(i)(()))], (max-width: 800px)", "not all, (m ax-width: 800px)", true},
154 {"(max-width: '40px')", "not all", true}, 154 {"(max-width: '40px')", "not all", true},
155 {"('max-width': 40px)", "not all", true}, 155 {"('max-width': 40px)", "not all", true},
156 {"'\"'\", (max-width: 900px)", "not all", true}, 156 {"'\"'\", (max-width: 900px)", "not all", true},
157 {"'\"\"\"', (max-width: 900px)", "not all, (max-width: 900px)", true}, 157 {"'\"\"\"', (max-width: 900px)", "not all, (max-width: 900px)", 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 {"s}", "not all", true},
161 {"s}, (color)", "not all, (color)", true},
160 {0, 0} // Do not remove the terminator line. 162 {0, 0} // Do not remove the terminator line.
161 }; 163 };
162 164
163 for (unsigned i = 0; testCases[i].input; ++i) { 165 for (unsigned i = 0; testCases[i].input; ++i) {
164 RefPtrWillBeRawPtr<MediaQuerySet> oldParserQuerySet = MediaQuerySet::cre ate(testCases[i].input); 166 RefPtrWillBeRawPtr<MediaQuerySet> oldParserQuerySet = MediaQuerySet::cre ate(testCases[i].input);
165 RefPtrWillBeRawPtr<MediaQuerySet> threadSafeQuerySet = MediaQuerySet::cr eateOffMainThread(testCases[i].input); 167 RefPtrWillBeRawPtr<MediaQuerySet> threadSafeQuerySet = MediaQuerySet::cr eateOffMainThread(testCases[i].input);
166 testMediaQuery(testCases[i], *oldParserQuerySet, true); 168 testMediaQuery(testCases[i], *oldParserQuerySet, true);
167 testMediaQuery(testCases[i], *threadSafeQuerySet, false); 169 testMediaQuery(testCases[i], *threadSafeQuerySet, false);
168 } 170 }
169 } 171 }
170 172
171 } // namespace 173 } // namespace
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/parser/BisonCSSParser-in.cpp » ('j') | Source/core/css/parser/BisonCSSParser-in.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698