Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 197e18d232 | |||
| 7d7b03811d | |||
| bcac64b7b5 | |||
| 8de31388da | |||
| 1d2f5e41b7 | |||
| 6b3da2ddfe | |||
| d556519548 | |||
| 6a7d715944 | |||
| 35f3a4a0e3 | |||
| ff74511291 | |||
| cb04cfcab0 | |||
| 693d133456 |
@@ -1,3 +1,47 @@
|
||||
<a name="1.4.14"></a>
|
||||
# 1.4.14 material-distinction (2016-10-10)
|
||||
|
||||
This release reverts the fix in 1.4.13 and provides an alternative fix that doesn't break Angular Material.
|
||||
|
||||
## Reverts
|
||||
|
||||
- **input:** ensure that hidden input values are correct after history back
|
||||
([ff7451129](https://github.com/angular/angular.js/commit/ff745112915ffa8249520218139b1a8021cd06d0))
|
||||
|
||||
## Bug Fixes
|
||||
- **$compile:** ensure that hidden input values are correct after history back
|
||||
([35f3a4a0e](https://github.com/angular/angular.js/commit/35f3a4a0e30fef0e019ca0ea2ae434428eaff83b))
|
||||
|
||||
|
||||
<a name="1.2.32"></a>
|
||||
# 1.2.32 alternation-intention (2016-10-10)
|
||||
|
||||
This release reverts the fix in 1.2.31 and provides an alternative fix that doesn't break Angular Material.
|
||||
|
||||
## Reverts
|
||||
|
||||
- **input:** ensure that hidden input values are correct after history back
|
||||
([ed44dd065](https://github.com/angular/angular.js/commit/ed44dd0659f346ced78a112e4a2b30d3af4fd572))
|
||||
|
||||
## Bug Fixes
|
||||
- **$compile:** ensure that hidden input values are correct after history back
|
||||
([b8a0ecdd6](https://github.com/angular/angular.js/commit/b8a0ecdd6189fb111734eb5b6d4d473d0dcf4c36))
|
||||
|
||||
|
||||
<a name="1.4.13"></a>
|
||||
# 1.4.13 croaking-elderweed (2016-10-10)
|
||||
|
||||
## Bug Fixes
|
||||
- **input:** ensure that hidden input values are correct after history back
|
||||
([693d1334](https://github.com/angular/angular.js/commit/693d1334566f78987f5a361a100db4f889f35abd))
|
||||
|
||||
|
||||
<a name="1.4.12"></a>
|
||||
# 1.4.12
|
||||
|
||||
*Invalid release*
|
||||
|
||||
|
||||
<a name="1.4.11"></a>
|
||||
# 1.4.11 relentless-syncomania (2016-05-27)
|
||||
|
||||
|
||||
+1
-1
@@ -314,7 +314,7 @@ module.exports = function(grunt) {
|
||||
stderr: true,
|
||||
failOnError: true
|
||||
},
|
||||
command: path.normalize('./node_modules/.bin/promises-aplus-tests tmp/promises-aplus-adapter++.js')
|
||||
command: path.normalize('./node_modules/.bin/promises-aplus-tests tmp/promises-aplus-adapter++.js --timeout 2000')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ config.specs = [
|
||||
'app/e2e/**/*.scenario.js'
|
||||
];
|
||||
|
||||
config.capabilities = {
|
||||
browserName: 'chrome',
|
||||
};
|
||||
config.capabilities.browserName = 'chrome';
|
||||
|
||||
exports.config = config;
|
||||
|
||||
+2848
-4793
File diff suppressed because it is too large
Load Diff
Generated
+7807
-10846
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -53,7 +53,7 @@
|
||||
"gulp-uglify": "^1.0.1",
|
||||
"gulp-util": "^3.0.1",
|
||||
"jasmine-node": "^2.0.0",
|
||||
"jasmine-reporters": "~1.0.1",
|
||||
"jasmine-reporters": "^2.2.0",
|
||||
"jshint-stylish": "~1.0.0",
|
||||
"karma": "^0.13.19",
|
||||
"karma-browserstack-launcher": "^0.1.8",
|
||||
@@ -69,7 +69,7 @@
|
||||
"marked": "~0.3.0",
|
||||
"node-html-encoder": "0.0.2",
|
||||
"promises-aplus-tests": "~2.1.0",
|
||||
"protractor": "^2.1.0",
|
||||
"protractor": "^4.0.11",
|
||||
"q": "~1.0.0",
|
||||
"q-io": "^1.10.9",
|
||||
"qq": "^0.3.5",
|
||||
|
||||
+1
-3
@@ -8,8 +8,6 @@ config.specs = [
|
||||
'docs/app/e2e/**/*.scenario.js'
|
||||
];
|
||||
|
||||
config.capabilities = {
|
||||
browserName: 'chrome'
|
||||
};
|
||||
config.capabilities.browserName = 'chrome';
|
||||
|
||||
exports.config = config;
|
||||
|
||||
@@ -15,7 +15,7 @@ exports.config = {
|
||||
|
||||
baseUrl: 'http://localhost:8000/',
|
||||
|
||||
framework: 'jasmine',
|
||||
framework: 'jasmine2',
|
||||
|
||||
onPrepare: function() {
|
||||
/* global angular: false, browser: false, jasmine: false */
|
||||
@@ -29,9 +29,10 @@ exports.config = {
|
||||
|
||||
browser.addMockModule('disableNgAnimate', disableNgAnimate);
|
||||
|
||||
require('jasmine-reporters');
|
||||
jasmine.getEnv().addReporter(
|
||||
new jasmine.JUnitXmlReporter('test_out/docs-e2e-' + exports.config.capabilities.browserName + '-', true, true));
|
||||
var reporters = require('jasmine-reporters');
|
||||
jasmine.getEnv().addReporter(new reporters.JUnitXmlReporter({
|
||||
savePath: 'test_out/docs-e2e-' + exports.config.capabilities.browserName + '-'
|
||||
}));
|
||||
},
|
||||
|
||||
jasmineNodeOpts: {
|
||||
|
||||
@@ -5,7 +5,12 @@ exports.config = {
|
||||
|
||||
baseUrl: 'http://localhost:8000/',
|
||||
|
||||
framework: 'jasmine',
|
||||
framework: 'jasmine2',
|
||||
|
||||
capabilities: {
|
||||
// Fix element scrolling behavior in Firefox for fixed header elements (like angularjs.org has)
|
||||
'elementScrollBehavior': 1
|
||||
},
|
||||
|
||||
onPrepare: function() {
|
||||
/* global angular: false, browser: false, jasmine: false */
|
||||
|
||||
@@ -13,7 +13,7 @@ if (process.env.BROWSER_PROVIDER === 'browserstack') {
|
||||
}),
|
||||
capabilitiesForBrowserStack({
|
||||
browserName: 'firefox',
|
||||
version: '28'
|
||||
version: '47'
|
||||
}),
|
||||
capabilitiesForBrowserStack({
|
||||
browserName: 'safari',
|
||||
@@ -33,7 +33,7 @@ if (process.env.BROWSER_PROVIDER === 'browserstack') {
|
||||
}),
|
||||
capabilitiesForSauceLabs({
|
||||
browserName: 'firefox',
|
||||
version: '28'
|
||||
version: '47'
|
||||
}),
|
||||
capabilitiesForSauceLabs({
|
||||
browserName: 'safari',
|
||||
@@ -54,7 +54,7 @@ function capabilitiesForBrowserStack(capabilities) {
|
||||
return {
|
||||
'browserstack.user': process.env.BROWSER_STACK_USERNAME,
|
||||
'browserstack.key': process.env.BROWSER_STACK_ACCESS_KEY,
|
||||
'browserstack.local' : 'true',
|
||||
'browserstack.local': 'true',
|
||||
'browserstack.debug': 'true',
|
||||
'browserstack.tunnelIdentifier': process.env.TRAVIS_JOB_NUMBER,
|
||||
'tunnelIdentifier': process.env.TRAVIS_JOB_NUMBER,
|
||||
@@ -64,7 +64,8 @@ function capabilitiesForBrowserStack(capabilities) {
|
||||
|
||||
'browserName': capabilities.browserName,
|
||||
'platform': capabilities.platform,
|
||||
'version': capabilities.version
|
||||
'version': capabilities.version,
|
||||
'elementScrollBehavior': 1
|
||||
};
|
||||
}
|
||||
|
||||
@@ -77,6 +78,7 @@ function capabilitiesForSauceLabs(capabilities) {
|
||||
|
||||
'browserName': capabilities.browserName,
|
||||
'platform': capabilities.platform,
|
||||
'version': capabilities.version
|
||||
'version': capabilities.version,
|
||||
'elementScrollBehavior': 1
|
||||
};
|
||||
}
|
||||
|
||||
+11
-1
@@ -1538,13 +1538,17 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
||||
var nodeType = node.nodeType,
|
||||
attrsMap = attrs.$attr,
|
||||
match,
|
||||
nodeName,
|
||||
className;
|
||||
|
||||
switch (nodeType) {
|
||||
case NODE_TYPE_ELEMENT: /* Element */
|
||||
|
||||
nodeName = nodeName_(node);
|
||||
|
||||
// use the node name: <directive>
|
||||
addDirective(directives,
|
||||
directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective);
|
||||
directiveNormalize(nodeName), 'E', maxPriority, ignoreDirective);
|
||||
|
||||
// iterate over the attributes
|
||||
for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,
|
||||
@@ -1585,6 +1589,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
||||
attrEndName);
|
||||
}
|
||||
|
||||
if (nodeName === 'input' && node.getAttribute('type') === 'hidden') {
|
||||
// Hidden input elements can have strange behaviour when navigating back to the page
|
||||
// This tells the browser not to try to cache and reinstate previous values
|
||||
node.setAttribute('autocomplete', 'off');
|
||||
}
|
||||
|
||||
// use class as directive
|
||||
className = node.className;
|
||||
if (isObject(className)) {
|
||||
|
||||
+2
-2
@@ -627,12 +627,12 @@ function $SceDelegateProvider() {
|
||||
* <file name="protractor.js" type="protractor">
|
||||
* describe('SCE doc demo', function() {
|
||||
* it('should sanitize untrusted values', function() {
|
||||
* expect(element.all(by.css('.htmlComment')).first().getInnerHtml())
|
||||
* expect(element.all(by.css('.htmlComment')).first().getAttribute('innerHTML'))
|
||||
* .toBe('<span>Is <i>anyone</i> reading this?</span>');
|
||||
* });
|
||||
*
|
||||
* it('should NOT sanitize explicitly trusted values', function() {
|
||||
* expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(
|
||||
* expect(element(by.id('explicitlyTrustedHtml')).getAttribute('innerHTML')).toBe(
|
||||
* '<span onmouseover="this.textContent="Explicitly trusted HTML bypasses ' +
|
||||
* 'sanitization."">Hover over this text.</span>');
|
||||
* });
|
||||
|
||||
@@ -112,19 +112,19 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize');
|
||||
</file>
|
||||
<file name="protractor.js" type="protractor">
|
||||
it('should sanitize the html snippet by default', function() {
|
||||
expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).
|
||||
expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')).
|
||||
toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
|
||||
});
|
||||
|
||||
it('should inline raw snippet if bound to a trusted value', function() {
|
||||
expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).
|
||||
expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).
|
||||
toBe("<p style=\"color:blue\">an html\n" +
|
||||
"<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
|
||||
"snippet</p>");
|
||||
});
|
||||
|
||||
it('should escape snippet without any filter', function() {
|
||||
expect(element(by.css('#bind-default div')).getInnerHtml()).
|
||||
expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).
|
||||
toBe("<p style=\"color:blue\">an html\n" +
|
||||
"<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
|
||||
"snippet</p>");
|
||||
@@ -133,11 +133,11 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize');
|
||||
it('should update', function() {
|
||||
element(by.model('snippet')).clear();
|
||||
element(by.model('snippet')).sendKeys('new <b onclick="alert(1)">text</b>');
|
||||
expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).
|
||||
expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')).
|
||||
toBe('new <b>text</b>');
|
||||
expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe(
|
||||
expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe(
|
||||
'new <b onclick="alert(1)">text</b>');
|
||||
expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(
|
||||
expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe(
|
||||
"new <b onclick=\"alert(1)\">text</b>");
|
||||
});
|
||||
</file>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app>
|
||||
<body>
|
||||
<form>
|
||||
<input type="hidden" value="{{value}}" />
|
||||
<button ng-click="value = '{{ 7 * 6 }}'">Click me</button>
|
||||
</form>
|
||||
<script src="angular.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,15 @@
|
||||
describe('hidden thingy', function() {
|
||||
it('should pass', function() {
|
||||
|
||||
loadFixture('input-hidden');
|
||||
expect(element(by.css('input')).getAttribute('value')).toEqual('');
|
||||
|
||||
element(by.css('button')).click();
|
||||
expect(element(by.css('input')).getAttribute('value')).toEqual('{{ 7 * 6 }}');
|
||||
|
||||
loadFixture('sample');
|
||||
browser.driver.executeScript('history.back()');
|
||||
var expectedValue = browser.params.browser === 'safari' ? '{{ 7 * 6 }}' : '';
|
||||
expect(element(by.css('input')).getAttribute('value')).toEqual(expectedValue);
|
||||
});
|
||||
});
|
||||
+19
-9
@@ -138,16 +138,26 @@ describe('$log', function() {
|
||||
describe('$log.error', function() {
|
||||
var e, $log, errorArgs;
|
||||
|
||||
beforeEach(function() {
|
||||
e = new Error('');
|
||||
e.message = undefined;
|
||||
e.sourceURL = undefined;
|
||||
e.line = undefined;
|
||||
e.stack = undefined;
|
||||
function TestError() {
|
||||
Error.prototype.constructor.apply(this, arguments);
|
||||
this.message = undefined;
|
||||
this.sourceURL = undefined;
|
||||
this.line = undefined;
|
||||
this.stack = undefined;
|
||||
}
|
||||
TestError.prototype = Object.create(Error.prototype);
|
||||
TestError.prototype.constructor = TestError;
|
||||
|
||||
$log = new $LogProvider().$get[1]({console:{error:function() {
|
||||
errorArgs = [].slice.call(arguments, 0);
|
||||
}}});
|
||||
beforeEach(function() {
|
||||
e = new TestError('');
|
||||
var mockWindow = {
|
||||
console: {
|
||||
error: function() {
|
||||
errorArgs = [].slice.call(arguments, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
$log = new $LogProvider().$get[1](mockWindow);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Vendored
+4
-3
@@ -936,9 +936,10 @@ describe('ngMock', function() {
|
||||
})();
|
||||
|
||||
function testCaller() {
|
||||
return inject(function() {
|
||||
throw new Error();
|
||||
});
|
||||
// Assigning to a local variable first, prevents Safari 10+ from inlining
|
||||
// the function call and having it appear as anonymous in the stack trace.
|
||||
var fn = inject(function() { throw new Error(); });
|
||||
return fn;
|
||||
}
|
||||
var throwErrorFromInjectCallback = testCaller();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user