toolkit/mozapps/update/tests/marionette/update_test_status.py

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 from b2g_update_test import B2GUpdateTestCase, OTA, FOTA
     2 import os
     4 this_dir = os.path.abspath(os.path.dirname(__file__))
     5 update_test_dir = os.path.dirname(this_dir)
     7 class UpdateTestStatus(B2GUpdateTestCase):
     8     B2G_UPDATES = "/data/local/b2g-updates"
    10     def setUp(self):
    11         # Stage a phony update to get the http server up and running
    12         mar_path = os.path.join(update_test_dir, "unit", "data", "simple.mar")
    13         self.stage_update(complete_mar=mar_path)
    15         bad_xml = os.path.join(this_dir, "data", "bad.xml")
    16         err_cgi = os.path.join(this_dir, "data", "err.cgi")
    17         self.runner.adb.push(bad_xml, self.B2G_UPDATES + "/bad.xml")
    18         self.runner.adb.shell("mkdir " + self.B2G_UPDATES + "/cgi-bin")
    19         self.runner.adb.push(err_cgi, self.B2G_UPDATES + "/cgi-bin/err.cgi")
    20         self.runner.adb.shell("chmod 755 " + self.B2G_UPDATES + "/cgi-bin/err.cgi")
    22         B2GUpdateTestCase.setUp(self)
    24     def test_status(self):
    25         self.marionette.set_script_timeout(30 * 1000)
    26         status_js = os.path.join(os.path.dirname(__file__),
    27                                  "update_test_status.js")
    28         self.execute_update_test(status_js)

mercurial