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

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

Issue 221383003: Fixed MediaQueryTokenizer escape support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Disabled escape tests on old parser Created 6 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
« no previous file with comments | « no previous file | Source/core/css/parser/MediaQueryTokenizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 {"(color", "(color)", true}, 111 {"(color", "(color)", true},
112 {"(min-color: 2", "(min-color: 2)", true}, 112 {"(min-color: 2", "(min-color: 2)", true},
113 {"(orientation: portrait)", 0, true}, 113 {"(orientation: portrait)", 0, true},
114 {"tv and (scan: progressive)", 0, true}, 114 {"tv and (scan: progressive)", 0, true},
115 {"(pointer: coarse)", 0, true}, 115 {"(pointer: coarse)", 0, true},
116 {"(min-orientation:portrait)", "not all", true}, 116 {"(min-orientation:portrait)", "not all", true},
117 {"all and (orientation:portrait)", "(orientation: portrait)", true}, 117 {"all and (orientation:portrait)", "(orientation: portrait)", true},
118 {"all and (orientation:landscape)", "(orientation: landscape)", true}, 118 {"all and (orientation:landscape)", "(orientation: landscape)", true},
119 {"NOT braille, tv AND (max-width: 200px) and (min-WIDTH: 100px) and (ori entation: landscape), (color)", 119 {"NOT braille, tv AND (max-width: 200px) and (min-WIDTH: 100px) and (ori entation: landscape), (color)",
120 "not braille, tv and (max-width: 200px) and (min-width: 100px) and ( orientation: landscape), (color)", true}, 120 "not braille, tv and (max-width: 200px) and (min-width: 100px) and ( orientation: landscape), (color)", true},
121 {"(m\\61x-width: 300px)", "(max-width: 300px)", true},
122 {"(max-width: 400\\70\\78)", "(max-width: 400px)", false},
123 {"(max-width: 500\\0070\\0078)", "(max-width: 500px)", false},
124 {"(max-width: 600\\000070\\000078)", "(max-width: 600px)", false},
121 {"(max-width: 700px), (max-width: 700px)", "(max-width: 700px), (max-wid th: 700px)", true}, 125 {"(max-width: 700px), (max-width: 700px)", "(max-width: 700px), (max-wid th: 700px)", true},
122 {"(max-width: 800px()), (max-width: 800px)", "not all, (max-width: 800px )", true}, 126 {"(max-width: 800px()), (max-width: 800px)", "not all, (max-width: 800px )", true},
123 {"(max-width: 900px(()), (max-width: 900px)", "not all", true}, 127 {"(max-width: 900px(()), (max-width: 900px)", "not all", true},
124 {"(max-width: 600px(())))), (max-width: 600px)", "not all, (max-width: 6 00px)", true}, 128 {"(max-width: 600px(())))), (max-width: 600px)", "not all, (max-width: 6 00px)", true},
125 {"(max-width: 500px(((((((((())))), (max-width: 500px)", "not all", true }, 129 {"(max-width: 500px(((((((((())))), (max-width: 500px)", "not all", true },
126 {"(max-width: 800px[]), (max-width: 800px)", "not all, (max-width: 800px )", true}, 130 {"(max-width: 800px[]), (max-width: 800px)", "not all, (max-width: 800px )", true},
127 {"(max-width: 900px[[]), (max-width: 900px)", "not all", true}, 131 {"(max-width: 900px[[]), (max-width: 900px)", "not all", true},
128 {"(max-width: 600px[[]]]]), (max-width: 600px)", "not all, (max-width: 6 00px)", true}, 132 {"(max-width: 600px[[]]]]), (max-width: 600px)", "not all, (max-width: 6 00px)", true},
129 {"(max-width: 500px[[[[[[[[[[]]]]), (max-width: 500px)", "not all", true }, 133 {"(max-width: 500px[[[[[[[[[[]]]]), (max-width: 500px)", "not all", true },
130 {"(max-width: 800px{}), (max-width: 800px)", "not all, (max-width: 800px )", true}, 134 {"(max-width: 800px{}), (max-width: 800px)", "not all, (max-width: 800px )", true},
(...skipping 19 matching lines...) Expand all
150 154
151 for (unsigned i = 0; testCases[i].input; ++i) { 155 for (unsigned i = 0; testCases[i].input; ++i) {
152 RefPtrWillBeRawPtr<MediaQuerySet> oldParserQuerySet = MediaQuerySet::cre ate(testCases[i].input); 156 RefPtrWillBeRawPtr<MediaQuerySet> oldParserQuerySet = MediaQuerySet::cre ate(testCases[i].input);
153 RefPtrWillBeRawPtr<MediaQuerySet> threadSafeQuerySet = MediaQuerySet::cr eateOffMainThread(testCases[i].input); 157 RefPtrWillBeRawPtr<MediaQuerySet> threadSafeQuerySet = MediaQuerySet::cr eateOffMainThread(testCases[i].input);
154 testMediaQuery(testCases[i], *oldParserQuerySet, true); 158 testMediaQuery(testCases[i], *oldParserQuerySet, true);
155 testMediaQuery(testCases[i], *threadSafeQuerySet, false); 159 testMediaQuery(testCases[i], *threadSafeQuerySet, false);
156 } 160 }
157 } 161 }
158 162
159 } // namespace 163 } // namespace
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/parser/MediaQueryTokenizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698