| Index: LayoutTests/fast/events/window-onerror-isolatedworld-01.html
|
| diff --git a/LayoutTests/fast/events/window-onerror-isolatedworld-01.html b/LayoutTests/fast/events/window-onerror-isolatedworld-01.html
|
| index 70952553b8c350a42f0f0d27cc270b4d86686b1f..c5d6ae80ce24ab50f8fd275282e7a474170ebafa 100644
|
| --- a/LayoutTests/fast/events/window-onerror-isolatedworld-01.html
|
| +++ b/LayoutTests/fast/events/window-onerror-isolatedworld-01.html
|
| @@ -10,15 +10,34 @@
|
| </head>
|
| <body>
|
| <script>
|
| - description('Test that window.onerror and "error" event listeners from main world are invoked for uncaught exceptions in scripts running in isolate worlds as well as for exceptions in the main world.');
|
| + description('Test that window.onerror and "error" event listeners from main world are not invoked for uncaught exceptions in scripts running in isolate worlds, but only for exceptions in the main world.');
|
|
|
| - function callback(errorsHandled) {
|
| - if (errorsHandled === 12)
|
| + var onerrorsHandled = 0;
|
| + function onErrorCallback(errorsHandled) {
|
| + onerrorsHandled++;
|
| + if (onerrorsHandled > 3)
|
| + testFailed("Only main-world exceptions should be caught by onerror handlers.");
|
| +
|
| + // FIXME: This should be 6 once we correctly handle 'error' event dispatch for worlds: crbug.com/225513
|
| + if (errorsHandled === 9)
|
| + finishJSTest();
|
| + }
|
| +
|
| + var errorEventsHandled = 0;
|
| + function errorEventCallback(errorsHandled) {
|
| + errorEventsHandled++;
|
| + if (errorEventsHandled > 3) {
|
| + // FIXME: This currently fails. We need to correctly handle 'error' event dispatch for worlds: crbug.com/225513
|
| + testFailed("Only main-world exceptions should be caught by ErrorEvent listeners.");
|
| + }
|
| +
|
| + // FIXME: This should be 6 once we correctly handle 'error' event dispatch for worlds: crbug.com/225513
|
| + if (errorsHandled === 9)
|
| finishJSTest();
|
| }
|
|
|
| - dumpOnErrorArgumentValuesAndReturn(true, callback);
|
| - dumpErrorEventAndPreventDefault(callback);
|
| + dumpOnErrorArgumentValuesAndReturn(true, onErrorCallback);
|
| + dumpErrorEventAndPreventDefault(errorEventCallback);
|
|
|
| var exceptions = function(worldType)
|
| {
|
|
|