| 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/parser/SizesAttributeParser.h" | 5 #include "core/css/parser/SizesAttributeParser.h" |
| 6 | 6 |
| 7 #include "core/MediaTypeNames.h" | 7 #include "core/MediaTypeNames.h" |
| 8 #include "core/css/MediaValuesCached.h" | 8 #include "core/css/MediaValuesCached.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 data.deviceHeight = 500; | 81 data.deviceHeight = 500; |
| 82 data.devicePixelRatio = 2.0; | 82 data.devicePixelRatio = 2.0; |
| 83 data.colorBitsPerComponent = 24; | 83 data.colorBitsPerComponent = 24; |
| 84 data.monochromeBitsPerComponent = 0; | 84 data.monochromeBitsPerComponent = 0; |
| 85 data.primaryPointerType = PointerTypeFine; | 85 data.primaryPointerType = PointerTypeFine; |
| 86 data.defaultFontSize = 16; | 86 data.defaultFontSize = 16; |
| 87 data.threeDEnabled = true; | 87 data.threeDEnabled = true; |
| 88 data.mediaType = MediaTypeNames::screen; | 88 data.mediaType = MediaTypeNames::screen; |
| 89 data.strictMode = true; | 89 data.strictMode = true; |
| 90 data.displayMode = WebDisplayModeBrowser; | 90 data.displayMode = WebDisplayModeBrowser; |
| 91 RawPtr<MediaValues> mediaValues = MediaValuesCached::create(data); | 91 MediaValues* mediaValues = MediaValuesCached::create(data); |
| 92 | 92 |
| 93 for (unsigned i = 0; testCases[i].input; ++i) { | 93 for (unsigned i = 0; testCases[i].input; ++i) { |
| 94 SizesAttributeParser parser(mediaValues, testCases[i].input); | 94 SizesAttributeParser parser(mediaValues, testCases[i].input); |
| 95 ASSERT_EQ(testCases[i].effectiveSize, parser.length()); | 95 ASSERT_EQ(testCases[i].effectiveSize, parser.length()); |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace blink | 99 } // namespace blink |
| OLD | NEW |