Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
WebCore:
Reviewed by Darin. Patch for http://bugs.webkit.org/show_bug.cgi?id=16637 Acid3 expects ExeceptionCode constants to be defined on DOMException objects - Make DOMException a real JS object. Test: fast/dom/DOMException/prototype-object.html * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: This is no longer needed as the autogenerated classes now includes the constructor. * bindings/js/JSDOMExceptionConstructor.cpp: Removed. * bindings/js/JSDOMExceptionConstructor.h: Removed. Create on demand and use the new class for DOMExceptions. * bindings/js/kjs_binding.cpp: (KJS::setDOMException): Remove no longer needed custom constructor getter. * bindings/js/kjs_window.cpp: (KJS::Window::getValueProperty): Don't expose DOMCoreException as the name of class by special casing the user visible class name to be DOMException. * bindings/scripts/CodeGeneratorJS.pm: The DOMException class/file needs to be named DOMCoreException because there is name conflict with one of the Objective-C bindings classes. It should be renamed to DOMException when the Objective-C bindings are moved into WebKit. * dom/DOMCoreException.cpp: Added. (WebCore::DOMCoreException::DOMCoreException): (WebCore::DOMCoreException::toString): * dom/DOMCoreException.h: Added. (WebCore::DOMCoreException::): (WebCore::DOMCoreException::code): (WebCore::DOMCoreException::name): (WebCore::DOMCoreException::message): * dom/DOMCoreException.idl: Added. * page/DOMWindow.idl: LayoutTests: Reviewed by Darin. Test for http://bugs.webkit.org/show_bug.cgi?id=16637 Acid3 expects ExeceptionCode constants to be defined on DOMException objects * fast/dom/DOMException: Added. * fast/dom/DOMException/prototype-object-expected.txt: Added. * fast/dom/DOMException/prototype-object.html: Added. * fast/dom/DOMException/resources: Added. * fast/dom/DOMException/resources/prototype-object.js: Added. * fast/dom/Window/window-properties-expected.txt: * http/tests/xmlhttprequest/connection-error-sync-expected.txt: Canonical link: https://commits.webkit.org/22897@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
18 changed files
with
395 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,16 @@ | ||
DOMException needs a real prototype: http://bugs.webkit.org/show_bug.cgi?id=16637 | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS e.toString() is "Error: HIERARCHY_REQUEST_ERR: DOM Exception 3" | ||
PASS Object.prototype.toString.call(e) is "[object DOMException]" | ||
PASS Object.prototype.toString.call(e.__proto__) is "[object DOMExceptionPrototype]" | ||
PASS e.constructor.toString() is "[object DOMExceptionConstructor]" | ||
PASS e.constructor is window.DOMException | ||
PASS e.HIERARCHY_REQUEST_ERR is e.constructor.HIERARCHY_REQUEST_ERR | ||
PASS e.HIERARCHY_REQUEST_ERR is 3 | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../../js/resources/js-test-style.css"> | ||
<script src="../../js/resources/js-test-pre.js"></script> | ||
</head> | ||
<body> | ||
<p id="description"></p> | ||
<div id="console"></div> | ||
<script src="resources/prototype-object.js"></script> | ||
<script src="../../js/resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,19 @@ | ||
description("DOMException needs a real prototype: http://bugs.webkit.org/show_bug.cgi?id=16637") | ||
|
||
var e; | ||
try { | ||
document.body.appendChild(document.documentElement); | ||
// raises a HIERARCHY_REQUEST_ERR | ||
} catch (err) { | ||
e = err; | ||
} | ||
|
||
shouldBeEqualToString("e.toString()", "Error: HIERARCHY_REQUEST_ERR: DOM Exception 3"); | ||
shouldBeEqualToString("Object.prototype.toString.call(e)", "[object DOMException]"); | ||
shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object DOMExceptionPrototype]"); | ||
shouldBeEqualToString("e.constructor.toString()", "[object DOMExceptionConstructor]"); | ||
shouldBe("e.constructor", "window.DOMException"); | ||
shouldBe("e.HIERARCHY_REQUEST_ERR", "e.constructor.HIERARCHY_REQUEST_ERR"); | ||
shouldBe("e.HIERARCHY_REQUEST_ERR", "3"); | ||
|
||
var successfullyParsed = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,3 +1,3 @@ | ||
Test the behavior of a sync XMLHttpRequest that encounters an infinite redirection loop. | ||
|
||
Exception Error; code=101; number=undefined (0); message='NETWORK_ERR: XMLHttpRequest Exception 101' | ||
Exception NETWORK_ERR; code=101; number=undefined (0); message='NETWORK_ERR: XMLHttpRequest Exception 101' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.