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 "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 #include <limits.h> | 8 #include <limits.h> |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 for (unsigned i = 0; testCases[i].srcInput; ++i) { | 119 for (unsigned i = 0; testCases[i].srcInput; ++i) { |
120 TestCase test = testCases[i]; | 120 TestCase test = testCases[i]; |
121 ImageCandidate candidate = bestFitSourceForImageAttributes(test.deviceSc
aleFactor, test.effectiveSize, test.srcInput, test.srcsetInput); | 121 ImageCandidate candidate = bestFitSourceForImageAttributes(test.deviceSc
aleFactor, test.effectiveSize, test.srcInput, test.srcsetInput); |
122 ASSERT_EQ(test.outputDensity, candidate.density()); | 122 ASSERT_EQ(test.outputDensity, candidate.density()); |
123 ASSERT_EQ(test.outputResourceWidth, candidate.resourceWidth()); | 123 ASSERT_EQ(test.outputResourceWidth, candidate.resourceWidth()); |
124 ASSERT_STREQ(test.outputURL, candidate.toString().ascii().data()); | 124 ASSERT_STREQ(test.outputURL, candidate.toString().ascii().data()); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 } // namespace | 128 } // namespace blink |
OLD | NEW |