2008-06-08 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jun 2008 06:26:09 +0000 (06:26 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jun 2008 06:26:09 +0000 (06:26 +0000)
        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=16856

        Fix tests not to rely on broken javascript URL behavior.

        * fast/events/event-listener-html-non-html-confusion.html:
        * fast/replaced/image-map-bug16782-expected.txt: Added.
        * fast/replaced/image-map-bug16782.html: Added.
        * fast/replaced/image-map.html:
        * svg/custom/prevent-default.svg:

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

LayoutTests/ChangeLog
LayoutTests/fast/events/event-listener-html-non-html-confusion.html
LayoutTests/fast/replaced/image-map-bug16782-expected.txt [new file with mode: 0644]
LayoutTests/fast/replaced/image-map-bug16782.html [new file with mode: 0644]
LayoutTests/fast/replaced/image-map.html
LayoutTests/svg/custom/prevent-default.svg

index e546960aa771f7e1ef58ef8808cdda020bca3bb3..f67e11d0c2b76b03c7af8375f597462d7ce55e94 100644 (file)
@@ -1,3 +1,17 @@
+2008-06-08  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Darin Alder.
+
+        https://bugs.webkit.org/show_bug.cgi?id=16856
+
+        Fix tests not to rely on broken javascript URL behavior.
+
+        * fast/events/event-listener-html-non-html-confusion.html:
+        * fast/replaced/image-map-bug16782-expected.txt: Added.
+        * fast/replaced/image-map-bug16782.html: Added.
+        * fast/replaced/image-map.html:
+        * svg/custom/prevent-default.svg:
+
 2008-06-08  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
 
         Reviewed by Oliver.
index d87496ebeeecc4b4e69a97ea550d3589e281cdd1..ddb6f5fa3efa24e7c81bbdd9659fe1bd64a01460 100644 (file)
@@ -5,7 +5,7 @@ first as a non-HTML and then as an HTML event listener could leave the "is HTML"
 
 <p id="result"></p>
 
-<a href="javascript:document.getElementById('result').innerHTML = 'FAILURE'" id="anchor">test anchor - script clicks this automatically</a>
+<a href="javascript:void(document.getElementById('result').innerHTML = 'FAILURE')" id="anchor">test anchor - script clicks this automatically</a>
 
 <script>
 
diff --git a/LayoutTests/fast/replaced/image-map-bug16782-expected.txt b/LayoutTests/fast/replaced/image-map-bug16782-expected.txt
new file mode 100644 (file)
index 0000000..8ced11a
--- /dev/null
@@ -0,0 +1,2 @@
+
+area clicked
diff --git a/LayoutTests/fast/replaced/image-map-bug16782.html b/LayoutTests/fast/replaced/image-map-bug16782.html
new file mode 100644 (file)
index 0000000..2edc91f
--- /dev/null
@@ -0,0 +1,17 @@
+<head>
+<script>
+function test() {
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        eventSender.mouseMoveTo(50, 50);
+        eventSender.mouseDown();
+        eventSender.mouseUp();
+    }
+}
+</script>
+</head>
+<body onload="test()">
+<img id="image" height="100" width="100" src="resources/square-blue-100x100.png" usemap="#map">
+<map name="map"><area shape="poly" coords="0,0,0,100,100,100,100,0" href="javascript:document.getElementById('result').innerHTML='area clicked'"></map>
+<div id="result">no area click seen yet</div>
+</body>
index 2edc91f4eab04579bd26fd98a41adb5938c672d6..44a5b22dadb61b6055476558355924e58f7d7775 100644 (file)
@@ -12,6 +12,6 @@ function test() {
 </head>
 <body onload="test()">
 <img id="image" height="100" width="100" src="resources/square-blue-100x100.png" usemap="#map">
-<map name="map"><area shape="poly" coords="0,0,0,100,100,100,100,0" href="javascript:document.getElementById('result').innerHTML='area clicked'"></map>
+<map name="map"><area shape="poly" coords="0,0,0,100,100,100,100,0" href="javascript:void(document.getElementById('result').innerHTML='area clicked')"></map>
 <div id="result">no area click seen yet</div>
 </body>
index 148fd0e6dc088ba3e887c5679b09b5a0983a02b2..2225ddf61ffea2de3d057253504ed1929ae5ca49 100644 (file)
@@ -25,7 +25,7 @@
       ]]>
     </script>
   </defs>
-  <a xlink:href="javascript:document.getElementById('rect').style.fill='red'">
+  <a xlink:href="javascript:void(document.getElementById('rect').style.fill='red')">
     <rect id='rect' onclick="changeColor(evt)" width='100' height='100' fill='orange' />
   </a>
 </svg>