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

  std::string unknown_field =
      "{"
      "  \"pinsets\": [],"
      "  \"entries\": ["
      "    {"
      "      \"name\": \"preloaded.test\","
      "      \"policy\": \"test\","
      "      \"unknown_key\": \"value\""
      "    }"
      "  ]"
      "}";

  EXPECT_FALSE(ParseJSON(unknown_field, &entries, &pinsets));
}
// Test that parsing valid JSON containing an entry with an unknown field fails.
Test that parsing valid JSON containing an entry with an unknown field fails.
Test that parsing valid JSON containing an entry with an unknown field fails .
TEST(InputFileParsersTest, ParseJSONUnkownField) {
  TransportSecurityStateEntries entries;
  Pinsets pinsets;
  std::string unknown_field =
      "{"
      "  \"pinsets\": [],"
      "  \"entries\": ["
      "    {"
      "      \"name\": \"preloaded.test\","
      "      \"policy\": \"test\","
      "      \"unknown_key\": \"value\""
      "    }"
      "  ]"
      "}";
  EXPECT_FALSE(ParseJSON(unknown_field, &entries, &pinsets));
}
TEST ( InputFileParsersTest , ParseJSONUnkownField ) { TransportSecurityStateEntries entries ; Pinsets pinsets ; std :: string unknown_field = " " " \" \" " " \" \" " " " " \" \" \" \" " " \" \" \" \" " " \" \" \" \" " " " " " " " ; EXPECT_FALSE ( ParseJSON ( unknown_field , & entries , & pinsets ) ) ; }
Test that parsing valid JSON containing an entry with an unknown field fails.
Test that parsing valid JSON containing an entry with an unknown field fails .