Permalink
Browse files

Change parameter order for `Movie`

  • Loading branch information...
1 parent e4805a9 commit d35e0b9dd155c99ee2a2582fb26c9660d97ca2fb @davidaurelio davidaurelio committed Mar 14, 2013
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/runner/environment.js
  2. +1 −1 src/runner/movie.js
  3. +3 −3 test/movie-spec.js
View
2 src/runner/environment.js
@@ -100,7 +100,7 @@ define([
exports.KeyframeAnimation = bindConstructorToParameters(KeyframeAnimation, [stage]);
exports.Bitmap = bindConstructorToParameters(Bitmap, [assetLoader]);
exports.FontFamily = bindConstructorToParameters(FontFamily, [assetLoader]);
- exports.Movie = bindConstructorToParameters(Movie, [stage]);
+ exports.Movie = bindConstructorToParameters(Movie, [stage, null]);
exports.Sprite = bindConstructorToParameters(Sprite, [assetLoader]);
exports.Video = bindConstructorToParameters(Video, [assetLoader]);
exports.Audio = bindConstructorToParameters(Audio, [assetLoader]);
View
2 src/runner/movie.js
@@ -23,7 +23,7 @@ define([
* @mixes Timeline
* @mixes displayList.timelineMethods
*/
- function Movie(root, url, callback, displayList) {
+ function Movie(root, displayList, url, callback) {
AssetDisplayObject.call(this, null, url, callback);
if (!displayList) {
View
6 test/movie-spec.js
@@ -8,7 +8,7 @@ define([
describe('Movie', function() {
testDisplayList(function(displayList) {
- return new Movie({}, null, null, displayList);
+ return new Movie({}, displayList, null, null, null);
});
it('Sets its root to first argument [usually bound by environment.js]', function() {
@@ -23,8 +23,8 @@ define([
};
var url = 'http://abc.def/pa/t/h.js';
var callback = function() {};
- var m = new Movie(root, url, callback);
- expect(root.loadSubMovie).toHaveBeenCalled();
+ var m = new Movie(root, null, url, callback);
+ expect(root.loadSubMovie.mostRecentCall.args[0]).toBe(url);
});
testLifeCycle(function() { return new Movie({}); });

0 comments on commit d35e0b9

Please sign in to comment.