Skip to content

Commit 01f7d22

Browse files
chore(test): rename test ng versions to simple 1.x convention
1 parent cfacaad commit 01f7d22

17 files changed

+49
-29
lines changed

karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ webpackConfig.plugins = [];
3535
webpackConfig.devtool = 'inline-source-map';
3636

3737
module.exports = function(config) {
38-
var ngVersion = config.ngversion || "1.6.0";
38+
var ngVersion = config.ngversion || "1.5";
3939

4040
config.set({
4141
singleRun: true,

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"bundle_events": "rollup -c --environment EVENTS && rollup -c --environment EVENTS,MINIFY",
1313
"bundle_resolve": "rollup -c --environment RESOLVE && rollup -c --environment RESOLVE,MINIFY",
1414
"test": "npm run test:integrate",
15-
"test:ng12": "karma start --ngversion 1.2.28",
16-
"test:ng13": "karma start --ngversion 1.3.16",
17-
"test:ng14": "karma start --ngversion 1.4.9",
18-
"test:ng15": "karma start --ngversion 1.5.0",
19-
"test:ng16": "karma start --ngversion 1.6.0",
15+
"test:ng12": "karma start --ngversion 1.2",
16+
"test:ng13": "karma start --ngversion 1.3",
17+
"test:ng14": "karma start --ngversion 1.4",
18+
"test:ng15": "karma start --ngversion 1.5",
19+
"test:ng16": "karma start --ngversion 1.6",
2020
"test:integrate": "tsc && npm run test:ng12 && npm run test:ng13 && npm run test:ng14 && npm run test:ng15 && npm run test:ng16",
2121
"watch": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1",
2222
"debug": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1 --browsers=Chrome",
File renamed without changes.

test/angular/1.3.16/angular-animate.js renamed to test/angular/1.3/angular-animate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.16
2+
* @license AngularJS v1.3.17
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

test/angular/1.3.16/angular-mocks.js renamed to test/angular/1.3/angular-mocks.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.16
2+
* @license AngularJS v1.3.17
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -2244,7 +2244,8 @@ if (window.jasmine || window.mocha) {
22442244

22452245
if (injector) {
22462246
injector.get('$rootElement').off();
2247-
injector.get('$browser').pollFns.length = 0;
2247+
var $browser = injector.get('$browser');
2248+
if ($browser.pollFns) $browser.pollFns.length = 0;
22482249
}
22492250

22502251
// clean up jquery's fragment cache

test/angular/1.3.16/angular.js renamed to test/angular/1.3/angular.js

+39-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.3.16
2+
* @license AngularJS v1.3.17
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) {
5454
return match;
5555
});
5656

57-
message = message + '\nhttp://errors.angularjs.org/1.3.16/' +
57+
message = message + '\nhttp://errors.angularjs.org/1.3.17/' +
5858
(module ? module + '/' : '') + code;
5959
for (i = 2; i < arguments.length; i++) {
6060
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
@@ -2139,11 +2139,11 @@ function toDebugString(obj) {
21392139
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
21402140
*/
21412141
var version = {
2142-
full: '1.3.16', // all of these placeholder strings will be replaced by grunt's
2142+
full: '1.3.17', // all of these placeholder strings will be replaced by grunt's
21432143
major: 1, // package task
21442144
minor: 3,
2145-
dot: 16,
2146-
codeName: 'cookie-oatmealification'
2145+
dot: 17,
2146+
codeName: 'tsktskskly-euouae'
21472147
};
21482148

21492149

@@ -4954,7 +4954,7 @@ function Browser(window, document, $log, $sniffer) {
49544954

49554955
function getHash(url) {
49564956
var index = url.indexOf('#');
4957-
return index === -1 ? '' : url.substr(index + 1);
4957+
return index === -1 ? '' : url.substr(index);
49584958
}
49594959

49604960
/**
@@ -5081,7 +5081,7 @@ function Browser(window, document, $log, $sniffer) {
50815081
// Do the assignment again so that those two variables are referentially identical.
50825082
lastHistoryState = cachedState;
50835083
} else {
5084-
if (!sameBase) {
5084+
if (!sameBase || reloadLocation) {
50855085
reloadLocation = url;
50865086
}
50875087
if (replace) {
@@ -7954,7 +7954,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
79547954

79557955
$compileNode.empty();
79567956

7957-
$templateRequest($sce.getTrustedResourceUrl(templateUrl))
7957+
$templateRequest(templateUrl)
79587958
.then(function(content) {
79597959
var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;
79607960

@@ -10760,7 +10760,7 @@ function LocationHashbangUrl(appBase, hashPrefix) {
1076010760
var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);
1076110761
var withoutHashUrl;
1076210762

10763-
if (withoutBaseUrl.charAt(0) === '#') {
10763+
if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {
1076410764

1076510765
// The rest of the url starts with a hash so we have
1076610766
// got either a hashbang path or a plain hash fragment
@@ -10774,7 +10774,15 @@ function LocationHashbangUrl(appBase, hashPrefix) {
1077410774
// There was no hashbang path nor hash fragment:
1077510775
// If we are in HTML5 mode we use what is left as the path;
1077610776
// Otherwise we ignore what is left
10777-
withoutHashUrl = this.$$html5 ? withoutBaseUrl : '';
10777+
if (this.$$html5) {
10778+
withoutHashUrl = withoutBaseUrl;
10779+
} else {
10780+
withoutHashUrl = '';
10781+
if (isUndefined(withoutBaseUrl)) {
10782+
appBase = url;
10783+
this.replace();
10784+
}
10785+
}
1077810786
}
1077910787

1078010788
parseAppUrl(withoutHashUrl, this);
@@ -16169,23 +16177,34 @@ var $compileMinErr = minErr('$compile');
1616916177
* @name $templateRequest
1617016178
*
1617116179
* @description
16172-
* The `$templateRequest` service downloads the provided template using `$http` and, upon success,
16173-
* stores the contents inside of `$templateCache`. If the HTTP request fails or the response data
16174-
* of the HTTP request is empty, a `$compile` error will be thrown (the exception can be thwarted
16175-
* by setting the 2nd parameter of the function to true).
16176-
*
16177-
* @param {string} tpl The HTTP request template URL
16180+
* The `$templateRequest` service runs security checks then downloads the provided template using
16181+
* `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request
16182+
* fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the
16183+
* exception can be thwarted by setting the 2nd parameter of the function to true). Note that the
16184+
* contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted
16185+
* when `tpl` is of type string and `$templateCache` has the matching entry.
16186+
*
16187+
* @param {string|TrustedResourceUrl} tpl The HTTP request template URL
1617816188
* @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty
1617916189
*
1618016190
* @return {Promise} the HTTP Promise for the given.
1618116191
*
1618216192
* @property {number} totalPendingRequests total amount of pending template requests being downloaded.
1618316193
*/
1618416194
function $TemplateRequestProvider() {
16185-
this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) {
16195+
this.$get = ['$templateCache', '$http', '$q', '$sce', function($templateCache, $http, $q, $sce) {
1618616196
function handleRequestFn(tpl, ignoreRequestError) {
1618716197
handleRequestFn.totalPendingRequests++;
1618816198

16199+
// We consider the template cache holds only trusted templates, so
16200+
// there's no need to go through whitelisting again for keys that already
16201+
// are included in there. This also makes Angular accept any script
16202+
// directive, no matter its name. However, we still need to unwrap trusted
16203+
// types.
16204+
if (!isString(tpl) || !$templateCache.get(tpl)) {
16205+
tpl = $sce.getTrustedResourceUrl(tpl);
16206+
}
16207+
1618916208
var transformResponse = $http.defaults && $http.defaults.transformResponse;
1619016209

1619116210
if (isArray(transformResponse)) {
@@ -22395,8 +22414,8 @@ var ngIfDirective = ['$animate', function($animate) {
2239522414
* @param {Object} angularEvent Synthetic event object.
2239622415
* @param {String} src URL of content to load.
2239722416
*/
22398-
var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce',
22399-
function($templateRequest, $anchorScroll, $animate, $sce) {
22417+
var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate',
22418+
function($templateRequest, $anchorScroll, $animate) {
2240022419
return {
2240122420
restrict: 'ECA',
2240222421
priority: 400,
@@ -22432,7 +22451,7 @@ var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce
2243222451
}
2243322452
};
2243422453

22435-
scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {
22454+
scope.$watch(srcExp, function ngIncludeWatchAction(src) {
2243622455
var afterAnimation = function() {
2243722456
if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {
2243822457
$anchorScroll();
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)