2011-08-30 Yury Semikhatsky <yurys@chromium.org>
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2011 10:54:47 +0000 (10:54 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2011 10:54:47 +0000 (10:54 +0000)
        Unreviewed. Update window.onerror tests after r94061 to match new semantics
        of window.onerror return value.

        * fast/workers/resources/shared-worker-script-error.js:
        * http/tests/security/cross-origin-script-window-onerror-redirected.html:
        * http/tests/security/cross-origin-script-window-onerror.html:
        * userscripts/window-onerror-for-isolated-world-1.html:
        * userscripts/window-onerror-for-isolated-world-2.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94066 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/workers/resources/shared-worker-script-error.js
LayoutTests/http/tests/security/cross-origin-script-window-onerror-redirected.html
LayoutTests/http/tests/security/cross-origin-script-window-onerror.html
LayoutTests/userscripts/window-onerror-for-isolated-world-1.html
LayoutTests/userscripts/window-onerror-for-isolated-world-2.html

index e95a7a5..5cd52fe 100644 (file)
@@ -1,5 +1,16 @@
 2011-08-30  Yury Semikhatsky  <yurys@chromium.org>
 
+        Unreviewed. Update window.onerror tests after r94061 to match new semantics
+        of window.onerror return value.
+
+        * fast/workers/resources/shared-worker-script-error.js:
+        * http/tests/security/cross-origin-script-window-onerror-redirected.html:
+        * http/tests/security/cross-origin-script-window-onerror.html:
+        * userscripts/window-onerror-for-isolated-world-1.html:
+        * userscripts/window-onerror-for-isolated-world-2.html:
+
+2011-08-30  Yury Semikhatsky  <yurys@chromium.org>
+
         Unreviewed. Update Chromium test expectations for new test.
 
         * platform/chromium/fast/events/window-onerror13-expected.txt: Added.
index 7a4a70f..130889e 100644 (file)
@@ -13,7 +13,7 @@ function handleMessage(event, port) {
     } else if (event.data == "handledError") {
         onerror = function(message, url, lineno) {
             port.postMessage("SUCCESS: error handled via onerror: " + message);
-            return false;
+            return true;
         };
         generateError();  // Undefined function call
     } else {
index b6a09c5..c5fc7ed 100644 (file)
@@ -14,7 +14,7 @@ window.onerror = function(message, url, line) {
   document.getElementById("result").textContent = "window.onerror message: " + message + " at " + url + ": " + line;
   if (window.layoutTestController)
     layoutTestController.notifyDone();
-  return false;
+  return true;
 }
 </script>
 <script src="resources/redir.php?url=http://localhost:8000/security/resources/cross-origin-script.txt">
index 9d35114..c40e6ae 100644 (file)
@@ -16,7 +16,7 @@ window.onerror = function(message, url, line) {
   document.getElementById("result").textContent = "window.onerror message: " + message + " at " + url + ": " + line;
   if (window.layoutTestController)
     layoutTestController.notifyDone();
-  return false;
+  return true;
 }
 </script>
 <script src="http://localhost:8000/security/resources/cross-origin-script.txt">
index e198ec9..af08a23 100644 (file)
@@ -31,13 +31,14 @@ function lastUrlComponent(url) {
 window.onerror = function(msg, url, line)
 {
     log("Main world window.onerror: " + msg + " at " + lastUrlComponent(url) + ":" + line);
-    return false;
+    return true;
 }
 
 window.addEventListener("error", function(e)
 {
     var url = lastUrlComponent(e.filename);
     log("Main world error event listener: " + e.message + " at " + url + ":" + e.lineno);
+    e.preventDefault();
 }, false);
 
 var exceptions = function(isolatedWorld)
index 8a2ddac..4aa97e5 100644 (file)
@@ -44,7 +44,7 @@ var errorHandlers = function(isolatedWorld)
 
     window.onerror = function(msg, url, line) {
         log(isolatedWorld + " window.onerror: " + msg + " at " + lastUrlComponent(url) + ":" + line, "*");
-        return false;
+        return true;
     }
 
     window.addEventListener("error", function(e) {