2011-07-01 06:17:45 -04:00
|
|
|
/*
|
|
|
|
* Paper.js
|
|
|
|
*
|
|
|
|
* This file is part of Paper.js, a JavaScript Vector Graphics Library,
|
|
|
|
* based on Scriptographer.org and designed to be largely API compatible.
|
|
|
|
* http://paperjs.org/
|
|
|
|
* http://scriptographer.org/
|
|
|
|
*
|
|
|
|
* Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
|
|
|
|
* http://lehni.org/ & http://jonathanpuckey.com/
|
|
|
|
*
|
|
|
|
* Distributed under the MIT license. See LICENSE file for details.
|
|
|
|
*
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2011-05-16 08:33:15 -04:00
|
|
|
module('Project');
|
2011-02-12 12:07:14 -05:00
|
|
|
|
|
|
|
test('activate()', function() {
|
2011-05-20 09:08:17 -04:00
|
|
|
var project = new Project();
|
2011-05-16 08:33:15 -04:00
|
|
|
var secondDoc = new Project();
|
2011-05-20 09:08:17 -04:00
|
|
|
project.activate();
|
2011-02-12 12:07:14 -05:00
|
|
|
var path = new Path();
|
2011-05-07 12:46:06 -04:00
|
|
|
equals(function() {
|
2011-05-20 09:08:17 -04:00
|
|
|
return project.activeLayer.children[0] == path;
|
2011-05-07 12:46:06 -04:00
|
|
|
}, true);
|
|
|
|
equals(function() {
|
|
|
|
return secondDoc.activeLayer.children.length == 0;
|
|
|
|
}, true);
|
2011-02-12 12:07:14 -05:00
|
|
|
});
|