blob: 593058065df3e26399b3cf8b5d657e2d9243167f [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<svg width="500" height="500">
<title>Top Level Title</title>
<rect width="250" height="250" fill="green">
<title>Second Level Title</title>
</rect>
</svg>
<script>
testTooltipText(100, 300, "Top Level Title", "Tooltip title of title child under SVG root");
testTooltipText(100, 100, "Second Level Title", "Tooltip title of title child under an element");
function testTooltipText(x, y, expectedText, description) {
async_test(function(t) {
window.addEventListener('load', t.step_func_done(function() {
assert_exists(window, 'eventSender');
assert_exists(window, 'testRunner');
eventSender.dragMode = false;
eventSender.mouseMoveTo(x,y);
assert_equals(testRunner.tooltipText, expectedText);
}));
}, description);
}
</script>