summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
authorKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-04-20 14:37:39 +0000
committerKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-04-20 14:37:39 +0000
commitb477d7389bba6d53f18f9ea3defd445013f24df3 (patch)
tree58265a26bbc8288e37c08e54d8e8238d6782f23e /test/scaladoc
parent5485932c5a822c2761682326381217697eb2ae4e (diff)
downloadscala-b477d7389bba6d53f18f9ea3defd445013f24df3.tar.gz
scala-b477d7389bba6d53f18f9ea3defd445013f24df3.tar.bz2
scala-b477d7389bba6d53f18f9ea3defd445013f24df3.zip
[scaladoc] kindFilter should switch show/hide a...
[scaladoc] kindFilter should switch show/hide anchor of package. Closes #4463. Review by malayeri.
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/javascript/package.html1
-rw-r--r--test/scaladoc/javascript/test-index.html35
-rw-r--r--test/scaladoc/javascript/test-index.js17
3 files changed, 53 insertions, 0 deletions
diff --git a/test/scaladoc/javascript/package.html b/test/scaladoc/javascript/package.html
new file mode 100644
index 0000000000..421376db9e
--- /dev/null
+++ b/test/scaladoc/javascript/package.html
@@ -0,0 +1 @@
+dummy
diff --git a/test/scaladoc/javascript/test-index.html b/test/scaladoc/javascript/test-index.html
new file mode 100644
index 0000000000..42cbc8cc09
--- /dev/null
+++ b/test/scaladoc/javascript/test-index.html
@@ -0,0 +1,35 @@
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" media="screen"
+ href="http://code.jquery.com/qunit/git/qunit.css" />
+ <script type="text/javascript"
+ src="http://code.jquery.com/qunit/git/qunit.js"></script>
+ <script type="text/javascript"
+ src="../../../src/compiler/scala/tools/nsc/doc/html/resource/lib/jquery.js"></script>
+ <script src="../../../src/compiler/scala/tools/nsc/doc/html/resource/lib/jquery.layout.js"></script>
+ <script src="../../../src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js"></script>
+ <script type="text/javascript"
+ src="../../../src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js"></script>
+ </head>
+ <body>
+ <h1 id="qunit-header">QUnit example</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>
+ <div id="browser" class="ui-layout-west">
+ <div class="ui-west-center">
+ <div id="tpl">
+ <ol class="templates">
+ <li>template</li>
+ </ol>
+ </div>
+ </div>
+ </div>
+ <div id="content" class="ui-layout-center">
+ <iframe name="template"></iframe>
+ </div>
+ <script type="text/javascript" src="test-index.js"></script>
+ </body>
+</html>
diff --git a/test/scaladoc/javascript/test-index.js b/test/scaladoc/javascript/test-index.js
new file mode 100644
index 0000000000..121366c931
--- /dev/null
+++ b/test/scaladoc/javascript/test-index.js
@@ -0,0 +1,17 @@
+Index.PACKAGES = { pkg1: [ { 'class': 'pkg1/Foo.html', name: 'pkg1.Foo' } ] };
+
+asyncTest('Trac #4463 - kindFilter', function () {
+ setTimeout(function () {
+ start();
+
+ equal($('#tpl ol.templates:visible').size(), 1);
+
+ kindFilter('packs');
+ equal($('#tpl ol.templates:visible').size(), 0);
+ equal($('#tpl li.pack a.packhide').text(), 'show');
+
+ kindFilter('all');
+ equal($('#tpl ol.templates:visible').size(), 1);
+ equal($('#tpl li.pack a.packhide').text(), 'hide');
+ }, 1000);
+});