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/fetch/ClientHintsPreferences.h" | 5 #include "platform/loader/fetch/ClientHintsPreferences.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
11 class ClientHintsPreferencesTest : public ::testing::Test {}; | 11 class ClientHintsPreferencesTest : public ::testing::Test {}; |
12 | 12 |
13 TEST_F(ClientHintsPreferencesTest, Basic) { | 13 TEST_F(ClientHintsPreferencesTest, Basic) { |
14 struct TestCase { | 14 struct TestCase { |
15 const char* headerValue; | 15 const char* headerValue; |
(...skipping 16 matching lines...) Expand all Loading... |
32 preferences.updateFromAcceptClientHintsHeader(value, nullptr); | 32 preferences.updateFromAcceptClientHintsHeader(value, nullptr); |
33 EXPECT_EQ(testCase.expectationResourceWidth, | 33 EXPECT_EQ(testCase.expectationResourceWidth, |
34 preferences.shouldSendResourceWidth()); | 34 preferences.shouldSendResourceWidth()); |
35 EXPECT_EQ(testCase.expectationDPR, preferences.shouldSendDPR()); | 35 EXPECT_EQ(testCase.expectationDPR, preferences.shouldSendDPR()); |
36 EXPECT_EQ(testCase.expectationViewportWidth, | 36 EXPECT_EQ(testCase.expectationViewportWidth, |
37 preferences.shouldSendViewportWidth()); | 37 preferences.shouldSendViewportWidth()); |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 } // namespace blink | 41 } // namespace blink |
OLD | NEW |