Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  test_first_startup.py   Sprache: Python

 
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from marionette_harness import MarionetteTestCase


class TestFirstStartup(MarionetteTestCase):
    def setUp(self):
        MarionetteTestCase.setUp(self)
        self.marionette.quit()
        self.marionette.instance.prefs = {
            "browser.startup.homepage_override.mstone"""
        }
        self.marionette.instance.app_args = ["-first-startup"]

    def test_new_profile(self):
        """Test launching with --first-startup when a new profile was created.

        Launches the browser with --first-startup on a freshly created profile
        and then ensures that FirstStartup.init ran successfully.
        """

        self.marionette.instance.switch_profile()
        self.marionette.start_session()
        self.marionette.set_context("chrome")
        firstStartupInittedSuccessfully = self.marionette.execute_script(
            """
          const { FirstStartup } = ChromeUtils.importESModule("resource://gre/modules/FirstStartup.sys.mjs");
          return FirstStartup.state == FirstStartup.SUCCESS
        """
        )

        self.assertTrue(
            firstStartupInittedSuccessfully, "FirstStartup initted successfully"
        )

    def test_existing_profile(self):
        """Test launching with --first-startup with a pre-existing profile.

        Launches the browser with --first-startup on a profile that has been
        run before. Ensures that FirstStartup.init was never run.
        """

        self.marionette.start_session()
        self.marionette.set_context("chrome")
        firstStartupSkipped = self.marionette.execute_script(
            """
          const { FirstStartup } = ChromeUtils.importESModule("resource://gre/modules/FirstStartup.sys.mjs");
          return FirstStartup.state == FirstStartup.NOT_STARTED
        """
        )

        self.assertTrue(firstStartupSkipped, "FirstStartup init skipped")

Messung V0.5
C=86 H=100 G=93

¤ Dauer der Verarbeitung: 0.22 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge