Remove usage of goog.color

This commit is contained in:
Björn Harrtell
2016-07-12 10:56:00 +02:00
parent 2289d557d8
commit 3be90d4d8d
4 changed files with 41 additions and 34 deletions

View File

@@ -81,15 +81,13 @@ describe('ol.color', function() {
[255, 255, 0, 0.1]);
});
if (ol.ENABLE_NAMED_COLORS) {
it('caches parsed values', function() {
var count = ol.color.fromStringInternal_.callCount;
ol.color.fromString('aquamarine');
expect(ol.color.fromStringInternal_.callCount).to.be(count + 1);
ol.color.fromString('aquamarine');
expect(ol.color.fromStringInternal_.callCount).to.be(count + 1);
});
}
it('caches parsed values', function() {
var count = ol.color.fromStringInternal_.callCount;
ol.color.fromString('aquamarine');
expect(ol.color.fromStringInternal_.callCount).to.be(count + 1);
ol.color.fromString('aquamarine');
expect(ol.color.fromStringInternal_.callCount).to.be(count + 1);
});
it('throws an error on invalid colors', function() {
var invalidColors = ['tuesday', '#1234567', 'rgb(255.0,0,0)'];