Bug 1484191 - Suppress warning C4819 in TestMimeType.cpp. r=froydnj
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Fri, 17 Aug 2018 03:18:15 +0900
changeset 487555 407f1b80fd8ad10a75e8444fd002fbdf17084c46
parent 487554 a6c928f38da70047596a5933427166932a3540a3
child 487556 c66cc808862f6c77361be44b38e78e86b4aa7c69
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1484191
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1484191 - Suppress warning C4819 in TestMimeType.cpp. r=froydnj
dom/base/test/gtest/TestMimeType.cpp
--- a/dom/base/test/gtest/TestMimeType.cpp
+++ b/dom/base/test/gtest/TestMimeType.cpp
@@ -207,26 +207,33 @@ TEST(MimeType, DuplicateParameter2)
   UniquePtr<MimeType> parsed = MimeType::Parse(in);
   ASSERT_TRUE(parsed) << "Parsing succeeded";
   nsString out;
   parsed->Serialize(out);
   ASSERT_TRUE(out.Equals(NS_LITERAL_STRING("text/html;charset=\"()\""))) <<
     "Duplicate parameter #2";
 }
 
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4819)
+#endif
 TEST(MimeType, NonAlphanumericParametersAreQuoted)
 {
   const auto in = NS_LITERAL_STRING("text/html;test=\x00FF\\;charset=gbk");
   UniquePtr<MimeType> parsed = MimeType::Parse(in);
   ASSERT_TRUE(parsed) << "Parsing succeeded";
   nsString out;
   parsed->Serialize(out);
   ASSERT_TRUE(out.Equals(NS_LITERAL_STRING("text/html;test=\"\x00FF\\\\\";charset=gbk"))) <<
     "Non-alphanumeric parameters are quoted";
 }
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
 
 TEST(MimeType, ParameterQuotedIfHasLeadingWhitespace1)
 {
   const auto in = NS_LITERAL_STRING("text/html;charset= g\\\"bk");
   UniquePtr<MimeType> parsed = MimeType::Parse(in);
   ASSERT_TRUE(parsed) << "Parsing succeeded";
   nsAutoString out;
   parsed->Serialize(out);