<commit_before>"use strict";

Cu.import("resource://gre/modules/Services.jsm");

var {expect} = require("../mozilla-mozmill-tests/lib/assertions");
var prefs = require("../mozilla-mozmill-tests/firefox/lib/prefs");
var testsuite = require("../lib/testsuite");


// The torbutton_sec_* variables have been copy pasted from
// torbutton/src/chrome/content/torbutton.js

var torbutton_sec_ml_bool_prefs = {
  "javascript.options.ion.content" : false,
  "javascript.options.typeinference" : false,
  "javascript.options.asmjs" : false,
  "noscript.forbidMedia" : true,
  "media.webaudio.enabled" : false,
  "network.jar.block-remote-files" : true,
  "mathml.disabled" : true
};

var torbutton_sec_mh_bool_prefs = {
  "javascript.options.baselinejit.content" : false,
  "gfx.font_rendering.graphite.enabled" : false,
  "gfx.font_rendering.opentype_svg.enabled" : false,
  "noscript.global" : false,
  "noscript.globalHttpsWhitelist" : true
};

var torbutton_sec_h_bool_prefs = {
  "noscript.forbidFonts" : true,
  "noscript.global" : false,
  "svg.in-content.enabled" : false
};

////////////////////////////////////

var setupModule = function(aModule) {
  aModule.controller = mozmill.getBrowserController();
}

var testTBBSettingsSlider = function() {
    var prefSrv = prefs.preferences;
    var slider_mode = prefSrv.getPref('extensions.torbutton.security_slider', 1);
    expect.equal(parseInt(testsuite.test.slider_mode), slider_mode, 'slider mode');<commit_msg>slider_settings: remove gfx.font_rendering.graphite.enabled<commit_after>"use strict";

Cu.import("resource://gre/modules/Services.jsm");

var {expect} = require("../mozilla-mozmill-tests/lib/assertions");
var prefs = require("../mozilla-mozmill-tests/firefox/lib/prefs");
var testsuite = require("../lib/testsuite");


// The torbutton_sec_* variables have been copy pasted from
// torbutton/src/chrome/content/torbutton.js

var torbutton_sec_ml_bool_prefs = {
  "javascript.options.ion.content" : false,
  "javascript.options.typeinference" : false,
  "javascript.options.asmjs" : false,
  "noscript.forbidMedia" : true,
  "media.webaudio.enabled" : false,
  "network.jar.block-remote-files" : true,
  "mathml.disabled" : true
};

var torbutton_sec_mh_bool_prefs = {
  "javascript.options.baselinejit.content" : false,
  "gfx.font_rendering.opentype_svg.enabled" : false,
  "noscript.global" : false,
  "noscript.globalHttpsWhitelist" : true
};

var torbutton_sec_h_bool_prefs = {
  "noscript.forbidFonts" : true,
  "noscript.global" : false,
  "svg.in-content.enabled" : false
};

////////////////////////////////////

var setupModule = function(aModule) {
  aModule.controller = mozmill.getBrowserController();
}

var testTBBSettingsSlider = function() {
    var prefSrv = prefs.preferences;
    var slider_mode = prefSrv.getPref('extensions.torbutton.security_slider', 1);
    expect.equal(parseInt(testsuite.test.slider_mode), slider_mode, 'slider mode');
{'fraction_non_alphanumeric': 0.16512820512820514, 'fraction_numerical': 0.0006837606837606838, 'mean_word_length': 4.300724637681159, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6070828', 'n_tokens_mistral': 1001, 'n_tokens_neox': 989, 'n_words': 151}