OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 'use strict'; | 5 'use strict'; |
6 | 6 |
7 function testCreateCacheKey() { | 7 function testCreateCacheKey() { |
8 var key = Cache.createKey({url: 'http://example.com/image.jpg'}); | 8 var key = ImageCache.createKey({url: 'http://example.com/image.jpg'}); |
9 assertTrue(!!key); | 9 assertTrue(!!key); |
10 } | 10 } |
11 | 11 |
12 function testNotCreateCacheKey() { | 12 function testNotCreateCacheKey() { |
13 var key = Cache.createKey({url: 'data:xxx'}); | 13 var key = ImageCache.createKey({url: 'data:xxx'}); |
14 assertFalse(!!key); | 14 assertFalse(!!key); |
15 | 15 |
16 var key = Cache.createKey({url: 'DaTa:xxx'}); | 16 var key = ImageCache.createKey({url: 'DaTa:xxx'}); |
17 assertFalse(!!key); | 17 assertFalse(!!key); |
18 } | 18 } |
OLD | NEW |