| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 {"speech and (min-device-width: 800px)", 0, true}, | 60 {"speech and (min-device-width: 800px)", 0, true}, |
| 61 {"example", 0, true}, | 61 {"example", 0, true}, |
| 62 {"screen and (max-weight: 3kg) and (color), (monochrome)", "not all, (mo
nochrome)", true}, | 62 {"screen and (max-weight: 3kg) and (color), (monochrome)", "not all, (mo
nochrome)", true}, |
| 63 {"(min-width: -100px)", "not all", true}, | 63 {"(min-width: -100px)", "not all", true}, |
| 64 {"(example, all,), speech", "not all, speech", true}, | 64 {"(example, all,), speech", "not all, speech", true}, |
| 65 {"&test, screen", "not all, screen", true}, | 65 {"&test, screen", "not all, screen", true}, |
| 66 {"print and (min-width: 25cm)", 0, true}, | 66 {"print and (min-width: 25cm)", 0, true}, |
| 67 {"screen and (min-width: 400px) and (max-width: 700px)", "screen and (ma
x-width: 700px) and (min-width: 400px)", true}, | 67 {"screen and (min-width: 400px) and (max-width: 700px)", "screen and (ma
x-width: 700px) and (min-width: 400px)", true}, |
| 68 {"screen and (device-width: 800px)", 0, true}, | 68 {"screen and (device-width: 800px)", 0, true}, |
| 69 {"screen and (device-height: 60em)", 0, true}, | 69 {"screen and (device-height: 60em)", 0, true}, |
| 70 {"screen and (device-height: 60rem)", 0, true}, |
| 71 {"screen and (device-height: 60ch)", 0, true}, |
| 70 {"screen and (device-aspect-ratio: 16/9)", 0, true}, | 72 {"screen and (device-aspect-ratio: 16/9)", 0, true}, |
| 71 {"(device-aspect-ratio: 16.0/9.0)", "not all", true}, | 73 {"(device-aspect-ratio: 16.0/9.0)", "not all", true}, |
| 72 {"(device-aspect-ratio: 16/ 9)", "(device-aspect-ratio: 16/9)", true}, | 74 {"(device-aspect-ratio: 16/ 9)", "(device-aspect-ratio: 16/9)", true}, |
| 73 {"(device-aspect-ratio: 16/\r9)", "(device-aspect-ratio: 16/9)", true}, | 75 {"(device-aspect-ratio: 16/\r9)", "(device-aspect-ratio: 16/9)", true}, |
| 74 {"all and (color)", "(color)", true}, | 76 {"all and (color)", "(color)", true}, |
| 75 {"all and (min-color: 1)", "(min-color: 1)", true}, | 77 {"all and (min-color: 1)", "(min-color: 1)", true}, |
| 76 {"all and (min-color: 1.0)", "not all", true}, | 78 {"all and (min-color: 1.0)", "not all", true}, |
| 77 {"all and (min-color: 2)", "(min-color: 2)", true}, | 79 {"all and (min-color: 2)", "(min-color: 2)", true}, |
| 78 {"all and (color-index)", "(color-index)", true}, | 80 {"all and (color-index)", "(color-index)", true}, |
| 79 {"all and (min-color-index: 1)", "(min-color-index: 1)", true}, | 81 {"all and (min-color-index: 1)", "(min-color-index: 1)", true}, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |