diff --git a/src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java b/src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java index a4af5efe78..5d4bab5d50 100644 --- a/src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java +++ b/src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java @@ -18070,4 +18070,60 @@ public void fileList() throws Exception { public void fileList2() throws Exception { testString("", "document.getElementById('fileItem').files"); } + + /** + * Test {@link org.htmlunit.javascript.host.PluginArray}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "constructor(),item(),length[GCE],namedItem(),refresh()", + EDGE = "constructor(),item(),length[GCE],namedItem(),refresh()", + FF = "constructor(),item(),length[GCE],namedItem(),refresh()", + FF_ESR = "constructor(),item(),length[GCE],namedItem(),refresh()") + public void pluginArray() throws Exception { + testString("", "navigator.plugins"); + } + + /** + * Test {@link org.htmlunit.javascript.host.Plugin}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "constructor(),description[GCE],filename[GCE],item(),length[GCE],name[GCE],namedItem()", + EDGE = "constructor(),description[GCE],filename[GCE],item(),length[GCE],name[GCE],namedItem()", + FF = "constructor(),description[GCE],filename[GCE],item(),length[GCE],name[GCE],namedItem()", + FF_ESR = "constructor(),description[GCE],filename[GCE],item(),length[GCE],name[GCE],namedItem()") + public void plugin() throws Exception { + testString("", "navigator.plugins[0]"); + } + + /** + * Test {@link org.htmlunit.javascript.host.MimeTypeArray}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "constructor(),item(),length[GCE],namedItem()", + EDGE = "constructor(),item(),length[GCE],namedItem()", + FF = "constructor(),item(),length[GCE],namedItem()", + FF_ESR = "constructor(),item(),length[GCE],namedItem()") + public void mimeTypeArray() throws Exception { + testString("", "navigator.mimeTypes"); + } + + /** + * Test {@link org.htmlunit.javascript.host.MimeType}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "constructor(),description[GCE],enabledPlugin[GCE],suffixes[GCE],type[GCE]", + EDGE = "constructor(),description[GCE],enabledPlugin[GCE],suffixes[GCE],type[GCE]", + FF = "constructor(),description[GCE],enabledPlugin[GCE],suffixes[GCE],type[GCE]", + FF_ESR = "constructor(),description[GCE],enabledPlugin[GCE],suffixes[GCE],type[GCE]") + public void mimeType() throws Exception { + testString("", "navigator.mimeTypes[0]"); + } } diff --git a/src/test/java/org/htmlunit/general/ElementOwnPropertySymbolsTest.java b/src/test/java/org/htmlunit/general/ElementOwnPropertySymbolsTest.java index ecf9fc7988..4736d8a1bb 100644 --- a/src/test/java/org/htmlunit/general/ElementOwnPropertySymbolsTest.java +++ b/src/test/java/org/htmlunit/general/ElementOwnPropertySymbolsTest.java @@ -3215,4 +3215,60 @@ public void fileList() throws Exception { public void fileList2() throws Exception { testString("", "document.getElementById('fileItem').files"); } + + /** + * Test {@link org.htmlunit.javascript.host.PluginArray}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]", + EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]", + FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]", + FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]") + public void pluginArray() throws Exception { + testString("", "navigator.plugins"); + } + + /** + * Test {@link org.htmlunit.javascript.host.Plugin}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]", + EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]", + FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]", + FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]") + public void plugin() throws Exception { + testString("", "navigator.plugins[0]"); + } + + /** + * Test {@link org.htmlunit.javascript.host.MimeTypeArray}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]", + EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]", + FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]", + FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]") + public void mimeTypeArray() throws Exception { + testString("", "navigator.mimeTypes"); + } + + /** + * Test {@link org.htmlunit.javascript.host.MimeType}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeType]", + EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeType]", + FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeType]", + FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeType]") + public void mimeType() throws Exception { + testString("", "navigator.mimeTypes[0]"); + } } diff --git a/src/test/java/org/htmlunit/general/ElementPropertiesTest.java b/src/test/java/org/htmlunit/general/ElementPropertiesTest.java index 64f4e5726c..d91b864c0c 100644 --- a/src/test/java/org/htmlunit/general/ElementPropertiesTest.java +++ b/src/test/java/org/htmlunit/general/ElementPropertiesTest.java @@ -9181,4 +9181,60 @@ public void fileList() throws Exception { public void fileList2() throws Exception { testString("", "document.getElementById('fileItem').files"); } + + /** + * Test {@link org.htmlunit.javascript.host.PluginArray}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "0,1,2,3,4,item(),length,namedItem(),refresh()", + EDGE = "0,1,2,3,4,item(),length,namedItem(),refresh()", + FF = "0,1,2,3,4,item(),length,namedItem(),refresh()", + FF_ESR = "0,1,2,3,4,item(),length,namedItem(),refresh()") + public void pluginArray() throws Exception { + testString("", "navigator.plugins"); + } + + /** + * Test {@link org.htmlunit.javascript.host.Plugin}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "0,1,description,filename,item(),length,name,namedItem()", + EDGE = "0,1,description,filename,item(),length,name,namedItem()", + FF = "0,1,description,filename,item(),length,name,namedItem()", + FF_ESR = "0,1,description,filename,item(),length,name,namedItem()") + public void plugin() throws Exception { + testString("", "navigator.plugins[0]"); + } + + /** + * Test {@link org.htmlunit.javascript.host.MimeTypeArray}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "0,1,item(),length,namedItem()", + EDGE = "0,1,item(),length,namedItem()", + FF = "0,1,item(),length,namedItem()", + FF_ESR = "0,1,item(),length,namedItem()") + public void mimeTypeArray() throws Exception { + testString("", "navigator.mimeTypes"); + } + + /** + * Test {@link org.htmlunit.javascript.host.MimeType}. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(CHROME = "description,enabledPlugin,suffixes,type", + EDGE = "description,enabledPlugin,suffixes,type", + FF = "description,enabledPlugin,suffixes,type", + FF_ESR = "description,enabledPlugin,suffixes,type") + public void mimeType() throws Exception { + testString("", "navigator.mimeTypes[0]"); + } }