Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  test_conflict_profiles.js

  Sprache: JAVA
 

/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */


/*
 * Tests that the profile service refuses to flush when the profiles.ini file
 * has been modified.
 */


function check_unchanged(service) {
  Assert.ok(
    !service.isListOutdated,
    "Should not have detected a modification."
  );
  try {
    service.flush();
    Assert.ok(true"Should have flushed.");
  } catch (e) {
    Assert.ok(false"Should have succeeded flushing.");
  }
}

function check_outdated(service) {
  Assert.ok(service.isListOutdated, "Should have detected a modification.");
  try {
    service.flush();
    Assert.ok(false"Should have failed to flush.");
  } catch (e) {
    Assert.equal(
      e.result,
      Cr.NS_ERROR_DATABASE_CHANGED,
      "Should have refused to flush."
    );
  }
}

add_task(async () => {
  let service = getProfileService();

  Assert.ok(!service.isListOutdated, "Should not be modified yet.");

  let profilesini = gDataHome.clone();
  profilesini.append("profiles.ini");

  Assert.ok(!profilesini.exists(), "File should not exist yet.");
  profilesini.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o644);
  check_outdated(service);

  profilesini.remove(false);
  check_unchanged(service);

  let oldTime = profilesini.lastModifiedTime;
  profilesini.lastModifiedTime = oldTime - 10000;
  check_outdated(service);

  // We can't reset the modification time back to exactly what it was, so I
  // guess we can't do much more here :(
});

Messung V0.5 in Prozent
C=91 H=99 G=94

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-06-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik