Jacek Caban : mshtml: Added IHTMLElement:removeAttribute tests.

Alexandre Julliard julliard at winehq.org
Wed Mar 24 15:54:45 CDT 2010


Module: wine
Branch: master
Commit: 621694efcdb9966bfb1880f379f120f79fb9bd59
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=621694efcdb9966bfb1880f379f120f79fb9bd59

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Mar 24 20:01:19 2010 +0100

mshtml: Added IHTMLElement:removeAttribute tests.

---

 dlls/mshtml/tests/jstest.html |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/tests/jstest.html b/dlls/mshtml/tests/jstest.html
index 72ef427..6192f81 100644
--- a/dlls/mshtml/tests/jstest.html
+++ b/dlls/mshtml/tests/jstest.html
@@ -5,12 +5,30 @@ function ok(b,m) {
     return external.ok(b, m);
 }
 
+function test_removeAttribute(e) {
+    ok(e.removeAttribute('nonexisting') === false, "removeAttribute('nonexisting') didn't return false");
+
+    e.title = "title";
+    ok(e.removeAttribute('title') === true, "removeAttribute('title') didn't return true");
+    ok(e.title === "", "e.title = " + e.title);
+    ok(("title" in e) === true, "title is not in e");
+
+    e["myattr"] = "test";
+    ok(e.removeAttribute('myattr') === true, "removeAttribute('myattr') didn't return true");
+    ok(e["myattr"] === undefined, "e['myattr'] = " + e['myattr']);
+    ok(("myattr" in e) === false, "myattr is in e");
+
+}
+
 function runTest() {
     obj = new Object();
     ok(obj === window.obj, "obj !== window.obj");
 
     ok(typeof(divid) === "object", "typeof(divid) = " + typeof(divid));
 
+    test_removeAttribute(document.getElementById("divid"));
+    test_removeAttribute(document.body);
+
     external.reportSuccess();
 }
 </script>




More information about the wine-cvs mailing list