Permalink
Browse files

added 74 tests to trackliner, and brought it up to par with popcorn-m…

…aker's trackliner
  • Loading branch information...
1 parent 8dd6303 commit 1235ed6da2780da7215f8f66a6ec48f897d2ed83 @ScottDowne ScottDowne committed Dec 14, 2011
Showing with 9,177 additions and 267 deletions.
  1. +5 −24 index.html
  2. +33 −0 test/index.html
  3. +7,179 −0 test/jquery.js
  4. +148 −0 test/qunit/qunit.css
  5. +1,265 −0 test/qunit/qunit.js
  6. +186 −0 test/trackLiner.unit.js
  7. +56 −14 trackliner.css
  8. +305 −229 trackliner.js
View
@@ -15,31 +15,13 @@
<script>
document.addEventListener('DOMContentLoaded', function (e) {
- var duration = 10; // seconds
var trackline = new TrackLiner({
element: "container",
- scale: 100, //pixels
- duration: duration,
- dynamicTrackCreation: true,
- restrictToKnownPlugins: true,
+ dynamicTrackCreation: true
});
-
- trackline.createTrack('Should\'t Work').createTrackEvent( 'default', { start: 1, end: 5, label: 'awesome' } );
- trackline.createTrack('Should Work 1', 'default').createTrackEvent( { start: 0, end: 2,
- classes: ['test-class'],
- });
- trackline.createTrack('Should Work 2', 'default').createTrackEvent( 'default', {
- start: 4,
- end: 7,
- css: {
- font: '12pt Helvetica',
- fontWeight: 'bold',
- color: '#000',
- },
- label: 'LOL!',
- });
- trackline.createTrack();
+
+ trackline.addTrack( trackline.createTrack() );
var elems = document.getElementsByClassName('droppable');
for (var i=0; i<elems.length; ++i) {
@@ -64,11 +46,10 @@
</style>
</head>
<body>
- <div id="container" style="height: 50%;">
+ <div id="container" style="width: 100%; height: 50%;">
</div>
<div id="droppables">
- <div class="droppable" data-trackliner-type="default">Should Work</div>
- <div class="droppable" data-trackliner-type="default2">Shouldn't Work</div>
+ <div class="droppable">Drag me!</div>
</div>
</body>
</html>
View
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Popcorn API</title>
+ <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
+ <script src="../external/jquery.js"></script>
+ <script src="../external/jquery-ui.js"></script>
+ <link rel="stylesheet" type="text/css" href="../external/jquery-ui.css"/>
+
+ <script src="qunit/qunit.js"></script>
+
+ <link rel="stylesheet" href="../trackLiner.css" type="text/css" media="screen">
+ <script src="../trackLiner.js"></script>
+ <script src="trackliner.unit.js"></script>
+</head>
+<body>
+ <h1 id="qunit-header">
+ TrackLiner.js API
+ </h1>
+ <h2 id="qunit-banner"></h2>
+ <div id="qunit-testrunner-toolbar"></div>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+ <div id="qunit-fixture"></div>
+
+ <br />
+ <div id="container" style="width: 100%; height: 100px;"></div>
+ <div id="droppables">
+ <div class="droppable">Drag me!</div>
+ </div>
+
+</body>
+</html>
Oops, something went wrong.

0 comments on commit 1235ed6

Please sign in to comment.