2 * @fileoverview Tests for the plugins option.
4 * @author konigsberg@google.com (Robert Konigsberg)
6 var pluginsTestCase
= TestCase("plugins");
8 pluginsTestCase
.prototype.setUp
= function() {
9 document
.body
.innerHTML
= "<div id='graph'></div>";
12 pluginsTestCase
.prototype.tearDown
= function() {
15 pluginsTestCase
.prototype.testWillDrawChart
= function() {
18 var plugin
= (function() {
22 p
.prototype.activate
= function(g
) {
24 willDrawChart
: this.willDrawChart
28 p
.prototype.willDrawChart
= function(e
) {
35 var data
= "X,Y1,Y2\n" +
42 var graph
= document
.getElementById("graph");
43 var g
= new Dygraph(graph
, data
, { plugins
: [ plugin
] });
45 assertEquals(1, draw
);