<commit_before><?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://mailboxalert/locale/mailboxalert.dtd">

<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="mailboxalert_alert_prefs_dialog"
        onload="MailboxAlertAlertSettings.init();"
        buttons="help, cancel, accept, extra1"
        buttonlabelextra1="&mailboxalert.prefs.test;"
        ondialogaccept="MailboxAlertAlertSettings.storePrefs(MailboxAlertAlertSettings.getAlertId());"
        ondialoghelp="alert('help');"
        ondialogextra1="MailboxAlertAlertSettings.testAlert();"
>

<keyset>
  <key id="cut_cmd" modifiers="accel" key="X"/>
  <key id="copy_cmd" modifiers="accel" key="C"/>
  <key id="paste_cmd" modifiers="accel" key="V"/>
  <key id="close_cmd" modifiers="control" key="W" oncommand="window.close();"/>
</keyset>

<script src="chrome://mailboxalert/content/mailboxalert_vars.js">
</script>

<script src="chrome://mailboxalert/content/mailboxalert_common.js">
</script>

<script src="chrome://mailboxalert/content/mailboxalert_funcs.js">
</script>

<script type="application/x-javascript">
<![CDATA[

if (typeof(MailboxAlertAlertSettings) == "undefined") {
    var MailboxAlertAlertSettings = {};
}

MailboxAlertAlertSettings.getAlertId = function() {
  if (!window.arguments) {
    alert("Error: caller did not specify alert id");
  }
  return window.arguments[0];
}

MailboxAlertAlertSettings.testAlert = function () {
  /* */
}
<commit_msg>[release-0.15-newprefs] debug alerts in test<commit_after><?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://mailboxalert/locale/mailboxalert.dtd">

<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="mailboxalert_alert_prefs_dialog"
        onload="MailboxAlertAlertSettings.init();"
        buttons="help, cancel, accept, extra1"
        buttonlabelextra1="&mailboxalert.prefs.test;"
        ondialogaccept="MailboxAlertAlertSettings.storePrefs(MailboxAlertAlertSettings.getAlertId());"
        ondialoghelp="alert('help');"
        ondialogextra1="MailboxAlertAlertSettings.testAlert();"
>

<keyset>
  <key id="cut_cmd" modifiers="accel" key="X"/>
  <key id="copy_cmd" modifiers="accel" key="C"/>
  <key id="paste_cmd" modifiers="accel" key="V"/>
  <key id="close_cmd" modifiers="control" key="W" oncommand="window.close();"/>
</keyset>

<script src="chrome://mailboxalert/content/mailboxalert_vars.js">
</script>

<script src="chrome://mailboxalert/content/mailboxalert_common.js">
</script>

<script src="chrome://mailboxalert/content/mailboxalert_funcs.js">
</script>

<script type="application/x-javascript">
<![CDATA[

if (typeof(MailboxAlertAlertSettings) == "undefined") {
    var MailboxAlertAlertSettings = {};
}

MailboxAlertAlertSettings.getAlertId = function() {
  if (!window.arguments) {
    alert("Error: caller did not specify alert id");
  }
  return window.arguments[0];
}

MailboxAlertAlertSettings.testAlert = function () {
  // store it temporarily under a different id.
  alert("[XX] test alert");
  var temp_index = MailboxAlert.max_alerts + 1;
  alert("[XX] test alert2");
  MailboxAlertSettings.storePrefs(temp_index);
  alert("[XX] test alert3");
  var alert_prefs = MailboxAlert.getAlertPrefs(temp_index);
  alert("[XX] test alert4");
  var fake_data = MailboxAlert.createAlertData();
  alert("[XX] about to test fake alert " + temp_index);
  alert_prefs.run(fake_data);
  alert("[XX] done. removing now");
  alert_prefs.remove();
}

{'fraction_non_alphanumeric': 0.1667131307499303, 'fraction_numerical': 0.005296905492054642, 'mean_word_length': 5.547445255474453, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 2, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, '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': '3129518', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1176, 'n_words': 191}