@@ -168,5 +168,54 @@ public async Task ScreenPixelDepthShouldYield24()
168168 var result = await EvaluateComplexScriptAsync ( SetResult ( "screen.pixelDepth.toString()" ) ) ;
169169 Assert . AreEqual ( "24" , result ) ;
170170 }
171+
172+ [ Test ]
173+ public async Task PrototypeObjectOfHtmlDocumentIsCorrect ( )
174+ {
175+ var result = await EvaluateComplexScriptAsync ( SetResult ( "Object.getPrototypeOf(document).toString()" ) ) ;
176+ Assert . AreEqual ( "[object HTMLDocument]" , result ) ;
177+ }
178+
179+ [ Test ]
180+ public async Task PrototypeObjectOfDocumentIsCorrect ( )
181+ {
182+ var result = await EvaluateComplexScriptAsync ( SetResult ( "Object.getPrototypeOf(Object.getPrototypeOf(document)).toString()" ) ) ;
183+ Assert . AreEqual ( "[object Document]" , result ) ;
184+ }
185+
186+ [ Test ]
187+ public async Task PrototypeObjectOfNodeIsCorrect ( )
188+ {
189+ var result = await EvaluateComplexScriptAsync ( SetResult ( "Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(document))).toString()" ) ) ;
190+ Assert . AreEqual ( "[object Node]" , result ) ;
191+ }
192+
193+ [ Test ]
194+ public async Task PrototypeObjectOfEventTargetIsCorrect ( )
195+ {
196+ var result = await EvaluateComplexScriptAsync ( SetResult ( "Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(document)))).toString()" ) ) ;
197+ Assert . AreEqual ( "[object EventTarget]" , result ) ;
198+ }
199+
200+ [ Test ]
201+ public async Task PrototypeObjectOfObjectIsCorrect ( )
202+ {
203+ var result = await EvaluateComplexScriptAsync ( SetResult ( "Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(document))))).toString()" ) ) ;
204+ Assert . AreEqual ( "[object Object]" , result ) ;
205+ }
206+
207+ [ Test ]
208+ public async Task PrototypeObjectOfObjectLiteralIsCorrect ( )
209+ {
210+ var result = await EvaluateComplexScriptAsync ( SetResult ( "Object.getPrototypeOf({}).toString()" ) ) ;
211+ Assert . AreEqual ( "[object Object]" , result ) ;
212+ }
213+
214+ [ Test ]
215+ public async Task PrototypeObjectOfBodyIsCorrect ( )
216+ {
217+ var result = await EvaluateComplexScriptAsync ( SetResult ( "Object.getPrototypeOf(document.body).toString()" ) ) ;
218+ Assert . AreEqual ( "[object HTMLBodyElement]" , result ) ;
219+ }
171220 }
172221}
0 commit comments