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


Quelle  test_bug372770.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/layout/style/test/test_bug372770.html


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=372770
-->

<head>
  <title>Test for Bug 372770</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>        
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
  <style id="testStyle">
    #content {}
  </style>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=372770">Mozilla Bug 372770</a>
<p id="display"></p>
<div id="content" style="display: none">
  
</div>
<pre id="test">
<script class="testbody" type="text/javascript">

/** Test for Bug 372770 **/
var style1 = $("content").style;
var style2 = $("testStyle").sheet.cssRules[0].style;

var colors = [ "rgb(128, 128, 128)""transparent" ]
var i;

for (i = 0; i < colors.length; ++i) {
  var color = colors[i];
  style1.color = color;
  style2.color = color;
  is(style1.color, color, "Inline style color roundtripping failed at color " + i);
  is(style2.color, color, "Rule style color roundtripping failed at color " + i);
}

style1.color = "rgba(0, 0, 0, 0)";
style2.color = "rgba(0, 0, 0, 0)";
is(style1.color, "rgba(0, 0, 0, 0)",
   "Inline style should round-trip black transparent color correctly");
is(style2.color, "rgba(0, 0, 0, 0)",
   "Rule style should round-trip black transparent color correctly");

for (var i = 0; i <= 100; ++i) {
  if (i == 70 || i == 90) {
    // Tinderbox unhappy for some reason... just skip these for now?
    continue;
  }
  var color1 = "rgba(128, 128, 128, " + i/100 + ")";
  var color2 = "rgba(175, 63, 27, " + i/100 + ")";
  style1.color = color1;
  style1.backgroundColor = color2;
  style2.color = color2;
  style2.background = color1;

  if (i == 100) {
    // Bug 372783 means this doesn't round-trip quite right
    todo(style1.color == color1,
       "Inline style color roundtripping failed at opacity " + i);
    todo(style1.backgroundColor == color2,
       "Inline style background roundtripping failed at opacity " + i);
    todo(style2.color == color2,
       "Rule style color roundtripping failed at opacity " + i);
    todo(style2.backgroundColor == color1,
       "Rule style background roundtripping failed at opacity " + i);
    color1 = "rgb(128, 128, 128)";
    color2 = "rgb(175, 63, 27)";
  }

  is(style1.color, color1,
     "Inline style color roundtripping failed at opacity " + i);
  is(style1.backgroundColor, color2,
     "Inline style background roundtripping failed at opacity " + i);
  is(style2.color, color2,
     "Rule style color roundtripping failed at opacity " + i);
  is(style2.backgroundColor, color1,
     "Rule style background roundtripping failed at opacity " + i);

}
</script>
</pre>
</body>
</html>


Messung V0.5
C=99 H=100 G=99

¤ Dauer der Verarbeitung: 0.12 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