Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular2",
"dependencies": {
"polymer": "dart-lang/polymer_js#0.8.0-preview"
"polymer": "Polymer/polymer"
}
}
4 changes: 2 additions & 2 deletions modules/benchmarks/e2e_test/static_tree_perf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('ng2 static tree benchmark', function() {
runClickBenchmark({
url: URL,
buttons: ['#baselineDestroyDom', '#baselineCreateDom'],
id: 'baseline.tree.create',
id: 'baseline.static.tree.create',
params: [{name: 'depth', value: 9, scale: 'log2'}]
}).then(done, done.fail);
});
Expand All @@ -46,7 +46,7 @@ describe('ng2 static tree benchmark', function() {
runClickBenchmark({
url: URL,
buttons: ['#baselineCreateDom'],
id: 'baseline.tree.update',
id: 'baseline.static.tree.update',
params: [{name: 'depth', value: 9, scale: 'log2'}]
}).then(done, done.fail);
});
Expand Down
14 changes: 12 additions & 2 deletions modules/benchmarks_external/e2e_test/polymer_tree_perf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ describe('polymer tree benchmark', function() {

afterEach(verifyNoBrowserErrors);

it('should log the stats', function(done) {
it('should log the stats (create)', function(done) {
runClickBenchmark({
url: URL,
buttons: ['#destroyDom', '#createDom'],
id: 'polymer.tree',
id: 'polymer.tree.create',
params: [{name: 'depth', value: 9, scale: 'log2'}],
waitForAngular2: false
}).then(done, done.fail);
});

it('should log the stats (update)', function(done) {
runClickBenchmark({
url: URL,
buttons: ['#createDom'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the correct button?

id: 'polymer.tree.update',
params: [{name: 'depth', value: 9, scale: 'log2'}],
waitForAngular2: false
}).then(done, done.fail);
Expand Down
14 changes: 12 additions & 2 deletions modules/benchmarks_external/e2e_test/static_tree_perf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ describe('ng1.x tree benchmark', function() {

afterEach(verifyNoBrowserErrors);

it('should log the stats', function(done) {
it('should log the stats (create)', function(done) {
runClickBenchmark({
url: URL,
buttons: ['#destroyDom', '#createDom'],
id: 'ng1.static.tree',
id: 'ng1.static.tree.create',
params: [],
waitForAngular2: false
}).then(done, done.fail);
});

it('should log the stats (update)', function(done) {
runClickBenchmark({
url: URL,
buttons: ['#createDom'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

id: 'ng1.static.tree.update',
params: [],
waitForAngular2: false
}).then(done, done.fail);
Expand Down
14 changes: 12 additions & 2 deletions modules/benchmarks_external/e2e_test/tree_perf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ describe('ng1.x tree benchmark', function() {

afterEach(verifyNoBrowserErrors);

it('should log the stats', function(done) {
it('should log the stats (create)', function(done) {
runClickBenchmark({
url: URL,
buttons: ['#destroyDom', '#createDom'],
id: 'ng1.tree',
id: 'ng1.tree.create',
params: [{name: 'depth', value: 9, scale: 'log2'}],
waitForAngular2: false
}).then(done, done.fail);
});

it('should log the stats (update)', function(done) {
runClickBenchmark({
url: URL,
buttons: ['#createDom'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

id: 'ng1.tree.update',
params: [{name: 'depth', value: 9, scale: 'log2'}],
waitForAngular2: false
}).then(done, done.fail);
Expand Down
47 changes: 14 additions & 33 deletions modules/benchmarks_external/src/tree/polymer/binary_tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,22 @@
<template>
<span>
<span>{{data.value}}</span>
<!-- TODO(tbosch): use the builtin conditional template when it is available in Polymer 0.8 -->
<span id="leftTree"></span>
<span id="rightTree"></span>
<template is="dom-if" if="[[data.left]]">
<binary-tree data="[[data.left]]"></binary-tree>
</template>
<template is="dom-if" if="[[data.right]]">
<binary-tree data="[[data.right]]"></binary-tree>
</template>
</span>
</template>
</dom-module>
<script>
(function() {
Polymer({
is: 'binary-tree',
properties: {
data: Object
},
leftTree: null,
rightTree: null,
dataChanged: function() {
var data = this.data || {};
this._updateTree(data.left, 'leftTree');
this._updateTree(data.right, 'rightTree');
},
_updateTree: function(data, treeName) {
if (data) {
if (!this[treeName]) {
this[treeName] = document.createElement('binary-tree');
}
this[treeName].data = data;
this.$[treeName].appendChild(this[treeName]);
} else {
if (this[treeName]) this[treeName].remove();
this[treeName] = null;
}
},
properties: {
data: 'dataChanged'
}
});
})();
Polymer({
is: 'binary-tree',
properties: {
data: Object
},
leftTree: null,
rightTree: null
});
</script>
9 changes: 1 addition & 8 deletions modules/benchmarks_external/src/tree/polymer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
</head>
<body>

<h2>TODO</h2>
<ul>
<li>TODO: Does not use shadow DOM</li>
<li>TODO: Does not yet use builtin `if` construct as it uses a preview version of Polymer</li>
</ul

<h2>Params</h2>
<form>
Depth:
Expand All @@ -19,10 +13,9 @@ <h2>Params</h2>
<button>Apply</button>
</form>

<h2>Polymer JS 0.8-preview tree benchmark</h2>
<h2>Polymer JS 1.x tree benchmark</h2>
<root-tree></root-tree>


<script src="url_params_to_form.js" type="text/javascript"></script>

</body>
Expand Down
2 changes: 1 addition & 1 deletion modules/benchmarks_external/src/tree/tree_benchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ angular.module('app', [])
var transcludeFn;
return {
compile: function(element, attrs) {
var expr = $parse(attrs.treeIf);
var expr = $parse('!!' + attrs.treeIf);
var template = '<tree data="' + attrs.treeIf + '"></tree>';
var transclude;
return function($scope, $element, $attrs) {
Expand Down
2 changes: 2 additions & 0 deletions modules/upgrade/test/integration_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ export function main() {
scope: {title: '@'},
bindToController: true, template: '{{ctl.status}}',
require: 'ng1',
controllerAs: 'ctrl',
controller: Class({constructor: function() { this.status = 'WORKS'; }}),
link: function(scope, element, attrs, linkController) {
expect(scope.$root).toEqual($rootScope);
Expand Down Expand Up @@ -439,6 +440,7 @@ export function main() {
scope: {title: '@'},
bindToController: true, template: '{{parent.parent}}:{{ng1.status}}',
require: ['ng1', '^parent', '?^^notFound'],
controllerAs: 'ctrl',
controller: Class({constructor: function() { this.status = 'WORKS'; }}),
link: function(scope, element, attrs, linkControllers) {
expect(linkControllers[0].status).toEqual('WORKS');
Expand Down
108 changes: 36 additions & 72 deletions npm-shrinkwrap.clean.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"version": "5.0.0-alpha.4"
},
"angular": {
"version": "1.3.5"
"version": "1.4.7"
},
"angular-animate": {
"version": "1.3.5"
"version": "1.4.7"
},
"angular-mocks": {
"version": "1.3.5"
"version": "1.4.7"
},
"base64-js": {
"version": "0.0.8"
Expand Down Expand Up @@ -9346,28 +9346,6 @@
},
"ultron": {
"version": "1.0.2"
},
"bufferutil": {
"version": "1.2.1",
"dependencies": {
"bindings": {
"version": "1.2.1"
},
"nan": {
"version": "2.0.9"
}
}
},
"utf-8-validate": {
"version": "1.2.1",
"dependencies": {
"bindings": {
"version": "1.2.1"
},
"nan": {
"version": "2.0.9"
}
}
}
}
}
Expand Down Expand Up @@ -9488,28 +9466,6 @@
},
"ultron": {
"version": "1.0.2"
},
"bufferutil": {
"version": "1.2.1",
"dependencies": {
"bindings": {
"version": "1.2.1"
},
"nan": {
"version": "2.0.9"
}
}
},
"utf-8-validate": {
"version": "1.2.1",
"dependencies": {
"bindings": {
"version": "1.2.1"
},
"nan": {
"version": "2.0.9"
}
}
}
}
},
Expand Down Expand Up @@ -10532,13 +10488,13 @@
"version": "1.3.0"
},
"react": {
"version": "0.13.2",
"version": "0.14.0",
"dependencies": {
"envify": {
"version": "3.4.0",
"dependencies": {
"through": {
"version": "2.3.7"
"version": "2.3.8"
},
"jstransform": {
"version": "10.1.0",
Expand All @@ -10553,13 +10509,43 @@
"version": "0.1.31",
"dependencies": {
"amdefine": {
"version": "0.1.0"
"version": "1.0.0"
}
}
}
}
}
}
},
"fbjs": {
"version": "0.3.2",
"dependencies": {
"core-js": {
"version": "1.2.3"
},
"loose-envify": {
"version": "1.1.0",
"dependencies": {
"js-tokens": {
"version": "1.0.2"
}
}
},
"promise": {
"version": "7.0.4",
"dependencies": {
"asap": {
"version": "2.0.3"
}
}
},
"ua-parser-js": {
"version": "0.7.9"
},
"whatwg-fetch": {
"version": "0.9.0"
}
}
}
}
},
Expand Down Expand Up @@ -10651,28 +10637,6 @@
},
"ultron": {
"version": "1.0.2"
},
"bufferutil": {
"version": "1.2.1",
"dependencies": {
"bindings": {
"version": "1.2.1"
},
"nan": {
"version": "2.0.9"
}
}
},
"utf-8-validate": {
"version": "1.2.1",
"dependencies": {
"bindings": {
"version": "1.2.1"
},
"nan": {
"version": "2.0.9"
}
}
}
}
},
Expand Down
Loading