/* ************************************************************************

   qooxdoo - the new era of web development

   http://qooxdoo.org

   Copyright:
     2007-2010 1&1 Internet AG, Germany, http://www.1und1.de

   License:
     LGPL: http://www.gnu.org/licenses/lgpl.html
     EPL: http://www.eclipse.org/org/documents/epl-v10.php
     See the LICENSE file in the project's top-level directory for details.

   Authors:
     * Alexander Steitz (aback)

************************************************************************ */

/* ************************************************************************
#asset(qx/static/blank.gif)
************************************************************************ */

qx.Class.define("qx.test.bom.element.Background",
{
  extend : qx.dev.unit.TestCase,

  members :
  {
    setUp : function()
    {
      this.__divElement = document.createElement("div");
      document.body.appendChild(this.__divElement);

      this.__backgroundUrlBase64 = "data:image/gif;base64,R0lGODlhEAFRAPcAAGGCnMDihW+PnomrjFR4lKbFkr3eioeqi2+SkH2hi1F4hmmOjaLFh42xiLjah1B1klBzmNX2hF2Bk5S1k05xmHKUkr7hhHudkWyOlZ2+kXmeiZG0imWKil19oNP0g53BhMzthVJ0mpi8iGaKklZ4nanNhXOZhoqvhll+kXCSmKnKi6bJipW4jVV2m2GHibTXhGuRhmqLm67RiLfZhrvciUBoiV6Fhk1ykFl6nl5+oaTHiHWZjjtkhZS3jHGWi5W5hlJ4jU92hMnrhEVuhZ7Ai7DRi8Lkhm6TiWKElmGAolp7n7nbiFyCjHucmIurmqzOhmaMjJy/ipe5jcjqg0hvjlB2i4WmlqDCjJK3hIKmiFV8h4mqkqTFj4KljkZsjEtyiHCTkoGjlUpwj2yQj2GFj0xziVZ6j5u8kIClhneYl2OJibXWi1h7ll1/mkNqinWXlLLTimaFomeNhWKGkFt9mFiAg4+ziY2vjoeokX6jhmOCpGCClBZEdxhGeBpIeRlHeRZFdzxjjR5LezRdiDJahzBZhhxJeh1Key9YhTNciDJbhytVgy5XhR9MfDlgiyJOfidSgRdFdyFNfSxWhCZRgBdGeCNPfiVRgClUgjdfihtJej5ljj9mjzhgijZeijhfizFahipVgyRPfyhTgS1XhEFnkDphjCVQfzZeiUdrkyBMfTVdiTpijCRQfz5kjjtijD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Hk1SJVXR0vxGxxRN Iq3PE6XQ6FxSK71SFI1L08RRLO1SL/1SHq1RmwRTMi1TM61OtjxTNV1TIDZtUzd9UziNUzmdUzqtUzu9UzzNUz3dUz7tUz9N0oAAADs=";
    },


    tearDown : function()
    {
      document.body.removeChild(this.__divElement);
      this.__divElement = null;
    },


    testGetStyles : function()
    {
      var styles = qx.bom.element.Background.getStyles("foo/bar/baz.gif", "no-repeat", null, null);

      this.assertKeyInMap("backgroundImage", styles, "Key 'backgroundImage' is not present!");
      this.assertKeyInMap("backgroundPosition", styles, "Key 'backgroundPosition' is not present!");

      // only check for "url(IMAGE-URL)" to be sure that no "'" chars are used
      // for normal images. The "'" chars are only necessary for base64-encoded
      // images.
      this.assertEquals("url(foo/bar/baz.gif)", styles.backgroundImage, "Do not use \"'\" for image urls!");
    },


    testGetStylesBase64 : function()
    {
      var styles = qx.bom.element.Background.getStyles(this.__backgroundUrlBase64, "no-repeat", null, null);

      this.assertKeyInMap("backgroundImage", styles, "Key 'backgroundImage' is not present!");
      this.assertKeyInMap("backgroundPosition", styles, "Key 'backgroundPosition' is not present!");

      this.assertEquals("url('" + this.__backgroundUrlBase64 + "')", styles['backgroundImage'], "Wrong value for base64 encoded background image!");
    },


    testCompile : function()
    {
      var cssString = qx.bom.element.Background.compile("foo/bar/baz", "no-repeat", null, null);

      var expected = "background-image:url(foo/bar/baz);background-position:0 0;" +
                     "background-repeat:no-repeat;";
      this.assertEquals(expected, cssString, "Compiled CSS string is not valid!");
    },


    testCompileBase64 : function()
    {
      var cssStringBase64 = qx.bom.element.Background.compile(this.__backgroundUrlBase64, "no-repeat", null, null);

      var expected = "background-image:url('" + this.__backgroundUrlBase64 + "');" +
                     "background-position:0 0;background-repeat:no-repeat;";

      this.assertEquals(expected, cssStringBase64, "Compiled CSS string for base64 image is not valid!");
    }
  }
});