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

Unified Diff: third_party/WebKit/LayoutTests/fast/images/server-side-imagemap.html

Issue 2253513005: Use testharness.js instead of js-test.js in fast/images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change test as per the comments. Created 4 years, 4 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 | third_party/WebKit/LayoutTests/fast/images/server-side-imagemap-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/images/server-side-imagemap-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698