summaryrefslogtreecommitdiff
path: root/test/scaladoc/scalacheck/IndexTest.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-01-08 23:20:04 +0100
committerFelix Mulder <felix.mulder@gmail.com>2016-02-17 08:25:29 +0100
commit7b07a78cc0831a08f2d39a259dec2454c7d4cc1e (patch)
treeb90dd022688b5fec4a0a39fce2e4db9fb1aed5a7 /test/scaladoc/scalacheck/IndexTest.scala
parentc524f18ee4959f6fe8297971fc882e63468c4317 (diff)
downloadscala-7b07a78cc0831a08f2d39a259dec2454c7d4cc1e.tar.gz
scala-7b07a78cc0831a08f2d39a259dec2454c7d4cc1e.tar.bz2
scala-7b07a78cc0831a08f2d39a259dec2454c7d4cc1e.zip
Scaladoc: Add new search, featuring entity and member search
This commit adds a revamped search function for the scaladoc tool. It also contains a number of small fixes for HTML-layout and JavaScript issues. The search is implemented by enhancing the scheduler and using JavaScript promises. List of changes/additions: * Revamped search functionality - Search members as well as entities - Preserve keyboard navigation - Scroll to selected entity if outside of viewport - Non-blocking, cancelable * Display of library name (top left) * Refactored scheduler * Cleanup of HTML layout - Remove left pane - Better mobile layout, no need for dynamic offsets - Remove unused element classes - Remove iframe structure - Better layout for kinds
Diffstat (limited to 'test/scaladoc/scalacheck/IndexTest.scala')
-rw-r--r--test/scaladoc/scalacheck/IndexTest.scala12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/scaladoc/scalacheck/IndexTest.scala b/test/scaladoc/scalacheck/IndexTest.scala
index 7dbd2103a6..036586c21d 100644
--- a/test/scaladoc/scalacheck/IndexTest.scala
+++ b/test/scaladoc/scalacheck/IndexTest.scala
@@ -1,6 +1,7 @@
import org.scalacheck._
import org.scalacheck.Prop._
+import scala.tools.nsc.ScalaDocReporter
import scala.tools.nsc.doc
import scala.tools.nsc.doc.html.page.Index
import java.net.{URLClassLoader, URLDecoder}
@@ -47,7 +48,8 @@ object Test extends Properties("Index") {
maybeUniverse match {
case Some(universe) => {
- val index = new Index(universe, indexModelFactory.makeIndex(universe))
+ val reporter = new ScalaDocReporter(universe.settings)
+ val index = new Index(universe, indexModelFactory.makeIndex(universe), reporter)
return Some(index)
}
case _ => return None
@@ -71,14 +73,6 @@ object Test extends Properties("Index") {
case None => false
}
}
- property("browser contains a script element") = {
- createIndex("src/scaladoc/scala/tools/nsc/doc/html/page/Index.scala") match {
- case Some(index) =>
- (index.browser \ "script").size == 1
-
- case None => false
- }
- }
property("package objects in index") = {
createIndex("test/scaladoc/resources/SI-5558.scala") match {
case Some(index) =>