<commit_before>const {Builder, By, until} = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const firefox = require('selenium-webdriver/firefox');
const fs = require('fs')
require('chromedriver');
require('geckodriver');

function encode(file) {
  var stream = fs.readFileSync(file);
  return new Buffer(stream).toString('base64');
}

(async function chromeExample() {
  const options = new chrome.Options()
      .addExtensions(encode('extension.crx'));
  let driver = await new Builder()
      .forBrowser('chrome')
      .setChromeOptions(options)
      .build();
  try {
    // Modify the header and make sure it is done before proceeding.
    await driver.get("http://mod-header.appspot.com/add?Test=1");
    await driver.wait(until.titleIs('Done'), 1000);

    await driver.get('http://www.xhaus.com/headers');
    await driver.wait(until.elementTextContains(driver.findElement(By.tagName('body')), 'Test'), 1000);
  } finally {
    await driver.quit();
  }
})();

(async function firefoxExample() {
  const options = new firefox.Options();
  options.setPreference('xpinstall.signatures.required', false);
  options.addExtensions('extension.xpi');
  let driver = await new Builder()
      .forBrowser('firefox')
      .setFirefoxOptions(options)
      .build();
  try {
    // Modify the header and make sure it is done before proceeding.
    await driver.get("http://mod-header.appspot.com/add?Test=1");
    await driver.wait(until.titleIs('Done'), 1000);

    await driver.get('http://www.xhaus.com/headers');
    await driver.wait(until.elementTextContains(driver.findElement(By.tagName('body')), 'Test'), 1000);
  } finally {
    await driver.quit();
  }
})();
<commit_msg>Fix the extension rename.<commit_after>const {Builder, By, until} = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const firefox = require('selenium-webdriver/firefox');
const fs = require('fs')
require('chromedriver');
require('geckodriver');

function encode(file) {
  var stream = fs.readFileSync(file);
  return new Buffer(stream).toString('base64');
}

(async function chromeExample() {
  const options = new chrome.Options()
      .addExtensions(encode('modheader.crx'));
  let driver = await new Builder()
      .forBrowser('chrome')
      .setChromeOptions(options)
      .build();
  try {
    // Modify the header and make sure it is done before proceeding.
    await driver.get("http://mod-header.appspot.com/add?Test=1");
    await driver.wait(until.titleIs('Done'), 1000);

    await driver.get('http://www.xhaus.com/headers');
    await driver.wait(until.elementTextContains(driver.findElement(By.tagName('body')), 'Test'), 1000);
  } finally {
    await driver.quit();
  }
})();

(async function firefoxExample() {
  const options = new firefox.Options();
  options.setPreference('xpinstall.signatures.required', false);
  options.addExtensions('modheader.xpi');
  let driver = await new Builder()
      .forBrowser('firefox')
      .setFirefoxOptions(options)
      .build();
  try {
    // Modify the header and make sure it is done before proceeding.
    await driver.get("http://mod-header.appspot.com/add?Test=1");
    await driver.wait(until.titleIs('Done'), 1000);

    await driver.get('http://www.xhaus.com/headers');
    await driver.wait(until.elementTextContains(driver.findElement(By.tagName('body')), 'Test'), 1000);
  } finally {
    await driver.quit();
  }
})();

{'fraction_non_alphanumeric': 0.15690140845070422, 'fraction_numerical': 0.011267605633802818, 'mean_word_length': 3.690885072655218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, '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': '6897047', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1070, 'n_words': 223}