Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
test(angular): default to 1.4 branch testing, test against both 1.3, 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea committed Jul 12, 2015
1 parent c2b33fd commit bdf376c
Show file tree
Hide file tree
Showing 9 changed files with 4,800 additions and 8,280 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ before_script:

script:
- gulp jshint karma:travis
- gulp karma:travis~1.3.0
- gulp karma:travis~1.2.0
- gulp karma:travis~1.4.0

after_script:
- cat test/coverage/*/lcov.info | codeclimate
Expand Down
12 changes: 6 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
"angular": "^1.2.21"
},
"devDependencies": {
"angular-animate": "^1.2.21",
"angular-i18n": "^1.2.21",
"angular-mocks": "^1.2.21",
"angular-animate": "~1.4",
"angular-i18n": "~1.4",
"angular-mocks": "~1.4",
"angular-motion": "^0.3.3",
"angular-route": "^1.2.21",
"angular-sanitize": "^1.2.21",
"angular-scenario": "^1.2.21",
"angular-route": "~1.4",
"angular-sanitize": "~1.4",
"angular-scenario": "~1.4",
"bootstrap": "^3.2.0",
"bootstrap-additions": "^0.2.3",
"fastclick": "^1.0.3",
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ gulp.task('karma:travis~1.2.0', gulp.series('ng:test/templates', function karmaT
process.exit(code);
});
}));
gulp.task('karma:travis~1.4.0', gulp.series('ng:test/templates', function karmaTravis140() {
gulp.task('karma:travis~1.3.0', gulp.series('ng:test/templates', function karmaTravis130() {
karma.start({
configFile: path.join(__dirname, 'test/~1.4.0/karma.conf.js'),
configFile: path.join(__dirname, 'test/~1.3.0/karma.conf.js'),
browsers: ['PhantomJS'],
reporters: ['dots'],
singleRun: true
Expand Down
2,139 changes: 2,139 additions & 0 deletions test/~1.3.0/components/angular-animate.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license AngularJS v1.4.2
* (c) 2010-2015 Google, Inc. http://angularjs.org
* @license AngularJS v1.3.17
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
Expand Down Expand Up @@ -211,11 +211,10 @@ var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a

// SVG Elements
// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements
// Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted.
// They can potentially allow for arbitrary javascript to be executed. See #11290
var svgElements = makeMap("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph," +
"hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline," +
"radialGradient,rect,stop,svg,switch,text,title,tspan,use");
var svgElements = makeMap("animate,animateColor,animateMotion,animateTransform,circle,defs," +
"desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient," +
"line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set," +
"stop,svg,switch,text,title,tspan,use");

// Special Elements (can contain anything)
var specialElements = makeMap("script,style");
Expand All @@ -233,37 +232,36 @@ var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap,xlink:href");
var htmlAttrs = makeMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' +
'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' +
'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' +
'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' +
'scope,scrolling,shape,size,span,start,summary,target,title,type,' +
'valign,value,vspace,width');

// SVG attributes (without "id" and "name" attributes)
// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes
var svgAttrs = makeMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' +
'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' +
'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' +
'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' +
'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' +
'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' +
'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' +
'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' +
'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' +
'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' +
'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' +
'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' +
'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' +
'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' +
'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true);
'attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,' +
'color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,' +
'font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,' +
'gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,' +
'keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,' +
'markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,' +
'overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,' +
'repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,' +
'stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,' +
'stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,' +
'stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,' +
'underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,' +
'viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,' +
'xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,' +
'zoomAndPan');

var validAttrs = angular.extend({},
uriAttrs,
svgAttrs,
htmlAttrs);

function makeMap(str, lowercaseKeys) {
function makeMap(str) {
var obj = {}, items = str.split(','), i;
for (i = 0; i < items.length; i++) {
obj[lowercaseKeys ? angular.lowercase(items[i]) : items[i]] = true;
}
for (i = 0; i < items.length; i++) obj[items[i]] = true;
return obj;
}

Expand Down Expand Up @@ -391,9 +389,8 @@ function htmlParser(html, handler) {

unary = voidElements[tagName] || !!unary;

if (!unary) {
if (!unary)
stack.push(tagName);
}

var attrs = {};

Expand All @@ -412,12 +409,11 @@ function htmlParser(html, handler) {
function parseEndTag(tag, tagName) {
var pos = 0, i;
tagName = angular.lowercase(tagName);
if (tagName) {
if (tagName)
// Find the closest opened tag of the same type
for (pos = stack.length - 1; pos >= 0; pos--) {
if (stack[pos] == tagName) break;
}
}
for (pos = stack.length - 1; pos >= 0; pos--)
if (stack[pos] == tagName)
break;

if (pos >= 0) {
// Close all the open elements, up the stack
Expand Down
Loading

0 comments on commit bdf376c

Please sign in to comment.