Skip to content

Commit 4104d0a

Browse files
committed
add plugin/mimeType
1 parent 02cc4d4 commit 4104d0a

File tree

3 files changed

+168
-0
lines changed

3 files changed

+168
-0
lines changed

src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18070,4 +18070,60 @@ public void fileList() throws Exception {
1807018070
public void fileList2() throws Exception {
1807118071
testString("", "document.getElementById('fileItem').files");
1807218072
}
18073+
18074+
/**
18075+
* Test {@link org.htmlunit.javascript.host.PluginArray}.
18076+
*
18077+
* @throws Exception if an error occurs
18078+
*/
18079+
@Test
18080+
@Alerts(CHROME = "constructor(),item(),length[GCE],namedItem(),refresh()",
18081+
EDGE = "constructor(),item(),length[GCE],namedItem(),refresh()",
18082+
FF = "constructor(),item(),length[GCE],namedItem(),refresh()",
18083+
FF_ESR = "constructor(),item(),length[GCE],namedItem(),refresh()")
18084+
public void pluginArray() throws Exception {
18085+
testString("", "navigator.plugins");
18086+
}
18087+
18088+
/**
18089+
* Test {@link org.htmlunit.javascript.host.Plugin}.
18090+
*
18091+
* @throws Exception if an error occurs
18092+
*/
18093+
@Test
18094+
@Alerts(CHROME = "constructor(),description[GCE],filename[GCE],item(),length[GCE],name[GCE],namedItem()",
18095+
EDGE = "constructor(),description[GCE],filename[GCE],item(),length[GCE],name[GCE],namedItem()",
18096+
FF = "constructor(),description[GCE],filename[GCE],item(),length[GCE],name[GCE],namedItem()",
18097+
FF_ESR = "constructor(),description[GCE],filename[GCE],item(),length[GCE],name[GCE],namedItem()")
18098+
public void plugin() throws Exception {
18099+
testString("", "navigator.plugins[0]");
18100+
}
18101+
18102+
/**
18103+
* Test {@link org.htmlunit.javascript.host.MimeTypeArray}.
18104+
*
18105+
* @throws Exception if an error occurs
18106+
*/
18107+
@Test
18108+
@Alerts(CHROME = "constructor(),item(),length[GCE],namedItem()",
18109+
EDGE = "constructor(),item(),length[GCE],namedItem()",
18110+
FF = "constructor(),item(),length[GCE],namedItem()",
18111+
FF_ESR = "constructor(),item(),length[GCE],namedItem()")
18112+
public void mimeTypeArray() throws Exception {
18113+
testString("", "navigator.mimeTypes");
18114+
}
18115+
18116+
/**
18117+
* Test {@link org.htmlunit.javascript.host.MimeType}.
18118+
*
18119+
* @throws Exception if an error occurs
18120+
*/
18121+
@Test
18122+
@Alerts(CHROME = "constructor(),description[GCE],enabledPlugin[GCE],suffixes[GCE],type[GCE]",
18123+
EDGE = "constructor(),description[GCE],enabledPlugin[GCE],suffixes[GCE],type[GCE]",
18124+
FF = "constructor(),description[GCE],enabledPlugin[GCE],suffixes[GCE],type[GCE]",
18125+
FF_ESR = "constructor(),description[GCE],enabledPlugin[GCE],suffixes[GCE],type[GCE]")
18126+
public void mimeType() throws Exception {
18127+
testString("", "navigator.mimeTypes[0]");
18128+
}
1807318129
}

src/test/java/org/htmlunit/general/ElementOwnPropertySymbolsTest.java

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3215,4 +3215,60 @@ public void fileList() throws Exception {
32153215
public void fileList2() throws Exception {
32163216
testString("", "document.getElementById('fileItem').files");
32173217
}
3218+
3219+
/**
3220+
* Test {@link org.htmlunit.javascript.host.PluginArray}.
3221+
*
3222+
* @throws Exception if an error occurs
3223+
*/
3224+
@Test
3225+
@Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]",
3226+
EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]",
3227+
FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]",
3228+
FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]")
3229+
public void pluginArray() throws Exception {
3230+
testString("", "navigator.plugins");
3231+
}
3232+
3233+
/**
3234+
* Test {@link org.htmlunit.javascript.host.Plugin}.
3235+
*
3236+
* @throws Exception if an error occurs
3237+
*/
3238+
@Test
3239+
@Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]",
3240+
EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]",
3241+
FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]",
3242+
FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]")
3243+
public void plugin() throws Exception {
3244+
testString("", "navigator.plugins[0]");
3245+
}
3246+
3247+
/**
3248+
* Test {@link org.htmlunit.javascript.host.MimeTypeArray}.
3249+
*
3250+
* @throws Exception if an error occurs
3251+
*/
3252+
@Test
3253+
@Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]",
3254+
EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]",
3255+
FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]",
3256+
FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]")
3257+
public void mimeTypeArray() throws Exception {
3258+
testString("", "navigator.mimeTypes");
3259+
}
3260+
3261+
/**
3262+
* Test {@link org.htmlunit.javascript.host.MimeType}.
3263+
*
3264+
* @throws Exception if an error occurs
3265+
*/
3266+
@Test
3267+
@Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeType]",
3268+
EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeType]",
3269+
FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeType]",
3270+
FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeType]")
3271+
public void mimeType() throws Exception {
3272+
testString("", "navigator.mimeTypes[0]");
3273+
}
32183274
}

src/test/java/org/htmlunit/general/ElementPropertiesTest.java

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9181,4 +9181,60 @@ public void fileList() throws Exception {
91819181
public void fileList2() throws Exception {
91829182
testString("", "document.getElementById('fileItem').files");
91839183
}
9184+
9185+
/**
9186+
* Test {@link org.htmlunit.javascript.host.PluginArray}.
9187+
*
9188+
* @throws Exception if an error occurs
9189+
*/
9190+
@Test
9191+
@Alerts(CHROME = "0,1,2,3,4,item(),length,namedItem(),refresh()",
9192+
EDGE = "0,1,2,3,4,item(),length,namedItem(),refresh()",
9193+
FF = "0,1,2,3,4,item(),length,namedItem(),refresh()",
9194+
FF_ESR = "0,1,2,3,4,item(),length,namedItem(),refresh()")
9195+
public void pluginArray() throws Exception {
9196+
testString("", "navigator.plugins");
9197+
}
9198+
9199+
/**
9200+
* Test {@link org.htmlunit.javascript.host.Plugin}.
9201+
*
9202+
* @throws Exception if an error occurs
9203+
*/
9204+
@Test
9205+
@Alerts(CHROME = "0,1,description,filename,item(),length,name,namedItem()",
9206+
EDGE = "0,1,description,filename,item(),length,name,namedItem()",
9207+
FF = "0,1,description,filename,item(),length,name,namedItem()",
9208+
FF_ESR = "0,1,description,filename,item(),length,name,namedItem()")
9209+
public void plugin() throws Exception {
9210+
testString("", "navigator.plugins[0]");
9211+
}
9212+
9213+
/**
9214+
* Test {@link org.htmlunit.javascript.host.MimeTypeArray}.
9215+
*
9216+
* @throws Exception if an error occurs
9217+
*/
9218+
@Test
9219+
@Alerts(CHROME = "0,1,item(),length,namedItem()",
9220+
EDGE = "0,1,item(),length,namedItem()",
9221+
FF = "0,1,item(),length,namedItem()",
9222+
FF_ESR = "0,1,item(),length,namedItem()")
9223+
public void mimeTypeArray() throws Exception {
9224+
testString("", "navigator.mimeTypes");
9225+
}
9226+
9227+
/**
9228+
* Test {@link org.htmlunit.javascript.host.MimeType}.
9229+
*
9230+
* @throws Exception if an error occurs
9231+
*/
9232+
@Test
9233+
@Alerts(CHROME = "description,enabledPlugin,suffixes,type",
9234+
EDGE = "description,enabledPlugin,suffixes,type",
9235+
FF = "description,enabledPlugin,suffixes,type",
9236+
FF_ESR = "description,enabledPlugin,suffixes,type")
9237+
public void mimeType() throws Exception {
9238+
testString("", "navigator.mimeTypes[0]");
9239+
}
91849240
}

0 commit comments

Comments
 (0)