| 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/html/parser/HTMLSrcsetParser.h" | 5 #include "core/html/parser/HTMLSrcsetParser.h" |
| 6 | 6 |
| 7 #include <limits.h> |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include <limits.h> | |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 typedef struct { | 12 typedef struct { |
| 13 float deviceScaleFactor; | 13 float deviceScaleFactor; |
| 14 float effectiveSize; | 14 float effectiveSize; |
| 15 const char* srcInput; | 15 const char* srcInput; |
| 16 const char* srcsetInput; | 16 const char* srcsetInput; |
| 17 const char* outputURL; | 17 const char* outputURL; |
| 18 float outputDensity; | 18 float outputDensity; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 ImageCandidate candidate = bestFitSourceForImageAttributes( | 166 ImageCandidate candidate = bestFitSourceForImageAttributes( |
| 167 test.deviceScaleFactor, test.effectiveSize, test.srcInput, | 167 test.deviceScaleFactor, test.effectiveSize, test.srcInput, |
| 168 test.srcsetInput); | 168 test.srcsetInput); |
| 169 ASSERT_EQ(test.outputDensity, candidate.density()); | 169 ASSERT_EQ(test.outputDensity, candidate.density()); |
| 170 ASSERT_EQ(test.outputResourceWidth, candidate.getResourceWidth()); | 170 ASSERT_EQ(test.outputResourceWidth, candidate.getResourceWidth()); |
| 171 ASSERT_STREQ(test.outputURL, candidate.toString().ascii().data()); | 171 ASSERT_STREQ(test.outputURL, candidate.toString().ascii().data()); |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace blink | 175 } // namespace blink |
| OLD | NEW |