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

  std::string missing_pinset_name =
      "{"
      "  \"pinsets\": [{"
      "      \"static_spki_hashes\": [\"TestSPKI\"],"
      "      \"bad_static_spki_hashes\": [\"BadTestSPKI\"],"
      "      \"report_uri\": \"https://hpkp-log.example.com\""
      "  }],"
      "  \"entries\": []"
      "}";

  EXPECT_FALSE(ParseJSON(missing_pinset_name, &entries, &pinsets));
}
// Test that parsing valid JSON with an invalid (HPKP) pinset fails.
Test that parsing valid JSON with an invalid (HPKP) pinset fails.
Test that parsing valid JSON with an invalid ( HPKP ) pinset fails .
TEST(InputFileParsersTest, ParseJSONInvalidPinset) {
  TransportSecurityStateEntries entries;
  Pinsets pinsets;
  std::string missing_pinset_name =
      "{"
      "  \"pinsets\": [{"
      "      \"static_spki_hashes\": [\"TestSPKI\"],"
      "      \"bad_static_spki_hashes\": [\"BadTestSPKI\"],"
      "      \"report_uri\": \"https://hpkp-log.example.com\""
      "  }],"
      "  \"entries\": []"
      "}";
  EXPECT_FALSE(ParseJSON(missing_pinset_name, &entries, &pinsets));
}
TEST ( InputFileParsersTest , ParseJSONInvalidPinset ) { TransportSecurityStateEntries entries ; Pinsets pinsets ; std :: string missing_pinset_name = " " " \" \" " " \" \" \" \" " " \" \" \" \" " " \" \" \" \" " " " " \" \" " " " ; EXPECT_FALSE ( ParseJSON ( missing_pinset_name , & entries , & pinsets ) ) ; }
Test that parsing valid JSON with an invalid (HPKP) pinset fails.
Test that parsing valid JSON with an invalid ( HPKP ) pinset fails .