From: Robert Konigsberg Date: Thu, 22 Nov 2012 18:01:40 +0000 (-0500) Subject: Add test case to verify that strings-as-divs are allowed. X-Git-Tag: v1.0.0~169^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=747681e6141976b215947e159699d370237d2895;p=dygraphs.git Add test case to verify that strings-as-divs are allowed. --- diff --git a/auto_tests/tests/pathological_cases.js b/auto_tests/tests/pathological_cases.js index 9d24b99..83cba83 100644 --- a/auto_tests/tests/pathological_cases.js +++ b/auto_tests/tests/pathological_cases.js @@ -49,41 +49,9 @@ pathologicalCasesTestCase.prototype.testNullLegend = function() { var g = new Dygraph(graph, data, opts); }; -pathologicalCasesTestCase.prototype.testNoWidth = function() { - var opts = { - height: 300, - }; - var data = "X,Y\n" + - "1,2\n"; - - var graph = document.getElementById("graph"); - var g = new Dygraph(graph, data, opts); - assertEquals(480, g.getOption("width")); - assertEquals(300, g.getOption("height")); -}; - - -pathologicalCasesTestCase.prototype.testNoHeight = function() { - var opts = { - width: 479, - }; +pathologicalCasesTestCase.prototype.testDivAsString = function() { var data = "X,Y\n" + "1,2\n"; - var graph = document.getElementById("graph"); - var g = new Dygraph(graph, data, opts); - assertEquals(479, g.getOption("width")); - assertEquals(320, g.getOption("height")); -}; - -pathologicalCasesTestCase.prototype.testNoWidthOrHeight = function() { - var opts = { - }; - var data = "X,Y\n" + - "1,2\n"; - - var graph = document.getElementById("graph"); - var g = new Dygraph(graph, data, opts); - assertEquals(480, g.getOption("width")); - assertEquals(320, g.getOption("height")); -}; + var g = new Dygraph('graph', data, {}); +}