Пример #1
0
  /** Tests that the HAR attributes from HarObject methods make it into the HAR. */
  @Test
  public void customAttributesFromMethods() throws Exception {
    HarObject har = new HarObject();
    har.setCreatorInfo("creatorName", "creatorVersion", "creatorComment");
    har.setBrowserInfo("browserName", "browserVersion", "browserComment");
    har.setPageId("pageId");
    TestUtils.populateTestHar(devtoolsMessageFactory, har, DEVTOOLS_MESSAGES_JSON);
    har.createHarFromMessages();

    validateHarAttributes(
        har,
        "creatorName",
        "creatorVersion",
        "creatorComment",
        "browserName",
        "browserVersion",
        "browserComment",
        "pageId");
  }