From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlelem.c | 40 ++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private_iface.idl | 8 ++++++ dlls/mshtml/tests/dom.js | 10 ++++++- 3 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 5cdb74c2051..42572637238 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7561,6 +7561,42 @@ static HRESULT WINAPI token_list_remove(IWineDOMTokenList *iface, BSTR token) return token_list_add_remove(iface, token, TRUE); }
+static HRESULT WINAPI token_list_toggle(IWineDOMTokenList *iface, BSTR token, VARIANT_BOOL *p) +{ + struct token_list *token_list = impl_from_IWineDOMTokenList(iface); + + FIXME("(%p)->(%s %p)\n", token_list, debugstr_w(token), p); + + return E_NOTIMPL; +} + +static HRESULT WINAPI token_list_contains(IWineDOMTokenList *iface, BSTR token, VARIANT_BOOL *p) +{ + struct token_list *token_list = impl_from_IWineDOMTokenList(iface); + + FIXME("(%p)->(%s %p)\n", token_list, debugstr_w(token), p); + + return E_NOTIMPL; +} + +static HRESULT WINAPI token_list_get_length(IWineDOMTokenList *iface, LONG *p) +{ + struct token_list *token_list = impl_from_IWineDOMTokenList(iface); + + FIXME("(%p)->(%p)\n", token_list, p); + + return E_NOTIMPL; +} + +static HRESULT WINAPI token_list_item(IWineDOMTokenList *iface, LONG index, VARIANT *p) +{ + struct token_list *token_list = impl_from_IWineDOMTokenList(iface); + + FIXME("(%p)->(%ld %p)\n", token_list, index, p); + + return E_NOTIMPL; +} + static HRESULT WINAPI token_list_toString(IWineDOMTokenList *iface, BSTR *String) { struct token_list *token_list = impl_from_IWineDOMTokenList(iface); @@ -7580,6 +7616,10 @@ static const IWineDOMTokenListVtbl WineDOMTokenListVtbl = { token_list_Invoke, token_list_add, token_list_remove, + token_list_toggle, + token_list_contains, + token_list_get_length, + token_list_item, token_list_toString };
diff --git a/dlls/mshtml/mshtml_private_iface.idl b/dlls/mshtml/mshtml_private_iface.idl index 8e4a64bda39..c0bb30fbbc8 100644 --- a/dlls/mshtml/mshtml_private_iface.idl +++ b/dlls/mshtml/mshtml_private_iface.idl @@ -159,6 +159,14 @@ interface IWineDOMTokenList : IDispatch [id(2)] HRESULT remove([in] BSTR token); [id(3)] + HRESULT toggle([in] BSTR token, [retval, out] VARIANT_BOOL *p); + [id(4)] + HRESULT contains([in] BSTR token, [retval, out] VARIANT_BOOL *p); + [propget, id(5)] + HRESULT length([retval, out] LONG *p); + [id(6)] + HRESULT item([in] LONG index, [retval, out] VARIANT *p); + [id(7)] HRESULT toString([retval, out] BSTR *String); }
diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index e5a07027f7c..85890074431 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -623,7 +623,15 @@ sync_test("hasAttribute", function() {
sync_test("classList", function() { var elem = document.createElement("div"); - var classList = elem.classList; + var classList = elem.classList, i; + + var props = [ "add", "contains", "item", "length", "remove", "toggle" ]; + for(i = 0; i < props.length; i++) + ok(props[i] in classList, props[i] + " not found in classList."); + + props = [ "entries", "forEach", "keys", "replace", "supports", "value", "values"]; + for(i = 0; i < props.length; i++) + ok(!(props[i] in classList), props[i] + " found in classList.");
classList.add("a"); ok(elem.className === "a", "Expected className 'a', got " + elem.className);
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlelem.c | 20 ++++++++++++++++++-- dlls/mshtml/tests/dom.js | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 42572637238..13941e98ee8 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7573,10 +7573,26 @@ static HRESULT WINAPI token_list_toggle(IWineDOMTokenList *iface, BSTR token, VA static HRESULT WINAPI token_list_contains(IWineDOMTokenList *iface, BSTR token, VARIANT_BOOL *p) { struct token_list *token_list = impl_from_IWineDOMTokenList(iface); + unsigned len; + HRESULT hres; + BSTR list;
- FIXME("(%p)->(%s %p)\n", token_list, debugstr_w(token), p); + TRACE("(%p)->(%s %p)\n", token_list, debugstr_w(token), p);
- return E_NOTIMPL; + if(!token || !*token) + return E_INVALIDARG; + + for(len = 0; token[len]; len++) + if(iswspace(token[len])) + return E_INVALIDARG; + + hres = IHTMLElement_get_className(token_list->element, &list); + if(FAILED(hres)) + return hres; + + *p = find_token(list, token, len) ? VARIANT_TRUE : VARIANT_FALSE; + SysFreeString(list); + return S_OK; }
static HRESULT WINAPI token_list_get_length(IWineDOMTokenList *iface, LONG *p) diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 85890074431..8f43b924a88 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -685,6 +685,43 @@ sync_test("classList", function() { } ok(exception, "Expected exception for classList.add("e f")");
+ exception = false; + try + { + classList.contains(); + } + catch(e) + { + exception = true; + } + ok(exception, "Expected exception for classList.contains()"); + + exception = false; + try + { + classList.contains(""); + } + catch(e) + { + exception = true; + } + ok(exception, "Expected exception for classList.contains("")"); + + exception = false; + try + { + classList.contains("a b"); + } + catch(e) + { + exception = true; + } + ok(exception, "Expected exception for classList.contains("a b")"); + + ok(classList.contains("4") === true, "contains: expected '4' to return true"); + ok(classList.contains("b") === true, "contains: expected 'b' to return true"); + ok(classList.contains("d") === false, "contains: expected 'd' to return false"); + classList.remove("e"); ok(elem.className === "a b c 4", "remove: expected className 'a b c 4', got " + elem.className);
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlelem.c | 23 +++++++++-------- dlls/mshtml/tests/dom.js | 56 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 12 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 13941e98ee8..807457b087b 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7464,7 +7464,7 @@ static const WCHAR *find_token(const WCHAR *list, const WCHAR *token, unsigned i return NULL; }
-static HRESULT token_list_add_remove(IWineDOMTokenList *iface, BSTR token, BOOL remove) +static HRESULT token_list_add_remove(IWineDOMTokenList *iface, BSTR token, BOOL remove, VARIANT_BOOL *toggle_ret) { struct token_list *token_list = impl_from_IWineDOMTokenList(iface); unsigned int i, len, old_len, new_len; @@ -7472,7 +7472,7 @@ static HRESULT token_list_add_remove(IWineDOMTokenList *iface, BSTR token, BOOL BSTR new, old; HRESULT hr;
- TRACE("iface %p, token %s, remove %#x.\n", iface, debugstr_w(token), remove); + TRACE("token_list %p, token %s, remove %#x, toggle_ret %p.\n", token_list, debugstr_w(token), remove, toggle_ret);
len = token ? lstrlenW(token) : 0; if (!len) @@ -7493,8 +7493,13 @@ static HRESULT token_list_add_remove(IWineDOMTokenList *iface, BSTR token, BOOL
TRACE("old %s.\n", debugstr_w(old));
- if (((old_pos = find_token(old, token, len)) && !remove) - || (!old_pos && remove)) + old_pos = find_token(old, token, len); + if (toggle_ret) + { + remove = !!old_pos; + *toggle_ret = !remove; + } + else if (!!old_pos != remove) { SysFreeString(old); return S_OK; @@ -7553,21 +7558,17 @@ static HRESULT token_list_add_remove(IWineDOMTokenList *iface, BSTR token, BOOL
static HRESULT WINAPI token_list_add(IWineDOMTokenList *iface, BSTR token) { - return token_list_add_remove(iface, token, FALSE); + return token_list_add_remove(iface, token, FALSE, NULL); }
static HRESULT WINAPI token_list_remove(IWineDOMTokenList *iface, BSTR token) { - return token_list_add_remove(iface, token, TRUE); + return token_list_add_remove(iface, token, TRUE, NULL); }
static HRESULT WINAPI token_list_toggle(IWineDOMTokenList *iface, BSTR token, VARIANT_BOOL *p) { - struct token_list *token_list = impl_from_IWineDOMTokenList(iface); - - FIXME("(%p)->(%s %p)\n", token_list, debugstr_w(token), p); - - return E_NOTIMPL; + return token_list_add_remove(iface, token, FALSE, p); }
static HRESULT WINAPI token_list_contains(IWineDOMTokenList *iface, BSTR token, VARIANT_BOOL *p) diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 8f43b924a88..f373cfb11ea 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -623,7 +623,7 @@ sync_test("hasAttribute", function() {
sync_test("classList", function() { var elem = document.createElement("div"); - var classList = elem.classList, i; + var classList = elem.classList, i, r;
var props = [ "add", "contains", "item", "length", "remove", "toggle" ]; for(i = 0; i < props.length; i++) @@ -765,6 +765,60 @@ sync_test("classList", function() { classList.remove("b"); ok(elem.className === "", "remove: expected className '', got " + elem.className);
+ exception = false; + try + { + classList.toggle(); + } + catch(e) + { + exception = true; + } + ok(exception, "Expected exception for classList.toggle()"); + + exception = false; + try + { + classList.toggle(""); + } + catch(e) + { + exception = true; + } + ok(exception, "Expected exception for classList.toggle("")"); + + exception = false; + try + { + classList.toggle("a b"); + } + catch(e) + { + exception = true; + } + ok(exception, "Expected exception for classList.toggle("a b")"); + + // toggle's second arg is not implemented by IE, and ignored + r = classList.toggle("abc"); + ok(r === true, "toggle('abc') returned " + r); + ok(elem.className === "abc", "toggle('abc'): got className " + elem.className); + + r = classList.toggle("def", false); + ok(r === true, "toggle('def', false) returned " + r); + ok(elem.className === "abc def", "toggle('def', false): got className " + elem.className); + + r = classList.toggle("123", 1234); + ok(r === true, "toggle('123', 1234) returned " + r); + ok(elem.className === "abc def 123", "toggle('123', 1234): got className " + elem.className); + + r = classList.toggle("def", true); + ok(r === false, "toggle('def', true) returned " + r); + ok(elem.className === "abc 123", "toggle('def', true): got className " + elem.className); + + r = classList.toggle("123", null); + ok(r === false, "toggle('123', null) returned " + r); + ok(elem.className === "abc", "toggle('123', null): got className " + elem.className); + elem.className = " testclass foobar "; ok(("" + classList) === " testclass foobar ", "Expected classList value ' testclass foobar ', got " + classList); ok(classList.toString() === " testclass foobar ", "Expected classList toString ' testclass foobar ', got " + classList.toString());
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlelem.c | 31 +++++++++++++++++++++++++++++-- dlls/mshtml/tests/dom.js | 5 +++++ 2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 807457b087b..fd3cf149619 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7599,10 +7599,37 @@ static HRESULT WINAPI token_list_contains(IWineDOMTokenList *iface, BSTR token, static HRESULT WINAPI token_list_get_length(IWineDOMTokenList *iface, LONG *p) { struct token_list *token_list = impl_from_IWineDOMTokenList(iface); + unsigned length = 0; + const WCHAR *ptr; + HRESULT hres; + BSTR list;
- FIXME("(%p)->(%p)\n", token_list, p); + TRACE("(%p)->(%p)\n", token_list, p);
- return E_NOTIMPL; + hres = IHTMLElement_get_className(token_list->element, &list); + if(FAILED(hres)) + return hres; + + if(!list) { + *p = 0; + return S_OK; + } + + ptr = list; + do { + while(iswspace(*ptr)) + ptr++; + if(!*ptr) + break; + length++; + ptr++; + while(*ptr && !iswspace(*ptr)) + ptr++; + } while(*ptr++); + + SysFreeString(list); + *p = length; + return S_OK; }
static HRESULT WINAPI token_list_item(IWineDOMTokenList *iface, LONG index, VARIANT *p) diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index f373cfb11ea..67eb702452d 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -635,15 +635,19 @@ sync_test("classList", function() {
classList.add("a"); ok(elem.className === "a", "Expected className 'a', got " + elem.className); + ok(classList.length === 1, "Expected length 1 for className 'a', got " + classList.length);
classList.add("b"); ok(elem.className === "a b", "Expected className 'a b', got " + elem.className); + ok(classList.length === 2, "Expected length 2 for className 'a b', got " + classList.length);
classList.add("c"); ok(elem.className === "a b c", "Expected className 'a b c', got " + elem.className); + ok(classList.length === 3, "Expected length 3 for className 'a b c', got " + classList.length);
classList.add(4); ok(elem.className === "a b c 4", "Expected className 'a b c 4', got " + elem.className); + ok(classList.length === 4, "Expected length 4 for className 'a b c 4', got " + classList.length);
classList.add("c"); ok(elem.className === "a b c 4", "(2) Expected className 'a b c 4', got " + elem.className); @@ -820,6 +824,7 @@ sync_test("classList", function() { ok(elem.className === "abc", "toggle('123', null): got className " + elem.className);
elem.className = " testclass foobar "; + ok(classList.length === 2, "Expected length 2 for className ' testclass foobar ', got " + classList.length); ok(("" + classList) === " testclass foobar ", "Expected classList value ' testclass foobar ', got " + classList); ok(classList.toString() === " testclass foobar ", "Expected classList toString ' testclass foobar ', got " + classList.toString()); });
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlelem.c | 47 ++++++++++++++++++++++++++++++++++++++-- dlls/mshtml/tests/dom.js | 13 +++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index fd3cf149619..6f3d6c37aa4 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7635,10 +7635,53 @@ static HRESULT WINAPI token_list_get_length(IWineDOMTokenList *iface, LONG *p) static HRESULT WINAPI token_list_item(IWineDOMTokenList *iface, LONG index, VARIANT *p) { struct token_list *token_list = impl_from_IWineDOMTokenList(iface); + BSTR list, token = NULL; + unsigned i = 0; + HRESULT hres; + WCHAR *ptr;
- FIXME("(%p)->(%ld %p)\n", token_list, index, p); + TRACE("(%p)->(%ld %p)\n", token_list, index, p);
- return E_NOTIMPL; + hres = IHTMLElement_get_className(token_list->element, &list); + if(FAILED(hres)) + return hres; + + if(!list) { + V_VT(p) = VT_NULL; + return S_OK; + } + + ptr = list; + do { + while(iswspace(*ptr)) + ptr++; + if(!*ptr) + break; + if(i == index) { + token = ptr++; + while(*ptr && !iswspace(*ptr)) + ptr++; + token = SysAllocStringLen(token, ptr - token); + if(!token) { + SysFreeString(list); + return E_OUTOFMEMORY; + } + break; + } + i++; + ptr++; + while(*ptr && !iswspace(*ptr)) + ptr++; + } while(*ptr++); + + SysFreeString(list); + if(!token) + V_VT(p) = VT_NULL; + else { + V_VT(p) = VT_BSTR; + V_BSTR(p) = token; + } + return S_OK; }
static HRESULT WINAPI token_list_toString(IWineDOMTokenList *iface, BSTR *String) diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 67eb702452d..8a60cb2e1e4 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -726,6 +726,19 @@ sync_test("classList", function() { ok(classList.contains("b") === true, "contains: expected 'b' to return true"); ok(classList.contains("d") === false, "contains: expected 'd' to return false");
+ r = classList.item(-1); + ok(r === null, "item(-1) = " + r); + r = classList.item(0); + ok(r === "a", "item(0) = " + r); + r = classList.item(1); + ok(r === "b", "item(1) = " + r); + r = classList.item(2); + ok(r === "c", "item(2) = " + r); + r = classList.item(3); + ok(r === "4", "item(3) = " + r); + r = classList.item(4); + ok(r === null, "item(4) = " + r); + classList.remove("e"); ok(elem.className === "a b c 4", "remove: expected className 'a b c 4', got " + elem.className);
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlelem.c | 61 +++++++++++++++++++++++++++++++++++- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/dom.js | 33 +++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 6f3d6c37aa4..21a1ad69254 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7710,6 +7710,9 @@ static const IWineDOMTokenListVtbl WineDOMTokenListVtbl = { token_list_toString };
+/* idx can be negative, so offset it halfway through custom dispids */ +#define DISPID_TOKENLIST_0 (MSHTML_DISPID_CUSTOM_MIN + (MSHTML_DISPID_CUSTOM_MAX+1 - MSHTML_DISPID_CUSTOM_MIN) / 2) + static inline struct token_list *token_list_from_DispatchEx(DispatchEx *iface) { return CONTAINING_RECORD(iface, struct token_list, dispex); @@ -7736,8 +7739,64 @@ static HRESULT token_list_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPP return S_OK; }
+static HRESULT token_list_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags, DISPID *dispid) +{ + WCHAR *end; + LONG idx; + ULONG i; + + idx = wcstol(name, &end, 10); + if(*end) + return DISP_E_UNKNOWNNAME; + + i = idx + DISPID_TOKENLIST_0 - MSHTML_DISPID_CUSTOM_MIN; + if(i > MSHTML_CUSTOM_DISPID_CNT) + return DISP_E_UNKNOWNNAME; + + *dispid = MSHTML_DISPID_CUSTOM_MIN + i; + return S_OK; +} + +static HRESULT token_list_get_name(DispatchEx *dispex, DISPID id, BSTR *name) +{ + LONG idx = id - MSHTML_DISPID_CUSTOM_MIN; + WCHAR buf[12]; + UINT len; + + len = swprintf(buf, ARRAY_SIZE(buf), L"%d", idx); + return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY; +} + +static HRESULT token_list_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, + VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller) +{ + struct token_list *token_list = token_list_from_DispatchEx(dispex); + + TRACE("(%p)->(%lx %lx %x %p %p %p %p)\n", token_list, id, lcid, flags, params, res, ei, caller); + + switch(flags) { + case DISPATCH_PROPERTYGET: + return token_list_item(&token_list->IWineDOMTokenList_iface, id - DISPID_TOKENLIST_0, res); + case DISPATCH_PROPERTYPUTREF|DISPATCH_PROPERTYPUT: + case DISPATCH_PROPERTYPUTREF: + case DISPATCH_PROPERTYPUT: + /* Ignored by IE */ + return S_OK; + case DISPATCH_METHOD|DISPATCH_PROPERTYGET: + case DISPATCH_METHOD: + return MSHTML_E_NOT_FUNC; + default: + break; + } + + return MSHTML_E_INVALID_ACTION; +} + static const dispex_static_data_vtbl_t token_list_dispex_vtbl = { - token_list_value + token_list_value, + token_list_get_dispid, + token_list_get_name, + token_list_invoke };
static const tid_t token_list_iface_tids[] = { diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 8a14d2ee47f..4bc492f7532 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -75,6 +75,7 @@ #define MSHTML_E_INVALID_PROPERTY 0x800a01b6 #define MSHTML_E_INVALID_ACTION 0x800a01bd #define MSHTML_E_NODOC 0x800a025c +#define MSHTML_E_NOT_FUNC 0x800a138a
typedef struct DOMEvent DOMEvent; typedef struct HTMLDOMNode HTMLDOMNode; diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 8a60cb2e1e4..4f2d1a5edc5 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -840,6 +840,39 @@ sync_test("classList", function() { ok(classList.length === 2, "Expected length 2 for className ' testclass foobar ', got " + classList.length); ok(("" + classList) === " testclass foobar ", "Expected classList value ' testclass foobar ', got " + classList); ok(classList.toString() === " testclass foobar ", "Expected classList toString ' testclass foobar ', got " + classList.toString()); + + r = classList[-1]; + ok(r === null, "classList[-1] = " + r); + r = classList[0]; + ok(r === "testclass", "classList[0] = " + r); + r = classList[1]; + ok(r === "foobar", "classList[1] = " + r); + r = classList[2]; + ok(r === null, "classList[2] = " + r); + + classList[0] = "barfoo"; + classList[2] = "added"; + ok(classList.toString() === " testclass foobar ", "Expected classList toString to not be changed after setting indexed props, got " + classList.toString()); + + try + { + classList[0](); + ok(false, "Expected exception calling classList[0]"); + } + catch(e) + { + ok(e.number === 0xa138a - 0x80000000, "Calling classList[0] threw " + e.number); + } + + try + { + new classList[0](); + ok(false, "Expected exception calling classList[0] as constructor"); + } + catch(e) + { + ok(e.number === 0xa01bd - 0x80000000, "Calling classList[0] as constructor threw " + e.number); + } });
sync_test("importNode", function() {
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=133180
Your paranoid android.
=== w1064v1507 (64 bit report) ===
mshtml: script.c:937: Test failed: L"/index.html?xhr.js: unexpected order: 0,1,2,3,sync_xhr(4),nested(4),4,async_xhr(3),async_xhr(4),sync_xhr_in_async,async_xhr2(3),async_xhr2(4),msg1,timeout,timeout_sync,timeout_nested" script.c:937: Test failed: L"/index.html?xhr.js: [iframes 1] unexpected order: 0,1,_sync,_nested,_async,async_xhr,echo,sync_xhr(pre-send),sync_xhr(DONE),sync_xhr,async_xhr(DONE)"
On Fri May 26 15:01:47 2023 +0000, **** wrote:
Marvin replied on the mailing list:
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=133180 Your paranoid android. === w1064v1507 (64 bit report) === mshtml: script.c:937: Test failed: L"/index.html?xhr.js: unexpected order: 0,1,2,3,sync_xhr(4),nested(4),4,async_xhr(3),async_xhr(4),sync_xhr_in_async,async_xhr2(3),async_xhr2(4),msg1,timeout,timeout_sync,timeout_nested" script.c:937: Test failed: L"/index.html?xhr.js: [iframes 1] unexpected order: 0,1,_sync,_nested,_async,async_xhr,echo,sync_xhr(pre-send),sync_xhr(DONE),sync_xhr,async_xhr(DONE)"
Unrelated to this MR, but it looks like in this rare case native "delayed" all the postMessages other than the first one in the test, all the way to the iframe test, including after the event handler was removed and changed to another one. Probably a bug. If you have any idea how to protect against it in the test let me know.
This merge request was approved by Jacek Caban.