Sha256: 0fbd80db8fe667a187d5bb30f1b3b8d0ff03fc9952cc607f59e9d46924b2ac0c

Contents?: true

Size: 1.6 KB

Versions: 8

Compression:

Stored size: 1.6 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

8 entries across 8 versions & 1 rubygems

Version Path
webfontloader-1.0.16 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.15 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.13 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.9 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.8 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.7 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.6 src-test/core/cssfontfamilynametest.js
webfontloader-1.0.5 src-test/core/cssfontfamilynametest.js