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

Unified Diff: Source/core/tests/LinkRelAttribute.cpp

Issue 15856002: First step of HTMLImports (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Mac build Created 7 years, 7 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
« no previous file with comments | « Source/core/html/parser/HTMLScriptRunner.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/tests/LinkRelAttribute.cpp
diff --git a/Source/core/tests/LinkRelAttribute.cpp b/Source/core/tests/LinkRelAttribute.cpp
index aabde02530363c1eda4756f541c4a6e3c17f6d4c..f404e5372ee66bac3c1b46c5a3f08d1e12fb556c 100644
--- a/Source/core/tests/LinkRelAttribute.cpp
+++ b/Source/core/tests/LinkRelAttribute.cpp
@@ -37,7 +37,7 @@ using namespace WebCore;
namespace {
-static inline void testLinkRelAttribute(String value, bool isStyleSheet, IconType iconType, bool isAlternate, bool isDNSPrefetch, bool isLinkSubresource, bool isLinkPrerender)
+static inline void testLinkRelAttribute(String value, bool isStyleSheet, IconType iconType, bool isAlternate, bool isDNSPrefetch, bool isLinkSubresource, bool isLinkPrerender, bool isImport = false)
{
LinkRelAttribute linkRelAttribute(value);
ASSERT_EQ(isStyleSheet, linkRelAttribute.isStyleSheet()) << value.utf8().data();
@@ -46,6 +46,7 @@ static inline void testLinkRelAttribute(String value, bool isStyleSheet, IconTyp
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();
}
TEST(CoreLinkRelAttribute, Constructor)
@@ -77,6 +78,10 @@ TEST(CoreLinkRelAttribute, Constructor)
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("import", false, InvalidIcon, false, false, false, false, true);
+ // "import" is mutually exclusive and "stylesheet" wins when they conflict.
+ testLinkRelAttribute("stylesheet import", true, InvalidIcon, false, false, false, false, false);
}
} // namespace
« no previous file with comments | « Source/core/html/parser/HTMLScriptRunner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698