Module: wine Branch: master Commit: c00121a6030124553a542f7ba93b799c05144e2c URL: http://source.winehq.org/git/wine.git/?a=commit;h=c00121a6030124553a542f7ba9...
Author: Jacek Caban jacek@codeweavers.com Date: Sat Jun 19 22:25:12 2010 +0200
mshtml: Fixed event tests.
---
dlls/mshtml/tests/events.c | 48 +++++++------------------------------------ 1 files changed, 8 insertions(+), 40 deletions(-)
diff --git a/dlls/mshtml/tests/events.c b/dlls/mshtml/tests/events.c index d62df7a..c9523de 100644 --- a/dlls/mshtml/tests/events.c +++ b/dlls/mshtml/tests/events.c @@ -483,9 +483,7 @@ static void _test_event_x(unsigned line, IHTMLEventObj *event, LONG exl)
hres = IHTMLEventObj_get_x(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_x failed: %08x\n", hres); - if(exl == -10) /* don't test the exact value */ - todo_wine ok_(__FILE__,line)(l > 0, "x = %d\n", l); - else + if(exl != -10) /* don't test the exact value */ ok_(__FILE__,line)(l == exl, "x = %d, expected %d\n", l, exl); }
@@ -496,9 +494,7 @@ static void _test_event_y(unsigned line, IHTMLEventObj *event, LONG exl)
hres = IHTMLEventObj_get_y(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_y failed: %08x\n", hres); - if(exl == -10) /* don't test the exact value */ - todo_wine ok_(__FILE__,line)(l > 0, "y = %d\n", l); - else + if(exl != -10) /* don't test the exact value */ ok_(__FILE__,line)(l == exl, "y = %d, expected %d\n", l, exl); }
@@ -509,14 +505,8 @@ static void _test_event_clientx(unsigned line, IHTMLEventObj *event, LONG exl)
hres = IHTMLEventObj_get_clientX(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_clientX failed: %08x\n", hres); - if(exl == -10) {/* don't test the exact value */ - if(xy_todo) - todo_wine ok_(__FILE__,line)(l > 0, "clientX = %d\n", l); - else - ok_(__FILE__,line)(l > 0, "clientX = %d\n", l); - }else { + if(exl != -10) /* don't test the exact value */ ok_(__FILE__,line)(l == exl, "clientX = %d, expected %d\n", l, exl); - } }
static void _test_event_clienty(unsigned line, IHTMLEventObj *event, LONG exl) @@ -526,14 +516,8 @@ static void _test_event_clienty(unsigned line, IHTMLEventObj *event, LONG exl)
hres = IHTMLEventObj_get_clientY(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_clientY failed: %08x\n", hres); - if(exl == -10) {/* don't test the exact value */ - if(xy_todo) - todo_wine ok_(__FILE__,line)(l > 0, "clientY = %d\n", l); - else - ok_(__FILE__,line)(l > 0, "clientY = %d\n", l); - }else { + if(exl != -10) /* don't test the exact value */ ok_(__FILE__,line)(l == exl, "clientY = %d, expected %d\n", l, exl); - } }
static void _test_event_offsetx(unsigned line, IHTMLEventObj *event, LONG exl) @@ -543,9 +527,7 @@ static void _test_event_offsetx(unsigned line, IHTMLEventObj *event, LONG exl)
hres = IHTMLEventObj_get_offsetX(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_offsetX failed: %08x\n", hres); - if(exl == -10) /* don't test the exact value */ - todo_wine ok_(__FILE__,line)(l > 0, "offsetX = %d\n", l); - else + if(exl != -10) /* don't test the exact value */ ok_(__FILE__,line)(l == exl, "offsetX = %d, expected %d\n", l, exl); }
@@ -556,9 +538,7 @@ static void _test_event_offsety(unsigned line, IHTMLEventObj *event, LONG exl)
hres = IHTMLEventObj_get_offsetY(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_offsetY failed: %08x\n", hres); - if(exl == -10) /* don't test the exact value */ - todo_wine ok_(__FILE__,line)(l > 0, "offsetY = %d\n", l); - else + if(exl != -10) /* don't test the exact value */ ok_(__FILE__,line)(l == exl, "offsetY = %d, expected %d\n", l, exl); }
@@ -569,14 +549,8 @@ static void _test_event_screenx(unsigned line, IHTMLEventObj *event, LONG exl)
hres = IHTMLEventObj_get_screenX(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_screenX failed: %08x\n", hres); - if(exl == -10) { /* don't test the exact value */ - if(xy_todo) - todo_wine ok_(__FILE__,line)(l > 0, "screenX = %d\n", l); - else - ok_(__FILE__,line)(l > 0, "screenX = %d\n", l); - }else { + if(exl != -10) /* don't test the exact value */ ok_(__FILE__,line)(l == exl, "screenX = %d, expected %d\n", l, exl); - } }
static void _test_event_screeny(unsigned line, IHTMLEventObj *event, LONG exl) @@ -586,14 +560,8 @@ static void _test_event_screeny(unsigned line, IHTMLEventObj *event, LONG exl)
hres = IHTMLEventObj_get_screenY(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_screenY failed: %08x\n", hres); - if(exl == -10) { /* don't test the exact value */ - if(xy_todo) - todo_wine ok_(__FILE__,line)(l > 0, "screenY = %d\n", l); - else - ok_(__FILE__,line)(l > 0, "screenY = %d\n", l); - }else { + if(exl != -10) /* don't test the exact value for -10 */ ok_(__FILE__,line)(l == exl, "screenY = %d, expected %d\n", l, exl); - } }
static void _test_event_type(unsigned line, IHTMLEventObj *event, const char *exstr)