Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: LayoutTests/svg/hixie/links/003.xml

Issue 249313005: Allow fragment navigation from <svg:a> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More test tweaks. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 <title>Links with fragment identifiers inside SVG fragments</title>
4 <style type="text/css">
5 div { padding-top: 500em; }
6 </style>
7 </head>
8 <body>
9 <p>The circle below is a link. When you activate the circle, nothing
10 should happen. If the document scrolls or the image pans when you
11 activate the link, the test has failed.</p>
12 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xl ink"
13 height="20000" width="200" onload="runTest();">
14 <script type="text/ecmascript"><![CDATA[
15 if (window.testRunner) {
16 testRunner.waitUntilDone();
17 testRunner.dumpAsText();
18 }
19
20 function checkNoNavigation()
21 {
22 var result = location.hash == '' ? 'PASS' : 'FAIL';
23 document.documentElement.appendChild(document.createTextNode(result));
24 if (window.testRunner)
25 testRunner.notifyDone();
26 }
27
28 function runTest() {
29 if (window.eventSender) {
30 var evt = document.createEvent("MouseEvents");
31 evt.initMouseEvent("click", true, true, window,
32 0, 0, 0, 0, 0, false, false, false, false, 0, null);
33 document.getElementById('link').dispatchEvent(evt);
34 window.setTimeout("checkNoNavigation()", 0 );
35 } else {
36 // in manual mode
37 alert("Please use run-webkit-tests.");
38 }
39 }
40 ]]>
41 </script>
42 <!-- Spec says that <a> can only link to animation elements,
43 otherwise it is invalid; that known attributes with
44 unsupported values are treated as if they hadn't been
45 specified when rendering; that if the attribute is not
46 specified, the effect is as if an empty value ("") was
47 specified; and that an empty attribute value (xlink:href="")
48 means that no link traversal occurs upon activation of the 'a'
49 element. So. Nothing should happen if you click it: -->
50 <a xlink:href="#test" id="link">
51 <circle cx="50" cy="50" r="50" fill="blue"/>
52 </a>
53 <circle cx="50" cy="19950" r="50" fill="red" id="test"/>
54 </svg>
55 </body>
56 </html>
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/fragment-navigation-02-expected.txt ('k') | LayoutTests/svg/hixie/links/003-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698