haikuwebkit/LayoutTests/js/setPrototypeOf.html

11 lines
252 B
HTML
Raw Permalink Normal View History

ES6: Implement Object.setPrototypeOf https://bugs.webkit.org/show_bug.cgi?id=145202 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-05-20 Reviewed by Darin Adler. Source/JavaScriptCore: * runtime/JSGlobalObjectFunctions.h: * runtime/JSGlobalObjectFunctions.cpp: (JSC::globalFuncProtoSetter): (JSC::checkProtoSetterAccessAllowed): Extract a helper to share this code between __proto__ setter and setPrototypeOf. * runtime/ObjectConstructor.cpp: (JSC::objectConstructorSetPrototypeOf): Implementation is very similiar to __proto__ setter. LayoutTests: * http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt: Added. * http/tests/security/cross-frame-access-object-setPrototypeOf.html: Added. * http/tests/security/resources/cross-frame-iframe-for-object-setPrototypeOf-test.html: Added. Test covering cross origin restriction behavior. * js/Object-getOwnPropertyNames-expected.txt: * js/script-tests/Object-getOwnPropertyNames.js: Updated for the new exposed property. * js/cyclic-prototypes-expected.txt: * js/script-tests/cyclic-prototypes.js: Extend this test to include setPrototypeOf cyclic checks. Note that setPrototypeOf can still change the prototype where __proto__ cannot. * js/prototypes-expected.txt: * js/script-tests/prototypes.js: Extend this test to cover more types previously overlooked. * js/script-tests/setPrototypeOf.js: Added. (debugEval): (getObjectDescriptions.myFunction): (getObjectDescriptions): * js/setPrototypeOf-expected.txt: Added. * js/setPrototypeOf.html: Added. Test coverage for all the different object / prototype combinations. This is modeled after the other browser tests with coverage of a few more basic functionality tests and object types. Canonical link: https://commits.webkit.org/163221@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-20 17:23:03 +00:00
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script src="script-tests/setPrototypeOf.js"></script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>