| 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 "core/css/MediaQuery.h" | 5 #include "core/css/MediaQuery.h" |
| 6 | 6 |
| 7 #include "core/css/MediaList.h" | 7 #include "core/css/MediaList.h" |
| 8 #include "platform/wtf/text/StringBuilder.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "wtf/text/StringBuilder.h" | |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 typedef struct { | 13 typedef struct { |
| 14 const char* input; | 14 const char* input; |
| 15 const char* output; | 15 const char* output; |
| 16 } TestCase; | 16 } TestCase; |
| 17 | 17 |
| 18 static void TestMediaQuery(TestCase test, MediaQuerySet& query_set) { | 18 static void TestMediaQuery(TestCase test, MediaQuerySet& query_set) { |
| 19 StringBuilder output; | 19 StringBuilder output; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 {nullptr, nullptr} // Do not remove the terminator line. | 181 {nullptr, nullptr} // Do not remove the terminator line. |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 for (unsigned i = 0; test_cases[i].input; ++i) { | 184 for (unsigned i = 0; test_cases[i].input; ++i) { |
| 185 MediaQuerySet* query_set = MediaQuerySet::Create(test_cases[i].input); | 185 MediaQuerySet* query_set = MediaQuerySet::Create(test_cases[i].input); |
| 186 TestMediaQuery(test_cases[i], *query_set); | 186 TestMediaQuery(test_cases[i], *query_set); |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace blink | 190 } // namespace blink |
| OLD | NEW |