langtools/test/jdk/javadoc/doclet/testFramesNoFrames/TestFramesNoFrames.java
changeset 40592 83e85c302cfc
parent 40508 74ef30d16fb9
child 40599 be40838eb215
--- a/langtools/test/jdk/javadoc/doclet/testFramesNoFrames/TestFramesNoFrames.java	Wed Aug 24 12:23:10 2016 -0700
+++ b/langtools/test/jdk/javadoc/doclet/testFramesNoFrames/TestFramesNoFrames.java	Wed Aug 24 15:40:35 2016 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8162353
+ * @bug 8162353 8164747
  * @summary javadoc should provide a way to disable use of frames
  * @library /tools/lib ../lib
  * @modules
@@ -283,6 +283,19 @@
             // this file is only generated when not in frames mode
             checkFiles(!frames,
                     "allclasses.html");
+
+            if (frames) {
+                checkOutput("allclasses-frame.html", true,
+                        classes.stream()
+                            .map(c -> "title=\"class in " + packagePart(c) + "\" target=\"classFrame\">" + classPart(c) + "</a>")
+                            .toArray(String[]::new));
+                checkOutput("allclasses-noframe.html", false,
+                            "target=\"classFrame\">");
+            } else {
+                checkOutput("allclasses.html", false,
+                            "target=\"classFrame\">");
+
+            }
         }
 
         private void checkFrameFiles() {
@@ -367,6 +380,11 @@
                 .count();
         }
 
+        private String classPart(String className) {
+            int lastDot = className.lastIndexOf(".");
+            return className.substring(lastDot + 1);
+        }
+
         private String packagePart(String className) {
             int slash = className.indexOf("/");
             int lastDot = className.lastIndexOf(".");