Skip to content

Commit 0deae2a

Browse files
authored
Update test fixtures to latest master. (#277)
1 parent fc040b2 commit 0deae2a

File tree

197 files changed

+1598
-815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+1598
-815
lines changed

fixtures/packages/iron-icon/source/bower_components/iron-a11y-keys-behavior/.bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@
5151
"resolutions": {
5252
"webcomponentsjs": "^1.0.0"
5353
},
54-
"homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior",
54+
"homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior",
5555
"_release": "2.0.1",
5656
"_resolution": {
5757
"type": "version",
5858
"tag": "v2.0.1",
5959
"commit": "a3f03fc3fb5a0d8e93eaa33c2b6c02c16098b402"
6060
},
61-
"_source": "https://github.com/PolymerElements/iron-a11y-keys-behavior.git",
61+
"_source": "https://github.com/polymerelements/iron-a11y-keys-behavior.git",
6262
"_target": "1 - 2",
63-
"_originalSource": "PolymerElements/iron-a11y-keys-behavior"
63+
"_originalSource": "polymerelements/iron-a11y-keys-behavior"
6464
}

fixtures/packages/iron-icon/source/bower_components/iron-ajax/.bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iron-ajax",
3-
"version": "2.0.6",
3+
"version": "2.0.8",
44
"description": "Makes it easy to make ajax calls and parse the response",
55
"private": true,
66
"authors": [
@@ -53,11 +53,11 @@
5353
"resolutions": {
5454
"webcomponentsjs": "^1.0.0"
5555
},
56-
"_release": "2.0.6",
56+
"_release": "2.0.8",
5757
"_resolution": {
5858
"type": "version",
59-
"tag": "v2.0.6",
60-
"commit": "db9535a8e40795b464679469f5b3dd71b9163def"
59+
"tag": "v2.0.8",
60+
"commit": "fd9fd3b7f6f4dca92358085ee0f9b4f783394410"
6161
},
6262
"_source": "https://github.com/PolymerElements/iron-ajax.git",
6363
"_target": "1 - 2",

fixtures/packages/iron-icon/source/bower_components/iron-ajax/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iron-ajax",
3-
"version": "2.0.6",
3+
"version": "2.0.8",
44
"description": "Makes it easy to make ajax calls and parse the response",
55
"private": true,
66
"authors": [

fixtures/packages/iron-icon/source/bower_components/iron-ajax/iron-ajax.html

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,15 @@
235235
readOnly: true
236236
},
237237

238+
/**
239+
* The `progress` property of this element's `lastRequest`.
240+
*/
241+
lastProgress: {
242+
type: Object,
243+
notify: true,
244+
readOnly: true
245+
},
246+
238247
/**
239248
* True while lastRequest is in flight.
240249
*/
@@ -348,6 +357,10 @@
348357
'body, sync, handleAs, jsonPrefix, withCredentials, timeout, auto)'
349358
],
350359

360+
created: function() {
361+
this._boundOnProgressChanged = this._onProgressChanged.bind(this);
362+
},
363+
351364
/**
352365
* The query string that should be appended to the `url`, serialized from
353366
* the current value of `params`.
@@ -422,6 +435,10 @@
422435
return headers;
423436
},
424437

438+
_onProgressChanged: function(event) {
439+
this._setLastProgress(event.detail.value);
440+
},
441+
425442
/**
426443
* Request options suitable for generating an `iron-request` instance based
427444
* on the current state of the `iron-ajax` instance's properties.
@@ -481,8 +498,16 @@
481498
return request;
482499
}
483500

484-
request.send(requestOptions);
501+
if (this.lastRequest) {
502+
this.lastRequest.removeEventListener('iron-request-progress-changed',
503+
this._boundOnProgressChanged);
504+
}
505+
506+
request.addEventListener('iron-request-progress-changed',
507+
this._boundOnProgressChanged);
485508

509+
request.send(requestOptions);
510+
this._setLastProgress(null);
486511
this._setLastRequest(request);
487512
this._setLoading(true);
488513

fixtures/packages/iron-icon/source/bower_components/iron-ajax/iron-request.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@
215215
loaded: progress.loaded,
216216
total: progress.total
217217
});
218-
}.bind(this));
218+
219+
// Webcomponents v1 spec does not fire *-changed events when not connected
220+
this.fire('iron-request-progress-changed', { value: this.progress });
221+
}.bind(this))
219222

220223
xhr.addEventListener('error', function(error) {
221224
this._setErrored(true);
@@ -364,6 +367,7 @@
364367
try {
365368
return JSON.parse(xhr.responseText);
366369
} catch (_) {
370+
console.warn('Failed to parse JSON sent from ' + xhr.responseUrl);
367371
return null;
368372
}
369373
}
@@ -385,6 +389,7 @@
385389
try {
386390
return JSON.parse(xhr.responseText.substring(prefixLen));
387391
} catch (_) {
392+
console.warn('Failed to parse JSON sent from ' + xhr.responseUrl);
388393
return null;
389394
}
390395
}

fixtures/packages/iron-icon/source/bower_components/iron-ajax/test/iron-ajax.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,55 @@
961961
ajax.generateRequest();
962962
});
963963
});
964+
965+
suite('Progress Tests', function() {
966+
var ajax;
967+
968+
setup(function() {
969+
server.restore();
970+
});
971+
972+
test('lastProgress is same as lastRequest', function(done) {
973+
ajax = fixture('TrivialGet');
974+
975+
var lastProgressUpdated = false;
976+
977+
expect(ajax.lastProgress).to.be.eql(undefined);
978+
979+
ajax.generateRequest();
980+
981+
expect(ajax.lastProgress).to.be.eql(null);
982+
983+
var onLastProgressChanged = function() {
984+
expect(ajax.lastProgress.total).to.not.be.undefined;
985+
expect(ajax.lastProgress).to.be.equal(ajax.lastRequest.progress);
986+
lastProgressUpdated = true;
987+
};
988+
989+
ajax.lastRequest.completes.then(function() {
990+
// should have something from last request
991+
expect(ajax.lastProgress).to.be.ok;
992+
ajax.removeEventListener('last-progress-changed',
993+
onLastProgressChanged);
994+
ajax.generateRequest();
995+
996+
// should reset
997+
expect(ajax.lastProgress).to.be.eql(null);
998+
999+
if (lastProgressUpdated) {
1000+
done();
1001+
} else {
1002+
done('lastProgress was never updated');
1003+
}
1004+
}).catch(function(err) {
1005+
done(err);
1006+
});
1007+
1008+
server.respond();
1009+
1010+
ajax.addEventListener('last-progress-changed', onLastProgressChanged);
1011+
});
1012+
});
9641013
});
9651014
</script>
9661015

fixtures/packages/iron-icon/source/bower_components/iron-location/.bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iron-location",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "Bidirectional data binding into the page's URL.",
55
"private": true,
66
"authors": [
@@ -59,11 +59,11 @@
5959
"resolutions": {
6060
"webcomponentsjs": "^1.0.0"
6161
},
62-
"_release": "2.0.2",
62+
"_release": "2.0.3",
6363
"_resolution": {
6464
"type": "version",
65-
"tag": "v2.0.2",
66-
"commit": "10493907e6ba30b2bd9d21c0f91209d08416b4e8"
65+
"tag": "v2.0.3",
66+
"commit": "1a0c6f979e3ae2f3040daab87c6005dca94d78c5"
6767
},
6868
"_source": "https://github.com/PolymerElements/iron-location.git",
6969
"_target": "1 - 2",

fixtures/packages/iron-icon/source/bower_components/iron-location/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ thing! https://github.com/PolymerLabs/tedium/issues
1313
-->
1414

1515
[![Build status](https://travis-ci.org/PolymerElements/iron-location.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-location)
16+
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/PolymerElements/iron-location)
1617

1718
_[Demo and API docs](https://elements.polymer-project.org/elements/iron-location)_
1819

fixtures/packages/iron-icon/source/bower_components/iron-location/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iron-location",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "Bidirectional data binding into the page's URL.",
55
"private": true,
66
"authors": [

fixtures/packages/iron-icon/source/bower_components/iron-location/iron-location.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,11 @@
348348
window.top !== window) {
349349
return null;
350350
}
351+
352+
// If the link is a download, don't intercept.
353+
if (anchor.download) {
354+
return null;
355+
}
351356

352357
var href = anchor.href;
353358

0 commit comments

Comments
 (0)