Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: third_party/WebKit/Source/core/fetch/ClientHintsPreferencesTest.cpp

Issue 2584423002: Loading: move core/fetch to platform/loader/fetch (Closed)
Patch Set: another try Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/fetch/ClientHintsPreferencesTest.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ClientHintsPreferencesTest.cpp b/third_party/WebKit/Source/core/fetch/ClientHintsPreferencesTest.cpp
deleted file mode 100644
index ac41843eecd2aa41a2fb9546ea409fed86880a67..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/fetch/ClientHintsPreferencesTest.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/fetch/ClientHintsPreferences.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace blink {
-
-class ClientHintsPreferencesTest : public ::testing::Test {};
-
-TEST_F(ClientHintsPreferencesTest, Basic) {
- struct TestCase {
- const char* headerValue;
- bool expectationResourceWidth;
- bool expectationDPR;
- bool expectationViewportWidth;
- } cases[] = {
- {"width, dpr, viewportWidth", true, true, false},
- {"WiDtH, dPr, viewport-width", true, true, true},
- {"WIDTH, DPR, VIWEPROT-Width", true, true, false},
- {"VIewporT-Width, wutwut, width", true, false, true},
- {"dprw", false, false, false},
- {"DPRW", false, false, false},
- };
-
- for (const auto& testCase : cases) {
- ClientHintsPreferences preferences;
- const char* value = testCase.headerValue;
-
- preferences.updateFromAcceptClientHintsHeader(value, nullptr);
- EXPECT_EQ(testCase.expectationResourceWidth,
- preferences.shouldSendResourceWidth());
- EXPECT_EQ(testCase.expectationDPR, preferences.shouldSendDPR());
- EXPECT_EQ(testCase.expectationViewportWidth,
- preferences.shouldSendViewportWidth());
- }
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698