Skip to content

Commit 7d3a0d5

Browse files
authored
Merge pull request #55 from PolymerElements/fix-event-names-in-test
update event names in tests
2 parents 1aa76a2 + a81f77c commit 7d3a0d5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/basic.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
// Keep the tests independent by resetting the internal cache.
169169
resetRequestsCache(app);
170170

171-
app.addEventListener('app-resources-loaded', function() {
171+
app.addEventListener('app-localize-resources-loaded', function() {
172172
assert.equal(app.language, 'en');
173173
assert.equal(app.$.output.innerHTML, 'hello');
174174

@@ -188,7 +188,7 @@
188188
// Keep the tests independent by resetting the internal cache.
189189
resetRequestsCache(app);
190190

191-
app.addEventListener('app-resources-loaded', function() {
191+
app.addEventListener('app-localize-resources-loaded', function() {
192192
assert.equal(app.language, 'en');
193193
assert.equal(app.$.output.innerHTML, 'my name is batman. i have 3 cats.');
194194

@@ -210,7 +210,7 @@
210210
resetRequestsCache(app1);
211211
resetRequestsCache(app2);
212212

213-
app1.addEventListener('app-resources-loaded', function() {
213+
app1.addEventListener('app-localize-resources-loaded', function() {
214214
assert.equal(app1.language, 'en');
215215
assert.equal(app2.language, 'en');
216216
assert.equal(app1.localize('greeting'), 'hello');
@@ -250,7 +250,7 @@
250250
assert.equal(0, Object.keys(getRequestsCache(app3)).length);
251251

252252
// Once the first file has been loaded, it should be the only thing in the cache.
253-
app1.addEventListener('app-resources-loaded', function() {
253+
app1.addEventListener('app-localize-resources-loaded', function() {
254254
assert.equal(1, Object.keys(getRequestsCache(app1)).length, 'there is 1 request cached in app1');
255255
assert.equal(1, Object.keys(getRequestsCache(app2)).length, 'there is 1 request cached in app2');
256256
assert.equal(1, Object.keys(getRequestsCache(app3)).length, 'there is 1 request cached in app3');
@@ -260,7 +260,7 @@
260260
assert.equal(app1.resources['fr']['greeting'], 'bonjour');
261261

262262
// Loading the second file should not make an iron-ajax request, and re-use the one in the cache.
263-
app2.addEventListener('app-resources-loaded', function() {
263+
app2.addEventListener('app-localize-resources-loaded', function() {
264264
assert.equal(1, Object.keys(getRequestsCache(app1)).length, 'there is 1 request cached in app1');
265265
assert.equal(1, Object.keys(getRequestsCache(app2)).length, 'there is 1 request cached in app2');
266266
assert.equal(1, Object.keys(getRequestsCache(app3)).length, 'there is 1 request cached in app3');
@@ -270,7 +270,7 @@
270270
assert.equal(app2.resources['fr']['greeting'], 'bonjour');
271271

272272
// Loading the third file should not make an iron-ajax request, and re-use the one in the cache.
273-
app3.addEventListener('app-resources-loaded', function() {
273+
app3.addEventListener('app-localize-resources-loaded', function() {
274274
assert.equal(1, Object.keys(getRequestsCache(app1)).length, 'there is 1 request cached in app1');
275275
assert.equal(1, Object.keys(getRequestsCache(app2)).length, 'there is 1 request cached in app2');
276276
assert.equal(1, Object.keys(getRequestsCache(app3)).length, 'there is 1 request cached in app3');
@@ -305,7 +305,7 @@
305305
var path2 = app1.resolveUrl('locales2.json');
306306

307307
// Once the first file has been loaded, it should be the only thing in the cache.
308-
app1.addEventListener('app-resources-loaded', function() {
308+
app1.addEventListener('app-localize-resources-loaded', function() {
309309
assert.equal(1, Object.keys(getRequestsCache(app1)).length, 'there is 1 request cached in app1');
310310
assert.equal(1, Object.keys(getRequestsCache(app2)).length, 'there is 1 request cached in app2');
311311

@@ -314,7 +314,7 @@
314314
assert.equal(app1.resources['fr']['greeting'], 'bonjour');
315315

316316
// Loading a different file should make a different ajax request.
317-
app2.addEventListener('app-resources-loaded', function() {
317+
app2.addEventListener('app-localize-resources-loaded', function() {
318318
assert.equal(2, Object.keys(getRequestsCache(app1)).length, 'there are 2 requests cached in app1');
319319
assert.equal(2, Object.keys(getRequestsCache(app2)).length, 'there are 2 requests cached in app2');
320320

0 commit comments

Comments
 (0)