src/net/tools/transport_security_state_generator/input_file_parsers_unittest.cc
TEST(InputFileParsersTest, ParseJSONInvalidMode) {
  TransportSecurityStateEntries entries;
  Pinsets pinsets;

  std::string invalid_mode =
      "{"
      "  \"pinsets\": [],"
      "  \"entries\": ["
      "    {"
      "      \"name\": \"preloaded.test\","
      "      \"policy\": \"test\","
      "      \"mode\": \"something-invalid\""
      "    }"
      "  ]"
      "}";

  EXPECT_FALSE(ParseJSON(invalid_mode, &entries, &pinsets));
}
// Test that parsing valid JSON containing an entry with an invalid mode fails.
Test that parsing valid JSON containing an entry with an invalid mode fails.
Test that parsing valid JSON containing an entry with an invalid mode fails .
TEST(InputFileParsersTest, ParseJSONInvalidMode) {
  TransportSecurityStateEntries entries;
  Pinsets pinsets;
  std::string invalid_mode =
      "{"
      "  \"pinsets\": [],"
      "  \"entries\": ["
      "    {"
      "      \"name\": \"preloaded.test\","
      "      \"policy\": \"test\","
      "      \"mode\": \"something-invalid\""
      "    }"
      "  ]"
      "}";
  EXPECT_FALSE(ParseJSON(invalid_mode, &entries, &pinsets));
}
TEST ( InputFileParsersTest , ParseJSONInvalidMode ) { TransportSecurityStateEntries entries ; Pinsets pinsets ; std :: string invalid_mode = " " " \" \" " " \" \" " " " " \" \" \" \" " " \" \" \" \" " " \" \" \" \" " " " " " " " ; EXPECT_FALSE ( ParseJSON ( invalid_mode , & entries , & pinsets ) ) ; }
Test that parsing valid JSON containing an entry with an invalid mode fails.
Test that parsing valid JSON containing an entry with an invalid mode fails .