Commit e42c177c authored by yurys@chromium.org's avatar yurys@chromium.org

2010-12-13 Yury Semikhatsky <yurys@chromium.org>

        Unreviewed. Rollout 73914, 73915, 73917, 73920 and 73921.

        REGRESSION(r73914): "Chromium page_cycler_morejs fails" (Requested by yurys on #webkit).
        https://bugs.webkit.org/show_bug.cgi?id=50950

        * fast/events/resources/window-onerror.js: Removed.
        * fast/events/window-onerror1-expected.txt: Removed.
        * fast/events/window-onerror1.html: Removed.
        * fast/events/window-onerror10-expected.txt: Removed.
        * fast/events/window-onerror10.html: Removed.
        * fast/events/window-onerror11-expected.txt: Removed.
        * fast/events/window-onerror11.html: Removed.
        * fast/events/window-onerror2-expected.txt: Removed.
        * fast/events/window-onerror2.html: Removed.
        * fast/events/window-onerror3-expected.txt: Removed.
        * fast/events/window-onerror3.html: Removed.
        * fast/events/window-onerror4-expected.txt: Removed.
        * fast/events/window-onerror4.html: Removed.
        * fast/events/window-onerror5-expected.txt: Removed.
        * fast/events/window-onerror5.html: Removed.
        * fast/events/window-onerror6-expected.txt: Removed.
        * fast/events/window-onerror6.html: Removed.
        * fast/events/window-onerror7-expected.txt: Removed.
        * fast/events/window-onerror7.html: Removed.
        * fast/events/window-onerror8-expected.txt: Removed.
        * fast/events/window-onerror8.html: Removed.
        * fast/events/window-onerror9-expected.txt: Removed.
        * fast/events/window-onerror9.html: Removed.
        * fast/workers/worker-script-error-expected.txt:
        * http/tests/security/resources/onerror-iframe.html: Removed.
        * http/tests/security/window-onerror-exception-in-iframe-expected.txt: Removed.
        * http/tests/security/window-onerror-exception-in-iframe.html: Removed.
        * platform/chromium-win/fast/workers/worker-script-error-expected.txt:
        * platform/chromium/fast/events/window-onerror1-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror10-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror11-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror2-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror3-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror4-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror5-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror6-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror7-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror8-expected.txt: Removed.
        * platform/chromium/fast/events/window-onerror9-expected.txt: Removed.
        * platform/chromium/http/tests/security/window-onerror-exception-in-iframe-expected.txt: Removed.
        * platform/chromium/userscripts/window-onerror-for-isolated-world-1-expected.txt: Removed.
        * platform/chromium/userscripts/window-onerror-for-isolated-world-2-expected.txt: Removed.
        * platform/gtk/Skipped:
        * userscripts/window-onerror-for-isolated-world-1-expected.txt: Removed.
        * userscripts/window-onerror-for-isolated-world-1.html: Removed.
        * userscripts/window-onerror-for-isolated-world-2-expected.txt: Removed.
        * userscripts/window-onerror-for-isolated-world-2.html: Removed.
2010-12-13  Yury Semikhatsky  <yurys@chromium.org>

        Unreviewed. Rollout 73914, 73915, 73917, 73920 and 73921.

        REGRESSION(r73914): "Chromium page_cycler_morejs fails" (Requested by yurys on #webkit).
        https://bugs.webkit.org/show_bug.cgi?id=50950

        * Android.jscbindings.mk:
        * CMakeLists.txt:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.order:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSBindingsAllInOne.cpp:
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::reportException):
        * bindings/js/JSWorkerContextErrorHandler.cpp: Renamed from WebCore/bindings/js/JSErrorHandler.cpp.
        (WebCore::JSWorkerContextErrorHandler::JSWorkerContextErrorHandler):
        (WebCore::JSWorkerContextErrorHandler::~JSWorkerContextErrorHandler):
        (WebCore::JSWorkerContextErrorHandler::handleEvent):
        * bindings/js/JSWorkerContextErrorHandler.h: Renamed from WebCore/bindings/js/JSErrorHandler.h.
        (WebCore::JSWorkerContextErrorHandler::create):
        (WebCore::createJSWorkerContextErrorHandler):
        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/CodeGeneratorV8.pm:
        * bindings/v8/V8ConsoleMessage.cpp:
        (WebCore::V8ConsoleMessage::dispatchNow):
        (WebCore::V8ConsoleMessage::handler):
        * bindings/v8/V8ConsoleMessage.h:
        * bindings/v8/V8WindowErrorHandler.cpp: Removed.
        * bindings/v8/V8WindowErrorHandler.h: Removed.
        * bindings/v8/WorkerContextExecutionProxy.cpp:
        (WebCore::v8MessageHandler):
        * bindings/v8/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::evaluate):
        * dom/Document.cpp:
        (WebCore::Document::reportException):
        (WebCore::Document::addMessage):
        * dom/Document.h:
        * dom/ErrorEvent.cpp:
        * dom/ErrorEvent.h:
        * dom/Event.cpp:
        * dom/Event.h:
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::ScriptExecutionContext):
        * dom/ScriptExecutionContext.h:
        * websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect):
        * websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::didOpen):
        (WebCore::WebSocketChannel::appendToBuffer):
        * websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::readServerHandshake):
        (WebCore::WebSocketHandshake::readStatusLine):
        (WebCore::WebSocketHandshake::readHTTPHeaders):
        (WebCore::WebSocketHandshake::checkResponseHeaders):
        * workers/DefaultSharedWorkerRepository.cpp:
        (WebCore::postExceptionTask):
        (WebCore::postConsoleMessageTask):
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::WorkerContext):
        (WebCore::WorkerContext::reportException):
        (WebCore::WorkerContext::addMessage):
        * workers/WorkerContext.h:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerExceptionTask::performTask):
        (WebCore::postConsoleMessageTask):
        * xml/XMLHttpRequest.cpp:
        (WebCore::reportUnsafeUsage):
2010-12-13  Yury Semikhatsky  <yurys@chromium.org>

        Unreviewed. Rollout 73914, 73915, 73917, 73920 and 73921.

        REGRESSION(r73914): "Chromium page_cycler_morejs fails" (Requested by yurys on #webkit).
        https://bugs.webkit.org/show_bug.cgi?id=50950

        * src/WebWorkerClientImpl.cpp:
        (WebKit::WebWorkerClientImpl::postExceptionToWorkerObject):
        (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObject):
        (WebKit::WebWorkerClientImpl::postExceptionToWorkerObjectTask):
        (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObjectTask):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6f72f782
2010-12-13 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Rollout 73914, 73915, 73917, 73920 and 73921.
REGRESSION(r73914): "Chromium page_cycler_morejs fails" (Requested by yurys on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=50950
* fast/events/resources/window-onerror.js: Removed.
* fast/events/window-onerror1-expected.txt: Removed.
* fast/events/window-onerror1.html: Removed.
* fast/events/window-onerror10-expected.txt: Removed.
* fast/events/window-onerror10.html: Removed.
* fast/events/window-onerror11-expected.txt: Removed.
* fast/events/window-onerror11.html: Removed.
* fast/events/window-onerror2-expected.txt: Removed.
* fast/events/window-onerror2.html: Removed.
* fast/events/window-onerror3-expected.txt: Removed.
* fast/events/window-onerror3.html: Removed.
* fast/events/window-onerror4-expected.txt: Removed.
* fast/events/window-onerror4.html: Removed.
* fast/events/window-onerror5-expected.txt: Removed.
* fast/events/window-onerror5.html: Removed.
* fast/events/window-onerror6-expected.txt: Removed.
* fast/events/window-onerror6.html: Removed.
* fast/events/window-onerror7-expected.txt: Removed.
* fast/events/window-onerror7.html: Removed.
* fast/events/window-onerror8-expected.txt: Removed.
* fast/events/window-onerror8.html: Removed.
* fast/events/window-onerror9-expected.txt: Removed.
* fast/events/window-onerror9.html: Removed.
* fast/workers/worker-script-error-expected.txt:
* http/tests/security/resources/onerror-iframe.html: Removed.
* http/tests/security/window-onerror-exception-in-iframe-expected.txt: Removed.
* http/tests/security/window-onerror-exception-in-iframe.html: Removed.
* platform/chromium-win/fast/workers/worker-script-error-expected.txt:
* platform/chromium/fast/events/window-onerror1-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror10-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror11-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror2-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror3-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror4-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror5-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror6-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror7-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror8-expected.txt: Removed.
* platform/chromium/fast/events/window-onerror9-expected.txt: Removed.
* platform/chromium/http/tests/security/window-onerror-exception-in-iframe-expected.txt: Removed.
* platform/chromium/userscripts/window-onerror-for-isolated-world-1-expected.txt: Removed.
* platform/chromium/userscripts/window-onerror-for-isolated-world-2-expected.txt: Removed.
* platform/gtk/Skipped:
* userscripts/window-onerror-for-isolated-world-1-expected.txt: Removed.
* userscripts/window-onerror-for-isolated-world-1.html: Removed.
* userscripts/window-onerror-for-isolated-world-2-expected.txt: Removed.
* userscripts/window-onerror-for-isolated-world-2.html: Removed.
2010-12-09 Antti Koivisto <antti@apple.com>
Reviewed by Alexey Proskuryakov.
......
function throwException() {
throw new Error("An exception");
}
This page tests setting onerror handlers through the DOM. If it passes, you will see "PASS" messages below.Bug 8519.
PASS: caught global error: ReferenceError: Can't find variable: hahaha_good_luck_finding_me at window-onerror1.html:25
<html>
<head>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function print(message, color)
{
var paragraph = document.createElement("div");
paragraph.appendChild(document.createTextNode(message));
paragraph.style.fontFamily = "monospace";
if (color)
paragraph.style.color = color;
document.getElementById("console").appendChild(paragraph);
}
function test()
{
// must be last because the exception ends JavaScript execution
window.onerror = function (error, url, line) {
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
print("PASS: caught global error: " + error + " at " + url + ":" + line, "green");
return false;
};
hahaha_good_luck_finding_me(); // caught by window.onerror
}
</script>
</head>
<body onload="test();">
<p>This page tests setting onerror handlers through the DOM. If it passes, you will
see "PASS" messages below.<a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<hr>
<div id='console'></div>
</body>
</html>
Test that "error" event listener added with window.addEventListener is invoked for uncaucht exceptions. Bug 8519.
event passed to the listener is the same as window.event: true
Event details:
type: error
phase: 2
currentTarget is the global object: true
message: Error: My fault.
filename: window-onerror10.html
lineno: 29
<html>
<body>
<p>Test that "error" event listener added with window.addEventListener is invoked for uncaucht exceptions. <a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<div id="console"></div>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(msg) {
document.getElementById("console").innerHTML += msg + "<br>";
}
function lastPathComponent(url) {
return url ? url.match( /[^\/]+\/?$/ )[0] : url;
}
window.addEventListener("error", function(e) {
log("event passed to the listener is the same as window.event: " + (window.event === e));
log("Event details:");
log("type: " + e.type);
log("phase: " + e.eventPhase)
log("currentTarget is the global object: " + (e.currentTarget === window));
log("message: " + e.message);
log("filename: " + lastPathComponent(e.filename));
log("lineno: " + e.lineno);
e.preventDefault();
}, false);
throw new Error("My fault.");
</script>
</body>
</html>
Test that window.onerror is called on window object. Bug 8519.
Main frame window.onerror: Error: An exception at window-onerror.js:2
<html>
<head>
<script src="resources/window-onerror.js">
</script>
</head>
<body>
<p>Test that window.onerror is called on window object. <a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<div id="console"></div>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(msg) {
document.getElementById("console").innerHTML += msg + "<br>";
}
window.onerror = function(msg, url, line)
{
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
log("Main frame window.onerror: " + msg + " at " + url + ":" + line);
return false;
}
throwException();
</script>
</body>
</html>
Test that uncaught exceptions will be reported to the window.onerror handler. Bug 8519.
Main frame window.onerror: Error: Inline script exception at window-onerror2.html:35
Main frame window.onerror: Exception in onload at undefined:0
Main frame window.onerror: Error: Exception in setTimeout at window-onerror2.html:29
<html>
<body onload="throw 'Exception in onload';">
<p>Test that uncaught exceptions will be reported to the window.onerror handler. <a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<div id="result"></div>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function log(msg) {
document.getElementById("result").innerHTML += msg + "<br>";
}
var unhandledErrorCount = 0;
window.onerror = function(msg, url, line)
{
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
log("Main frame window.onerror: " + msg + " at " + url + ":" + line);
if (++unhandledErrorCount === 3 && window.layoutTestController)
layoutTestController.notifyDone();
return false;
}
function delayedThrowException()
{
throw new Error("Exception in setTimeout");
}
setTimeout(delayedThrowException, 0);
function throwException()
{
throw new Error("Inline script exception");
}
throwException();
</script>
</body>
</html>
You should see a message if window.onerror is working properly for this test.Bug 8519.
Error caught successfully: ReferenceError: Can't find variable: unknownObject File: window-onerror3.html Line: 16
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(msg) {
document.getElementById("console").innerHTML += msg + "<br>";
}
function test1()
{
window.onerror = function (error, url, line) {
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
log("Error caught successfully: " + error + "\nFile: " + url + "\nLine: " + line)
return false;
};
unknownObject.unknownProperty++;
}
</script>
<body onload="test1();">
<p>You should see a message if window.onerror is working properly for this test.<a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<hr>
<div id='console'></div>
</body>
You should see a log record if window.onerror is working properly for this test.Bug 8519.
Error caught successfully: ReferenceError: Left side of assignment is not a reference. File: undefined Line: 1
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(msg) {
document.getElementById("console").innerHTML += msg + "<br>";
}
function test1()
{
window.onerror = function (error, url, line) {
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
log("Error caught successfully: " + error + "\nFile: " + url + "\nLine: " + line)
return false;
};
eval("1=2");
}
</script>
<body onload="test1();">
<p>You should see a log record if window.onerror is working properly for this test.<a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<hr>
<div id='console'></div>
</body>
Test that window.onerror is invoked for syntax error in eval. You should see a log record if window.onerror is working properly for this test.Bug 8519.
Error caught successfully: SyntaxError: Parse error File: undefined Line: 1
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(msg) {
document.getElementById("console").innerHTML += msg + "<br>";
}
function test1()
{
window.onerror = function (error, url, line) {
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
log("Error caught successfully: " + error + "\nFile: " + url + "\nLine: " + line)
return false;
};
eval("a(");
}
</script>
<body onload="test1();">
<p>Test that window.onerror is invoked for syntax error in eval. You should see a log record if window.onerror is working properly for this test.<a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<hr>
<div id='console'></div>
</body>
Test that syntax error will be reported to the window.onerror handler. Bug 8519.
Main frame window.onerror: SyntaxError: Parse error at window-onerror6.html:22
<html>
<body>
<p>Test that syntax error will be reported to the window.onerror handler. <a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<div id="console"></div>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(msg) {
document.getElementById("console").innerHTML += msg + "<br>";
}
window.onerror = function(msg, url, line)
{
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
log("Main frame window.onerror: " + msg + " at " + url + ":" + line);
return false;
}
</script>
<script>
a) // syntax error
</script>
</body>
</html>
CONSOLE MESSAGE: line 20: Error: Original error
CONSOLE MESSAGE: line 17: Error: Nested error
Test that exception in window.onerror won't lead to recursive window.onerror call. Bug 8519.
Main frame window.onerror: Error: Original error at window-onerror7.html:20
<html>
<body>
<p>Test that exception in window.onerror won't lead to recursive window.onerror call. <a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<div id="console"></div>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(msg) {
document.getElementById("console").innerHTML += msg + "<br>";
}
window.onerror = function(msg, url, line)
{
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
log("Main frame window.onerror: " + msg + " at " + url + ":" + line);
throw new Error("Nested error");
}
throw new Error("Original error");
</script>
</body>
</html>
Test that window.onerror is called on window object. Bug 8519.
Main frame window.onerror: 2010 at undefined:0
PASSED: this === window
<html>
<body>
<p>Test that window.onerror is called on window object. <a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<div id="console"></div>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(msg) {
document.getElementById("console").innerHTML += msg + "<br>";
}
window.onerror = function(msg, url, line)
{
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
log("Main frame window.onerror: " + msg + " at " + url + ":" + line);
if (this === window)
log("PASSED: this === window");
else
log("FAILED: this === window");
return false;
}
throw 2010;
</script>
</body>
</html>
Test that when window.onerror handler is called, window.event is the corresponding ErrorEvent object. Bug 8519.
Main frame window.onerror: Error: 2010 at window-onerror9.html:31
window.event.type = error
window.event.message = Error: 2010
window.event.filename = window-onerror9.html
window.event.lineno = 31
<html>
<body>
<p>Test that when window.onerror handler is called, window.event is the corresponding ErrorEvent object. <a href="https://bugs.webkit.org/show_bug.cgi?id=8519">Bug 8519</a>.</p>
<div id="console"></div>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function log(msg) {
document.getElementById("console").innerHTML += msg + "<br>";
}
function lastPathComponent(url) {
return url ? url.match( /[^\/]+\/?$/ )[0] : url;
}
window.onerror = function(msg, url, line)
{
log("Main frame window.onerror: " + msg + " at " + lastPathComponent(url) + ":" + line);
log("window.event.type = " + window.event.type);
log("window.event.message = " + window.event.message);
log("window.event.filename = " + lastPathComponent(window.event.filename));
log("window.event.lineno = " + window.event.lineno);
if (window.layoutTestController)
layoutTestController.notifyDone();
return false;
}
throw new Error(2010);
</script>
</body>
</html>
......@@ -4,10 +4,10 @@ Test Worker script error handling functionality. Should print a series of PASS m
PASS: onerror invoked for a script that has invalid syntax.
PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 1.
PASS: event listener invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 1.
PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 7.
PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: bar' at line 3.
PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 7.
PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 7.
PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 7.
PASS: message received from WorkerGlobalScope.onerror: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 7.
PASS: onerror invoked for an exception in setTimeout callback.
DONE
......
<script>
function handleLoad()
{
window.parent.postMessage("IFrameLoaded", "*");
}
throw "IframeException";
</script>
<body onload="handleLoad()">
</body>
CONSOLE MESSAGE: line 0: IframeException
Test that exceptions in iframe are not reported to the main frame window.onerror handler. window.onerror should print exactly one line.
Main frame window.onerror: MainFrameException at undefined:0
DONE
<html>
<body>
<p>Test that exceptions in iframe are not reported to the main frame window.onerror handler.
window.onerror should print exactly one line.</p>
<div id="result"></div>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function log(msg) {
document.getElementById("result").innerHTML += msg + "<br>";
}
window.onerror = function(msg, url, line)
{
url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
log("Main frame window.onerror: " + msg + " at " + url + ":" + line);
return false;
}
function receiveMessage(event) {
if (event.data === "IFrameLoaded") {
log("DONE");
if (window.layoutTestController)
layoutTestController.notifyDone();
} else
log("FAIL " + event.data);
}
window.addEventListener("message", receiveMessage, false);
throw "MainFrameException";
</script>
<iframe src="http://localhost:8000/security/resources/onerror-iframe.html"/>
</body>
</html>
......@@ -3,10 +3,10 @@ Test Worker script error handling functionality. Should print a series of PASS m
PASS: onerror invoked for a script that has invalid syntax.
PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 1.
PASS: event listener invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 1.
PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 7.
PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: bar is not defined' at line 3.
PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 7.
PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 7.
PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 7.
PASS: message received from WorkerGlobalScope.onerror: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 7.
PASS: onerror invoked for an exception in setTimeout callback.
DONE
......
This page tests setting onerror handlers through the DOM. If it passes, you will see "PASS" messages below.Bug 8519.
PASS: caught global error: Uncaught ReferenceError: hahaha_good_luck_finding_me is not defined at window-onerror1.html:25
Test that "error" event listener added with window.addEventListener is invoked for uncaucht exceptions. Bug 8519.
event passed to the listener is the same as window.event: true
Event details:
type: error
phase: 2
currentTarget is the global object: true
message: Uncaught Error: My fault.
filename: window-onerror10.html
lineno: 29
Test that window.onerror is called on window object. Bug 8519.
Main frame window.onerror: Uncaught Error: An exception at window-onerror.js:2
Test that uncaught exceptions will be reported to the window.onerror handler. Bug 8519.
Main frame window.onerror: Uncaught Error: Inline script exception at window-onerror2.html:35
Main frame window.onerror: Uncaught Exception in onload at window-onerror2.html:2