unittests/tests/widget.js
author hamidouk
Fri, 21 Oct 2011 11:21:35 +0200
branchpopcorn-port
changeset 111 df08c7f9535c
parent 74 d7a7d7216371
child 114 eda061f1aa75
permissions -rw-r--r--
added a basic layout manager.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
74
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
     1
/* test module for base widgets */
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
     2
function test_widget() {
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
     3
  module("Base widget testing", 
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
     4
  {setup : function() {
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
     5
    this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4");
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
     6
    
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
     7
    this.dt = new IriSP.DataLoader();
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
     8
    this.ser = new IriSP.JSONSerializer(this.dt, "/url");
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
     9
  } }
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    10
  );
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    11
  
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    12
  test("test initialisation", function() {
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    13
    var wid = new IriSP.Widget(this.Popcorn, {parent: "widget-div"}, this.ser);
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    14
    deepEqual(wid._config, {parent: "widget-div"}, "Check if the parent div is set correctly");
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    15
    
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    16
  });
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    17
  
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    18
  
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents:
diff changeset
    19
};