| 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/MediaQueryEvaluator.h" | 6 #include "core/css/MediaQueryEvaluator.h" |
| 7 | 7 |
| 8 #include "core/MediaTypeNames.h" | 8 #include "core/MediaTypeNames.h" |
| 9 #include "core/css/MediaList.h" | 9 #include "core/css/MediaList.h" |
| 10 #include "core/css/MediaValuesCached.h" | 10 #include "core/css/MediaValuesCached.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 {"all and (min-color: 32)", 0}, | 34 {"all and (min-color: 32)", 0}, |
| 35 {"all and (min-color-index: 0)", 1}, | 35 {"all and (min-color-index: 0)", 1}, |
| 36 {"all and (min-color-index: 1)", 0}, | 36 {"all and (min-color-index: 1)", 0}, |
| 37 {"all and (monochrome)", 0}, | 37 {"all and (monochrome)", 0}, |
| 38 {"all and (min-monochrome: 0)", 1}, | 38 {"all and (min-monochrome: 0)", 1}, |
| 39 {"all and (grid: 0)", 1}, | 39 {"all and (grid: 0)", 1}, |
| 40 {"(resolution: 2dppx)", 1}, | 40 {"(resolution: 2dppx)", 1}, |
| 41 {"(resolution: 1dppx)", 0}, | 41 {"(resolution: 1dppx)", 0}, |
| 42 {"(orientation: portrait)", 1}, | 42 {"(orientation: portrait)", 1}, |
| 43 {"(orientation: landscape)", 0}, | 43 {"(orientation: landscape)", 0}, |
| 44 {"(orientation: url(portrait))", 0}, |
| 45 {"(orientation: #portrait)", 0}, |
| 46 {"(orientation: @portrait)", 0}, |
| 47 {"(orientation: 'portrait')", 0}, |
| 44 {"tv and (scan: progressive)", 0}, | 48 {"tv and (scan: progressive)", 0}, |
| 45 {"(pointer: coarse)", 0}, | 49 {"(pointer: coarse)", 0}, |
| 46 {"(pointer: fine)", 1}, | 50 {"(pointer: fine)", 1}, |
| 47 {"(hover: hover)", 1}, | 51 {"(hover: hover)", 1}, |
| 48 {"(hover: on-demand)", 0}, | 52 {"(hover: on-demand)", 0}, |
| 49 {"(hover: none)", 0}, | 53 {"(hover: none)", 0}, |
| 50 {0, 0} // Do not remove the terminator line. | 54 {0, 0} // Do not remove the terminator line. |
| 51 }; | 55 }; |
| 52 | 56 |
| 53 TestCase viewportTestCases[] = { | 57 TestCase viewportTestCases[] = { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 RefPtrWillBePersistent<FrameView> view = pageHolder->frame().view(); | 140 RefPtrWillBePersistent<FrameView> view = pageHolder->frame().view(); |
| 137 pageHolder->frame().setView(nullptr); | 141 pageHolder->frame().setView(nullptr); |
| 138 MediaQueryEvaluator mediaQueryEvaluator(&pageHolder->frame()); | 142 MediaQueryEvaluator mediaQueryEvaluator(&pageHolder->frame()); |
| 139 RefPtrWillBePersistent<MediaQuerySet> querySet = MediaQuerySet::create("foob
ar"); | 143 RefPtrWillBePersistent<MediaQuerySet> querySet = MediaQuerySet::create("foob
ar"); |
| 140 bool output = false; | 144 bool output = false; |
| 141 ASSERT_EQ(output, mediaQueryEvaluator.eval(querySet.get())); | 145 ASSERT_EQ(output, mediaQueryEvaluator.eval(querySet.get())); |
| 142 pageHolder->frame().setView(view); | 146 pageHolder->frame().setView(view); |
| 143 } | 147 } |
| 144 | 148 |
| 145 } // namespace | 149 } // namespace |
| OLD | NEW |