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

Unified Diff: third_party/WebKit/Source/core/html/LinkRelAttributeTest.cpp

Issue 1647813003: Remove support for <link rel=subresource> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed and deleted tests Created 4 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/html/LinkRelAttributeTest.cpp
diff --git a/third_party/WebKit/Source/core/html/LinkRelAttributeTest.cpp b/third_party/WebKit/Source/core/html/LinkRelAttributeTest.cpp
index a710de26fb098b7eddf46d050518b212a86384f2..7139d035490b53495636a8c30bad3965a766b562 100644
--- a/third_party/WebKit/Source/core/html/LinkRelAttributeTest.cpp
+++ b/third_party/WebKit/Source/core/html/LinkRelAttributeTest.cpp
@@ -36,14 +36,13 @@
namespace blink {
-static inline void testLinkRelAttribute(String value, bool isStyleSheet, IconType iconType, bool isAlternate, bool isDNSPrefetch, bool isLinkSubresource, bool isLinkPrerender, bool isImport = false, bool isPreconnect = false)
+static inline void testLinkRelAttribute(String value, bool isStyleSheet, IconType iconType, bool isAlternate, bool isDNSPrefetch, bool isLinkPrerender, bool isImport = false, bool isPreconnect = false)
{
LinkRelAttribute linkRelAttribute(value);
ASSERT_EQ(isStyleSheet, linkRelAttribute.isStyleSheet()) << value.utf8().data();
ASSERT_EQ(iconType, linkRelAttribute.iconType()) << value.utf8().data();
ASSERT_EQ(isAlternate, linkRelAttribute.isAlternate()) << value.utf8().data();
ASSERT_EQ(isDNSPrefetch, linkRelAttribute.isDNSPrefetch()) << value.utf8().data();
- ASSERT_EQ(isLinkSubresource, linkRelAttribute.isLinkSubresource()) << value.utf8().data();
ASSERT_EQ(isLinkPrerender, linkRelAttribute.isLinkPrerender()) << value.utf8().data();
ASSERT_EQ(isImport, linkRelAttribute.isImport()) << value.utf8().data();
ASSERT_EQ(isPreconnect, linkRelAttribute.isPreconnect()) << value.utf8().data();
@@ -51,38 +50,37 @@ static inline void testLinkRelAttribute(String value, bool isStyleSheet, IconTyp
TEST(LinkRelAttributeTest, Constructor)
{
- testLinkRelAttribute("stylesheet", true, InvalidIcon, false, false, false, false);
- testLinkRelAttribute("sTyLeShEeT", true, InvalidIcon, false, false, false, false);
+ testLinkRelAttribute("stylesheet", true, InvalidIcon, false, false, false);
+ testLinkRelAttribute("sTyLeShEeT", true, InvalidIcon, false, false, false);
- testLinkRelAttribute("icon", false, Favicon, false, false, false, false);
- testLinkRelAttribute("iCoN", false, Favicon, false, false, false, false);
- testLinkRelAttribute("shortcut icon", false, Favicon, false, false, false, false);
- testLinkRelAttribute("sHoRtCuT iCoN", false, Favicon, false, false, false, false);
+ testLinkRelAttribute("icon", false, Favicon, false, false, false);
+ testLinkRelAttribute("iCoN", false, Favicon, false, false, false);
+ testLinkRelAttribute("shortcut icon", false, Favicon, false, false, false);
+ testLinkRelAttribute("sHoRtCuT iCoN", false, Favicon, false, false, false);
- testLinkRelAttribute("dns-prefetch", false, InvalidIcon, false, true, false, false);
- testLinkRelAttribute("dNs-pReFeTcH", false, InvalidIcon, false, true, false, false);
- testLinkRelAttribute("alternate dNs-pReFeTcH", false, InvalidIcon, true, true, false, false);
+ testLinkRelAttribute("dns-prefetch", false, InvalidIcon, false, true, false);
+ testLinkRelAttribute("dNs-pReFeTcH", false, InvalidIcon, false, true, false);
+ testLinkRelAttribute("alternate dNs-pReFeTcH", false, InvalidIcon, true, true, false);
- testLinkRelAttribute("apple-touch-icon", false, TouchIcon, false, false, false, false);
- testLinkRelAttribute("aPpLe-tOuCh-IcOn", false, TouchIcon, false, false, false, false);
- testLinkRelAttribute("apple-touch-icon-precomposed", false, TouchPrecomposedIcon, false, false, false, false);
- testLinkRelAttribute("aPpLe-tOuCh-IcOn-pReCoMpOsEd", false, TouchPrecomposedIcon, false, false, false, false);
+ testLinkRelAttribute("apple-touch-icon", false, TouchIcon, false, false, false);
+ testLinkRelAttribute("aPpLe-tOuCh-IcOn", false, TouchIcon, false, false, false);
+ testLinkRelAttribute("apple-touch-icon-precomposed", false, TouchPrecomposedIcon, false, false, false);
+ testLinkRelAttribute("aPpLe-tOuCh-IcOn-pReCoMpOsEd", false, TouchPrecomposedIcon, false, false, false);
- testLinkRelAttribute("alternate stylesheet", true, InvalidIcon, true, false, false, false);
- testLinkRelAttribute("stylesheet alternate", true, InvalidIcon, true, false, false, false);
- testLinkRelAttribute("aLtErNaTe sTyLeShEeT", true, InvalidIcon, true, false, false, false);
- testLinkRelAttribute("sTyLeShEeT aLtErNaTe", true, InvalidIcon, true, false, false, false);
+ testLinkRelAttribute("alternate stylesheet", true, InvalidIcon, true, false, false);
+ testLinkRelAttribute("stylesheet alternate", true, InvalidIcon, true, false, false);
+ testLinkRelAttribute("aLtErNaTe sTyLeShEeT", true, InvalidIcon, true, false, false);
+ testLinkRelAttribute("sTyLeShEeT aLtErNaTe", true, InvalidIcon, true, false, false);
- testLinkRelAttribute("stylesheet icon prerender aLtErNaTe", true, Favicon, true, false, false, true);
- testLinkRelAttribute("alternate subresource", false, InvalidIcon, true, false, true, false);
- testLinkRelAttribute("alternate icon stylesheet", true, Favicon, true, false, false, false);
+ testLinkRelAttribute("stylesheet icon prerender aLtErNaTe", true, Favicon, true, false, true);
+ testLinkRelAttribute("alternate icon stylesheet", true, Favicon, true, false, false);
- testLinkRelAttribute("import", false, InvalidIcon, false, false, false, false, true);
- testLinkRelAttribute("alternate import", false, InvalidIcon, true, false, false, false, true);
- testLinkRelAttribute("stylesheet import", true, InvalidIcon, false, false, false, false, false);
+ testLinkRelAttribute("import", false, InvalidIcon, false, false, false, true);
+ testLinkRelAttribute("alternate import", false, InvalidIcon, true, false, false, true);
+ testLinkRelAttribute("stylesheet import", true, InvalidIcon, false, false, false, false);
- testLinkRelAttribute("preconnect", false, InvalidIcon, false, false, false, false, false, true);
- testLinkRelAttribute("pReCoNnEcT", false, InvalidIcon, false, false, false, false, false, true);
+ testLinkRelAttribute("preconnect", false, InvalidIcon, false, false, false, false, true);
+ testLinkRelAttribute("pReCoNnEcT", false, InvalidIcon, false, false, false, false, true);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698