Sha256: 49dc45582465a9b3e25e17b2babcc1850cc4c6f286c8a2a093e996853380ad19

Contents?: true

Size: 1.59 KB

Versions: 17

Compression:

Stored size: 1.59 KB

Contents

var CssFontFamilyNameTest = TestCase('CssFontFamilyName');

CssFontFamilyNameTest.prototype.setUp = function() {
  this.sanitizer_ = new webfont.CssFontFamilyName();
};

CssFontFamilyNameTest.prototype.testSpaceNameWithoutQuotes = function() {
  var result = this.sanitizer_.quote('My Family');

  assertEquals("'My Family'", result);
};

CssFontFamilyNameTest.prototype.testSpaceNameWithDoubleQuotes = function() {
  var result = this.sanitizer_.quote('"My Family"');

  assertEquals("'My Family'", result);
};

CssFontFamilyNameTest.prototype.testSpaceNameWithSingleQuotes = function() {
  var result = this.sanitizer_.quote('\'My Family\'');

  assertEquals("'My Family'", result);
};

CssFontFamilyNameTest.prototype.testSpaceNameWithCommasAndQuotes = function() {
  var result = this.sanitizer_.quote('\'family 1\',\'family 2\'');

  assertEquals("'family 1','family 2'", result);
};

CssFontFamilyNameTest.prototype.testSpaceNameWithCommaSpaceAndQuotes = function() {
  var result = this.sanitizer_.quote('\'family 1\', \'family 2\'');

  assertEquals("'family 1','family 2'", result);
};

CssFontFamilyNameTest.prototype.testNoSpaceNameWithoutQuotes = function() {
  var result = this.sanitizer_.quote('MyFamily');

  assertEquals('MyFamily', result);
};

CssFontFamilyNameTest.prototype.testNoSpaceNameWithQuotes = function() {
  var result = this.sanitizer_.quote('"MyFamily"');

  assertEquals('MyFamily', result);
};

CssFontFamilyNameTest.prototype.testNoSpaceNameWithCommasAndQuotes = function() {
  var result = this.sanitizer_.quote('\'family-1\', \'family-2\'');

  assertEquals('family-1,family-2', result);
};

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
webfontloader-1.2.0 src-test/core/cssfontfamilynametest.js
webfontloader-1.1.2 src-test/core/cssfontfamilynametest.js
webfontloader-1.1.1 src-test/core/cssfontfamilynametest.js
webfontloader-1.1.0 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.31 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.30 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.29 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.28 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.27 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.26 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.25 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.24 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.22 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.21 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.20 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.19 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.18 src-test/core/cssfontfamilynametest.js