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

Unified Diff: LayoutTests/svg/custom/fragment-navigation-01.html

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/svg/custom/fragment-navigation-01-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/custom/fragment-navigation-01.html
diff --git a/LayoutTests/svg/custom/fragment-navigation-01.html b/LayoutTests/svg/custom/fragment-navigation-01.html
new file mode 100644
index 0000000000000000000000000000000000000000..ec186ec61075475b2d1f28fd1fe04742196d6ab6
--- /dev/null
+++ b/LayoutTests/svg/custom/fragment-navigation-01.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<div>
+ <p>Clicking the green rectangle should attempt a navigation to the fragment identifier.</p>
+ <svg width="300" height="200" onload="runTest()">
+ <a xlink:href="#test">
+ <rect width="100" height="100" fill="green"/>
+ </a>
+ </svg>
+</div>
+<script>
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+
+function runTest() {
+ var evt = document.createEvent("MouseEvents");
+ evt.initMouseEvent("click", true, true, window,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ document.querySelector('a').dispatchEvent(evt);
+ window.setTimeout(function checkNavigation() {
+ var result = location.hash === '#test' ? 'PASS' : 'FAIL';
+ document.documentElement.appendChild(document.createTextNode(result));
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/svg/custom/fragment-navigation-01-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698