<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<object type="image/svg+xml" data="resources/tooltip-title-external-svg.svg">
Browser does not support SVG
</object>
<script>
testTooltipText(100, 300, "", "Tooltip title of title child under SVG root added as an object");
testTooltipText(100, 100, "Second Level Title in Object", "Tooltip title of title child under an element as part of external SVG object");
function testTooltipText(x, y, expectedText, description) {
async_test(function(t) {
window.addEventListener('load', t.step_func_done(function() {
assert_own_property(window, 'eventSender');
assert_own_property(window, 'testRunner');
eventSender.dragMode = false;
eventSender.mouseMoveTo(x,y);
assert_equals(testRunner.tooltipText, expectedText);
}));
}, description);
}
</script>