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

Unified Diff: net/base/mime_sniffer_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 | « net/base/host_mapping_rules_unittest.cc ('k') | net/base/mime_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_sniffer_unittest.cc
diff --git a/net/base/mime_sniffer_unittest.cc b/net/base/mime_sniffer_unittest.cc
index a4bde0faf636fd494b4c6b069eaafc4dd66037be..7865350d3ce164ce86578c3eb336e171c00cd84a 100644
--- a/net/base/mime_sniffer_unittest.cc
+++ b/net/base/mime_sniffer_unittest.cc
@@ -304,13 +304,14 @@ TEST(MimeSnifferTest, FlashTest) {
TEST(MimeSnifferTest, XMLTest) {
// An easy feed to identify.
EXPECT_EQ("application/atom+xml",
- SniffMimeType("<?xml?><feed", "", "text/xml"));
+ SniffMimeType("<?xml?><feed", std::string(), "text/xml"));
// Don't sniff out of plain text.
EXPECT_EQ("text/plain",
- SniffMimeType("<?xml?><feed", "", "text/plain"));
+ SniffMimeType("<?xml?><feed", std::string(), "text/plain"));
// Simple RSS.
EXPECT_EQ("application/rss+xml",
- SniffMimeType("<?xml version='1.0'?>\r\n<rss", "", "text/xml"));
+ SniffMimeType(
+ "<?xml version='1.0'?>\r\n<rss", std::string(), "text/xml"));
// The top of CNN's RSS feed, which we'd like to recognize as RSS.
static const char kCNNRSS[] =
@@ -323,39 +324,43 @@ TEST(MimeSnifferTest, XMLTest) {
"version=\"2.0\">";
// CNN's RSS
EXPECT_EQ("application/rss+xml",
- SniffMimeType(kCNNRSS, "", "text/xml"));
- EXPECT_EQ("text/plain",
- SniffMimeType(kCNNRSS, "", "text/plain"));
+ SniffMimeType(kCNNRSS, std::string(), "text/xml"));
+ EXPECT_EQ("text/plain", SniffMimeType(kCNNRSS, std::string(), "text/plain"));
// Don't sniff random XML as something different.
EXPECT_EQ("text/xml",
- SniffMimeType("<?xml?><notafeed", "", "text/xml"));
+ SniffMimeType("<?xml?><notafeed", std::string(), "text/xml"));
// Don't sniff random plain-text as something different.
EXPECT_EQ("text/plain",
- SniffMimeType("<?xml?><notafeed", "", "text/plain"));
+ SniffMimeType("<?xml?><notafeed", std::string(), "text/plain"));
// Positive test for the two instances we upgrade to XHTML.
EXPECT_EQ("application/xhtml+xml",
SniffMimeType("<html xmlns=\"http://www.w3.org/1999/xhtml\">",
- "", "text/xml"));
+ std::string(),
+ "text/xml"));
EXPECT_EQ("application/xhtml+xml",
SniffMimeType("<html xmlns=\"http://www.w3.org/1999/xhtml\">",
- "", "application/xml"));
+ std::string(),
+ "application/xml"));
// Following our behavior with HTML, don't call other mime types XHTML.
EXPECT_EQ("text/plain",
SniffMimeType("<html xmlns=\"http://www.w3.org/1999/xhtml\">",
- "", "text/plain"));
+ std::string(),
+ "text/plain"));
EXPECT_EQ("application/rss+xml",
SniffMimeType("<html xmlns=\"http://www.w3.org/1999/xhtml\">",
- "", "application/rss+xml"));
+ std::string(),
+ "application/rss+xml"));
// Don't sniff other HTML-looking bits as HTML.
EXPECT_EQ("text/xml",
- SniffMimeType("<html><head>", "", "text/xml"));
+ SniffMimeType("<html><head>", std::string(), "text/xml"));
EXPECT_EQ("text/xml",
SniffMimeType("<foo><html xmlns=\"http://www.w3.org/1999/xhtml\">",
- "", "text/xml"));
+ std::string(),
+ "text/xml"));
}
« no previous file with comments | « net/base/host_mapping_rules_unittest.cc ('k') | net/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698