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

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

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