summaryrefslogtreecommitdiffstats
path: root/net/http/http_content_disposition_unittest.cc
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-28 08:38:01 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-28 08:38:01 +0000
commitca8b9085f85a64aee83af8e0ceffa5211e1b2cef (patch)
treefb0d4c3ba93a7b59a566d14d3ad259f083aad900 /net/http/http_content_disposition_unittest.cc
parente4975d6ac3bd3c5ab47e8ffc961852a4407656d7 (diff)
downloadchromium_src-ca8b9085f85a64aee83af8e0ceffa5211e1b2cef.zip
chromium_src-ca8b9085f85a64aee83af8e0ceffa5211e1b2cef.tar.gz
chromium_src-ca8b9085f85a64aee83af8e0ceffa5211e1b2cef.tar.bz2
Re-enable HttpContentDispositionTest.tc2231
TBR=asanka Review URL: http://codereview.chromium.org/9225035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_content_disposition_unittest.cc')
-rw-r--r--net/http/http_content_disposition_unittest.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/http/http_content_disposition_unittest.cc b/net/http/http_content_disposition_unittest.cc
index ccb5fa5..6bcbd9f 100644
--- a/net/http/http_content_disposition_unittest.cc
+++ b/net/http/http_content_disposition_unittest.cc
@@ -199,7 +199,7 @@ TEST(HttpContentDispositionTest, Filename) {
}
// Test cases from http://greenbytes.de/tech/tc2231/
-TEST(HttpContentDispositionTest, FAILS_tc2231) {
+TEST(HttpContentDispositionTest, tc2231) {
const struct FileNameCDCase {
const char* header;
net::HttpContentDisposition::Type expected_type;
@@ -310,11 +310,13 @@ TEST(HttpContentDispositionTest, FAILS_tc2231) {
net::HttpContentDisposition::ATTACHMENT,
L"foo.bar" // Should be L"'foo.bar'"
},
+#ifdef ICU_SHOULD_FAIL_CONVERSION_ON_INVALID_CHARACTER
// http://greenbytes.de/tech/tc2231/#attwithisofnplain
{ "attachment; filename=\"foo-\xE4html\"",
net::HttpContentDisposition::ATTACHMENT,
L"" // Should be L"foo-\xE4.html"
},
+#endif
// http://greenbytes.de/tech/tc2231/#attwithutf8fnplain
// Note: We'll UTF-8 decode the file name, even though tc2231 says not to.
{ "attachment; filename=\"foo-\xC3\xA4.html\"",
@@ -341,11 +343,13 @@ TEST(HttpContentDispositionTest, FAILS_tc2231) {
net::HttpContentDisposition::ATTACHMENT,
L"foo-A.html" // Should be L"foo-%41.html"
},
+#ifdef ICU_SHOULD_FAIL_CONVERSION_ON_INVALID_CHARACTER
// http://greenbytes.de/tech/tc2231/#attwithfilenamepctandiso
{ "attachment; filename=\"\xE4-%41.html\"",
net::HttpContentDisposition::ATTACHMENT,
L"" // Should be L"\xE4-%41.htm"
},
+#endif
// http://greenbytes.de/tech/tc2231/#attwithfnrawpctenclong
{ "attachment; filename=\"foo-%c3%a4-%e2%82%ac.html\"",
net::HttpContentDisposition::ATTACHMENT,
@@ -368,12 +372,14 @@ TEST(HttpContentDispositionTest, FAILS_tc2231) {
net::HttpContentDisposition::ATTACHMENT,
L"foo[1](2).html"
},
+#ifdef ICU_SHOULD_FAIL_CONVERSION_ON_INVALID_CHARACTER
// http://greenbytes.de/tech/tc2231/#attfnbrokentokeniso
// Note: tc2231 says we should fail to parse this header.
{ "attachment; filename=foo-\xE4.html",
net::HttpContentDisposition::ATTACHMENT,
L""
},
+#endif
// http://greenbytes.de/tech/tc2231/#attfnbrokentokenutf
// Note: tc2231 says we should fail to parse this header.
{ "attachment; filename=foo-\xC3\xA4.html",