Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'dev-master' of github.com:yui/yui3 into dev-master

  • Loading branch information...
commit 69b9d4a0b1aaa30ee1cf8aebec7045ffa9faf2ea 2 parents 4a6f464 + 1b26af0
@davglass davglass authored
View
34 src/tabview/tests/perf/tabview-benchmark.js
@@ -0,0 +1,34 @@
+YUI.add('tabview-benchmark', function (Y) {
+ var suite = Y.BenchmarkSuite = new Benchmark.Suite();
+
+ suite.add('new Y.TabView()', function() {
+ var tabview = new Y.TabView({
+ children: [{
+ label: 'foo',
+ content: '<p>foo content</p>'
+ }, {
+ label: 'bar',
+ content: '<p>bar content</p>'
+ }, {
+ label: 'baz',
+ content: '<p>baz content</p>'
+ }]
+ });
+ });
+
+ suite.add('new Y.TabView().destroy', function() {
+ var tabview = new Y.TabView({
+ children: [{
+ label: 'foo',
+ content: '<p>foo content</p>'
+ }, {
+ label: 'bar',
+ content: '<p>bar content</p>'
+ }, {
+ label: 'baz',
+ content: '<p>baz content</p>'
+ }]
+ }).destroy(true);
+ });
+
+}, '@VERSION@', {requires: ['tabview']});
View
62 src/tabview/tests/perf/tabview.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Benchmarks</title>
+</head>
+<body class="yui3-skin-sam">
+
+<p><button id="start">Start Benchmarks</button></p>
+
+<div id="log"></div>
+<applet code="nano" archive="https://github.com/bestiejs/benchmark.js/raw/v1.0.0/nano.jar" style="display: none;"></applet>
+<script src="http://pieisgood.org/misc/benchmark/benchmark.js"></script>
+
+<script src="../../../../build/yui/yui.js"></script>
+<script>
+var Y = YUI({
+ modules: {
+ 'tabview-benchmark': {
+ fullpath: 'tabview-benchmark.js',
+ requires: ['tabview']
+ },
+
+ 'test-console': {
+ fullpath : '../../../common/tests/assets/test-console.js',
+ requires : ['console-filters'],
+ skinnable: true
+ },
+
+ 'skin-sam-test-console': {
+ fullpath: '../../../common/tests/assets/test-console.css',
+ type : 'css'
+ }
+ },
+
+ useBrowserConsole: false
+}).use('tabview-benchmark', 'test-console', function (Y) {
+ var suite = Y.BenchmarkSuite,
+ start = Y.one('#start');
+
+ suite.on('start', function () {
+ start.set('disabled', true);
+ Y.log('Starting benchmarks.');
+ });
+
+ suite.on('cycle', function (bench) {
+ Y.log(String(bench));
+ });
+
+ suite.on('complete', function () {
+ start.set('disabled', false);
+ Y.log('Finished.');
+ });
+
+ start.on('click', function () {
+ suite.run(true);
+ });
+});
+</script>
+
+</body>
+</html>
View
19 src/transition/tests/perf/transition-benchmark.js
@@ -0,0 +1,19 @@
+YUI.add('transition-benchmark', function (Y) {
+ var suite = Y.BenchmarkSuite = new Benchmark.Suite(),
+ testNode = Y.one('#demo');
+
+ suite.add('new Y.Transition()', function() {
+ new Y.Transition(demo, {
+ width: 0,
+ height: {
+ value: 0,
+ delay: 1
+ },
+ easing: 'ease-in',
+ duration: 500,
+ iterations: 10
+ })
+ });
+
+
+}, '@VERSION@', {requires: ['transition']});
View
71 src/transition/tests/perf/transition.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Benchmarks</title>
+
+ <style>
+ #demo {
+ background: #ccc;
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+</head>
+<body class="yui3-skin-sam">
+
+<p><button id="start">Start Benchmarks</button></p>
+
+<div id="log"></div>
+<div id="demo"></div>
+<applet code="nano" archive="https://github.com/bestiejs/benchmark.js/raw/v1.0.0/nano.jar" style="display: none;"></applet>
+<script src="http://pieisgood.org/misc/benchmark/benchmark.js"></script>
+
+<script src="../../../../build/yui/yui.js"></script>
+<script>
+var Y = YUI({
+ modules: {
+ 'transition-benchmark': {
+ fullpath: 'transition-benchmark.js',
+ requires: ['transition']
+ },
+
+ 'test-console': {
+ fullpath : '../../../common/tests/assets/test-console.js',
+ requires : ['console-filters'],
+ skinnable: true
+ },
+
+ 'skin-sam-test-console': {
+ fullpath: '../../../common/tests/assets/test-console.css',
+ type : 'css'
+ }
+ },
+
+ useBrowserConsole: false
+}).use('transition-benchmark', 'test-console', function (Y) {
+ var suite = Y.BenchmarkSuite,
+ start = Y.one('#start');
+
+ suite.on('start', function () {
+ start.set('disabled', true);
+ Y.log('Starting benchmarks.');
+ });
+
+ suite.on('cycle', function (bench) {
+ Y.log(String(bench));
+ });
+
+ suite.on('complete', function () {
+ start.set('disabled', false);
+ Y.log('Finished.');
+ });
+
+ start.on('click', function () {
+ suite.run(true);
+ });
+});
+</script>
+
+</body>
+</html>
View
5 src/transition/tests/unit/transition.html
@@ -774,14 +774,11 @@
node.transition({
easing: 'ease',
duration: 0.1,
- height: 0,
transform: 'rotate(180deg)'
}, function(e) {
test.resume(function() {
if (!(Y.UA.ie < 10)) {
- Y.Assert.areEqual(1, parseInt(e.elapsedTime * 10));
- node.setStyle('height', '100px');
- Y.Assert.areEqual('matrix(-1, -8.74228e-008, 8.74228e-008, -1, 0, 0)', node.getComputedStyle(Y.Transition._TRANSFORM));
+ Y.Assert.isNotUndefined(node.getComputedStyle(Y.Transition._TRANSFORM));
}
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.