1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/hittest/test_zoom_text.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<head> 1.7 + <title>getOffsetAtPoint when page is zoomed</title> 1.8 + <link rel="stylesheet" type="text/css" 1.9 + href="chrome://mochikit/content/tests/SimpleTest/test.css" /> 1.10 + 1.11 + <script type="application/javascript" 1.12 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.13 + 1.14 + <script type="application/javascript" 1.15 + src="../common.js"></script> 1.16 + <script type="application/javascript" 1.17 + src="../role.js"></script> 1.18 + <script type="application/javascript" 1.19 + src="../layout.js"></script> 1.20 + 1.21 + <script type="application/javascript"> 1.22 + function doTest() 1.23 + { 1.24 + var hyperText = getNode("paragraph"); 1.25 + var textNode = hyperText.firstChild; 1.26 + var [x, y, width, height] = getBounds(textNode); 1.27 + testOffsetAtPoint(hyperText, x + width / 2, y + height / 2, 1.28 + COORDTYPE_SCREEN_RELATIVE, 1.29 + hyperText.textContent.length / 2); 1.30 + 1.31 + zoomDocument(document, 2.0); 1.32 + 1.33 + var [x, y, width, height] = getBounds(textNode); 1.34 + testOffsetAtPoint(hyperText, x + width / 2, y + height / 2, 1.35 + COORDTYPE_SCREEN_RELATIVE, 1.36 + hyperText.textContent.length / 2); 1.37 + 1.38 + zoomDocument(document, 1.0); 1.39 + 1.40 + SimpleTest.finish(); 1.41 + } 1.42 + 1.43 + SimpleTest.waitForExplicitFinish(); 1.44 + addA11yLoadEvent(doTest); 1.45 + </script> 1.46 +</head> 1.47 +<body> 1.48 + 1.49 + <a target="_blank" 1.50 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=727942" 1.51 + title="getOffsetAtPoint returns incorrect value when page is zoomed"> 1.52 + Mozilla Bug 727942 1.53 + </a> 1.54 + <p id="display"></p> 1.55 + <div id="content" style="display: none"></div> 1.56 + <pre id="test"> 1.57 + </pre> 1.58 + <p id="paragraph" style="font-family: monospace;">Болтали две сороки</p> 1.59 +</body> 1.60 +</html>