/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
@bug 7165725
@summary Tests if HTML parser can handle successive script tags in a line
and it does not call false text callback after script tags.
@run main bug7165725
*/
private static class GoldenElement {
this.goldenName = goldenName;
if (goldenChildren != null) {
} else {
this.goldenChildren = new ArrayList<>();
}
}
// throws RuntimeException if not ok
throw new RuntimeException("Bad structure: expected element name is '" + goldenName + "' but the actual name was '" + name + "'.");
}
if (childCount != goldenChildCount) {
for (int i = 0; i < childCount; i++) {
}
}
throw new RuntimeException("Bad structure: expected child count of element '" + goldenName + "' is '" + goldenChildCount + "' but the actual count was '" + childCount + "'.");
}
for (int i = 0; i < childCount; i++) {
}
}
}
public void run() {
try {
editorPane = new JEditorPane();
public Document createDefaultDocument() {
(AbstractDocument) super.createDefaultDocument();
return doc;
}
});
} catch (IOException ex) {
}
editorPane.setEditable(false);
setVisible(true);
}
});
public void run() {
dispose();
}
});
}
}
return "file:///" +
}
return sbcallback.getStringOneLine();
}
}
throw new RuntimeException("Failed to lookup script tags/attributes.");
throw new RuntimeException("Failed to lookup style tags.");
}
if (bodyIdx > 0) {
// There should be no Text(...) in this html
throw new RuntimeException("Unexpected text found.");
} else {
throw new RuntimeException("Failed to find body tag.");
}
}
return new GoldenElement("html",
new GoldenElement("head",
new GoldenElement("p-implied",
new GoldenElement("title"),
new GoldenElement("title"),
new GoldenElement("script"),
new GoldenElement("comment"),
new GoldenElement("script"),
new GoldenElement("script"),
new GoldenElement("comment"),
new GoldenElement("script"),
new GoldenElement("script"),
new GoldenElement("comment"),
new GoldenElement("script"),
new GoldenElement("content"))),
new GoldenElement("body",
new GoldenElement("p-implied",
new GoldenElement("content"))));
}
return new GoldenElement("html",
new GoldenElement("head",
new GoldenElement("p-implied",
new GoldenElement("title"),
new GoldenElement("title"),
new GoldenElement("content"))),
new GoldenElement("body",
new GoldenElement("form",
new GoldenElement("p-implied",
new GoldenElement("input"),
new GoldenElement("input"),
new GoldenElement("content"))),
new GoldenElement("p-implied",
new GoldenElement("script"),
new GoldenElement("comment"),
new GoldenElement("script"),
new GoldenElement("script"),
new GoldenElement("comment"),
new GoldenElement("script"),
new GoldenElement("content"))));
}
{
}
}
protected void indent() {
indentSize += 3;
}
protected void unIndent() {
}
}
}
}
a.getAttributeCount() + " attrs)");
indent();
}
unIndent();
}
a.getAttributeCount() + " attrs)");
}
}
}
}