Index: third_party/WebKit/LayoutTests/fast/images/server-side-imagemap.html |
diff --git a/third_party/WebKit/LayoutTests/fast/images/server-side-imagemap.html b/third_party/WebKit/LayoutTests/fast/images/server-side-imagemap.html |
index c033c41330061f5669105afaa14f322bf0a398e6..fdb87e3fedd85e703a17b11ef1de3474bbc84617 100644 |
--- a/third_party/WebKit/LayoutTests/fast/images/server-side-imagemap.html |
+++ b/third_party/WebKit/LayoutTests/fast/images/server-side-imagemap.html |
@@ -1,35 +1,7 @@ |
<!DOCTYPE html> |
-<script src="../../resources/js-test.js"></script> |
-<script> |
-description('Tests that server-side image maps with zooms and transforms produce the right click coordinates.'); |
- |
-function testClick(x, y, expectedHash) |
-{ |
- location.hash = '#'; |
- eventSender.mouseMoveTo(x, y); |
- eventSender.mouseDown(); |
- eventSender.mouseUp(); |
- shouldBeEqualToString('location.hash', expectedHash); |
-} |
- |
-onload = function() |
-{ |
- if (window.testRunner && window.eventSender && window.internals) { |
- internals.setPageScaleFactor(1.25); // pinch scale |
- eventSender.setPageZoomFactor(1.5, 0, 0); // browser zoom |
- testClick(402, 122, '#?0,0'); // top left border |
- testClick(407, 204, '#?0,0'); // top left padding |
- testClick(517, 562, '#?82,39'); // content area |
- testClick(539, 662, '#?105,54'); // lower right padding |
- testClick(540, 714, '#?115,63'); // lower right border |
- testClick(179, 350, '#?0,63'); // lower left border |
- testClick(248, 362, '#?0,52'); // lower left padding |
- testClick(695, 488, '#?102,0'); // upper right padding |
- testClick(759, 479, '#?112,0'); // upper right border |
- } |
-}; |
-</script> |
- |
+<title>Tests that server-side image maps with zooms and transforms produce the right click coordinates.</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
<style> |
img { |
position: absolute; |
@@ -48,8 +20,30 @@ img { |
transform: rotate(45deg); |
} |
</style> |
- |
<div style="zoom: 2;"><a href="#"><img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" ismap></a></div> |
- |
-<div id="description"></div> |
-<div id="console"></div> |
+<script> |
+async_test(function(t) { |
+ window.onload = t.step_func_done(function() { |
+ function testClick(x, y, expectedHash) { |
+ location.hash = '#'; |
+ eventSender.mouseMoveTo(x, y); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ assert_equals(location.hash, expectedHash); |
+ } |
+ if (window.eventSender && window.internals) { |
+ internals.setPageScaleFactor(1.25); // pinch scale |
+ eventSender.setPageZoomFactor(1.5, 0, 0); // browser zoom |
+ testClick(402, 122, '#?0,0'); // top left border |
+ testClick(407, 204, '#?0,0'); // top left padding |
+ testClick(517, 562, '#?82,39'); // content area |
+ testClick(539, 662, '#?105,54'); // lower right padding |
+ testClick(540, 714, '#?115,63'); // lower right border |
+ testClick(179, 350, '#?0,63'); // lower left border |
+ testClick(248, 362, '#?0,52'); // lower left padding |
+ testClick(695, 488, '#?102,0'); // upper right padding |
+ testClick(759, 479, '#?112,0'); // upper right border |
+ } |
+ }); |
+}); |
+</script> |