| Index: util/net/http_multipart_builder_test.cc
|
| diff --git a/util/net/http_multipart_builder_test.cc b/util/net/http_multipart_builder_test.cc
|
| index e185e4ac36d2c066a3fdefd4559d547e416974ea..5517f67baaa5ea0a1b7f6ae7ec01c91f42a2a4cf 100644
|
| --- a/util/net/http_multipart_builder_test.cc
|
| +++ b/util/net/http_multipart_builder_test.cc
|
| @@ -19,6 +19,7 @@
|
| #include "gtest/gtest.h"
|
| #include "util/net/http_body.h"
|
| #include "util/net/http_body_test_util.h"
|
| +#include "util/test/gtest_death_check.h"
|
| #include "util/test/paths.h"
|
|
|
| namespace crashpad {
|
| @@ -273,10 +274,14 @@ TEST(HTTPMultipartBuilder, SharedFormDataAndAttachmentKeyNamespace) {
|
| TEST(HTTPMultipartBuilderDeathTest, AssertUnsafeMIMEType) {
|
| HTTPMultipartBuilder builder;
|
| // Invalid and potentially dangerous:
|
| - ASSERT_DEATH(builder.SetFileAttachment("", "", base::FilePath(), "\r\n"), "");
|
| - ASSERT_DEATH(builder.SetFileAttachment("", "", base::FilePath(), "\""), "");
|
| - ASSERT_DEATH(builder.SetFileAttachment("", "", base::FilePath(), "\x12"), "");
|
| - ASSERT_DEATH(builder.SetFileAttachment("", "", base::FilePath(), "<>"), "");
|
| + ASSERT_DEATH_CHECK(
|
| + builder.SetFileAttachment("", "", base::FilePath(), "\r\n"), "");
|
| + ASSERT_DEATH_CHECK(
|
| + builder.SetFileAttachment("", "", base::FilePath(), "\""), "");
|
| + ASSERT_DEATH_CHECK(
|
| + builder.SetFileAttachment("", "", base::FilePath(), "\x12"), "");
|
| + ASSERT_DEATH_CHECK(
|
| + builder.SetFileAttachment("", "", base::FilePath(), "<>"), "");
|
| // Invalid but safe:
|
| builder.SetFileAttachment("", "", base::FilePath(), "0/totally/-invalid.pdf");
|
| // Valid and safe:
|
|
|