Unverified Commit 00d0dced authored by boklm's avatar boklm
Browse files

Bug 27115: Fix http-everywhere tests

We remove the check for the old https everywhere pref.

In the https-everywhere-disabled test we disable the extension by
temporarily removing it.
parent cef32ed7
......@@ -285,21 +285,31 @@ our @tests = (
use_net => 1,
descr => 'Check that http://check.torproject.org/ think we are using tor',
},
{
name => 'https-everywhere',
type => 'marionette',
use_net => 1,
descr => 'Check that https everywhere is enabled and working',
},
{
name => 'https-everywhere-disabled',
marionette_test => 'https-everywhere',
type => 'marionette',
descr => 'Check that https everywhere is not doing anything when disabled',
use_net => 1,
prefs => {
'extensions.https_everywhere.globalEnabled' => 'false',
pre => sub {
my ($tbbinfos, $t) = @_;
my $hdir = "$tbbinfos->{tmpdir}/https-everywhere";
mkdir "$hdir";
move($tbbinfos->{ffprofiledir} . '/extensions/https-everywhere-eff@eff.org.xpi',
$hdir . '/https-everywhere-eff@eff.org.xpi');
},
post => sub {
my ($tbbinfos, $t) = @_;
my $hdir = "$tbbinfos->{tmpdir}/https-everywhere";
move($hdir . '/https-everywhere-eff@eff.org.xpi',
$tbbinfos->{ffprofiledir} . '/extensions/https-everywhere-eff@eff.org.xpi');
},
},
{
name => 'https-everywhere',
type => 'marionette',
use_net => 1,
descr => 'Check that https everywhere is working',
},
{
name => 'settings',
......
......@@ -14,15 +14,11 @@ class Test(MarionetteTestCase):
ts = testsuite.TestSuite()
self.ts = ts
self.PREF_ENABLE_HE = "extensions.https_everywhere.globalEnabled"
self.HTTP_URL = "http://httpbin.org/"
self.HTTPS_URL = "https://httpbin.org/"
def test_https_everywhere(self):
self.assertEqual(self.marionette.get_pref(self.PREF_ENABLE_HE), \
self.ts.t['test']['name'] == 'https-everywhere')
with self.marionette.using_context('content'):
self.marionette.navigate(self.HTTP_URL)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment