<commit_before>var UserAgentTest = TestCase('UserAgentTest');
UserAgentTest.prototype.setUp = function() {
  this.defaultDocument_ = { };
  this.ie8Document_ = { documentMode: 8 };
};

UserAgentTest.prototype.testBrowserIsFirefox = function() {
  var userAgentParser = new webfont.UserAgentParser(
      "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.1",
      this.defaultDocument_);
  var userAgent = userAgentParser.parse();

  assertEquals("Firefox", userAgent.getName());
  assertEquals("3.6.3", userAgent.getVersion());
  assertEquals("Macintosh", userAgent.getPlatform());
  assertEquals("10.5", userAgent.getPlatformVersion());
  assertEquals("Gecko", userAgent.getEngine());
  assertEquals("1.9.2.3", userAgent.getEngineVersion());
  assertEquals(undefined, userAgent.getDocumentMode());
  assertTrue(userAgent.isSupportingWebFont());
};

UserAgentTest.prototype.testBrowserIsFirefox4beta = function() {
  var userAgentParser = new webfont.UserAgentParser(
      "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:2.0b1) Gecko/20100630 Firefox/4.0b1",
      this.defaultDocument_);
  var userAgent = userAgentParser.parse();

  assertEquals("Firefox", userAgent.getName());
  assertEquals("4.0b1", userAgent.getVersion());
  assertEquals("Macintosh", userAgent.getPlatform());
  assertEquals("10.6", userAgent.getPlatformVersion());
  assertEquals("Gecko", userAgent.getEngine());
  assertEquals("2.0b1", userAgent.getEngineVersion
  assertEquals(undefined, userAgent.getDocumentMode());
  assertTrue(userAgent.isSupportingWebFont());
};

UserAgentTest.prototype.testBrowserIsChrome = function() {
  var userAgentParser = new webfont.UserAgentParser(
      "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2",
      this.defaultDocument_);
  var userAgent = userAgentParser.parse();

  assertEquals("Chrome", userAgent.getName());
  assertEquals("5.0.342.9", userAgent.getVersion());
  assertEquals("Macintosh", userAgent.getPlatform());
  assertEquals("10_5_8", userAgent.getPlatformVersion());
  assertEquals("AppleWebKit", userAgent.getEngine());
  assertEquals("533.2", userAgent.getEngineVersion());
  assertEquals(undefined, userAgent.getDocumentMode());
  assertTrue(userAgent.isSupportingWebFont());
};

UserAgentTest.prototype.testBrowserIsSafari = function() {<commit_msg>Missing parens, caused useragent tests not to run previously.<commit_after>var UserAgentTest = TestCase('UserAgentTest');
UserAgentTest.prototype.setUp = function() {
  this.defaultDocument_ = { };
  this.ie8Document_ = { documentMode: 8 };
};

UserAgentTest.prototype.testBrowserIsFirefox = function() {
  var userAgentParser = new webfont.UserAgentParser(
      "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.1",
      this.defaultDocument_);
  var userAgent = userAgentParser.parse();

  assertEquals("Firefox", userAgent.getName());
  assertEquals("3.6.3", userAgent.getVersion());
  assertEquals("Macintosh", userAgent.getPlatform());
  assertEquals("10.5", userAgent.getPlatformVersion());
  assertEquals("Gecko", userAgent.getEngine());
  assertEquals("1.9.2.3", userAgent.getEngineVersion());
  assertEquals(undefined, userAgent.getDocumentMode());
  assertTrue(userAgent.isSupportingWebFont());
};

UserAgentTest.prototype.testBrowserIsFirefox4beta = function() {
  var userAgentParser = new webfont.UserAgentParser(
      "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:2.0b1) Gecko/20100630 Firefox/4.0b1",
      this.defaultDocument_);
  var userAgent = userAgentParser.parse();

  assertEquals("Firefox", userAgent.getName());
  assertEquals("4.0b1", userAgent.getVersion());
  assertEquals("Macintosh", userAgent.getPlatform());
  assertEquals("10.6", userAgent.getPlatformVersion());
  assertEquals("Gecko", userAgent.getEngine());
  assertEquals("2.0b1", userAgent.getEngineVersion());
  assertEquals(undefined, userAgent.getDocumentMode());
  assertTrue(userAgent.isSupportingWebFont());
};

UserAgentTest.prototype.testBrowserIsChrome = function() {
  var userAgentParser = new webfont.UserAgentParser(
      "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2",
      this.defaultDocument_);
  var userAgent = userAgentParser.parse();

  assertEquals("Chrome", userAgent.getName());
  assertEquals("5.0.342.9", userAgent.getVersion());
  assertEquals("Macintosh", userAgent.getPlatform());
  assertEquals("10_5_8", userAgent.getPlatformVersion());
  assertEquals("AppleWebKit", userAgent.getEngine());
  assertEquals("533.2", userAgent.getEngineVersion());
  assertEquals(undefined, userAgent.getDocumentMode());
  assertTrue(userAgent.isSupportingWebFont());
};

UserAgentTest.prototype.testBrowserIsSafari = function() {
{'fraction_non_alphanumeric': 0.14908350305498982, 'fraction_numerical': 0.039511201629327905, 'mean_word_length': 5.956090651558074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4097962', 'n_tokens_mistral': 1607, 'n_tokens_neox': 1522, 'n_words': 260}