Opened 7 years ago

Closed 7 years ago

#14749 closed defect (fixed)

XHR test failure on IE8

Reported by: bill Owned by: Rawld Gill
Priority: undecided Milestone: 1.8
Component: Core Version: 1.7.1
Keywords: dohfail Cc:
Blocked By: Blocking: #14406

Description

Works in 1.7, fails on trunk:

    _AssertFailure: assertEqual() failed: 	expected
		[object Object]
	but got
		undefined

     ERROR IN: 		 function jsContentHandler(t){
							var jsonObj = {
								foo: "bar",
								baz: [
									{ thonk: "blarg" },
									"xyzzy!"
								]
							};
							t.is(jsonObj,
								dojo._contentHandlers["javascript"]({
									responseText: "("+dojo.toJson(jsonObj)+")"
								})
							);
							t.t(dojo._contentHandlers["javascript"]({
									responseText: "true;"
								})
							);
							t.f(dojo._contentHandlers["javascript"]({
									responseText: "false;"
								})
							);
						} FAILED test: ../../dojo/tests/_base/xhr.html::t::jsContentHandler 0 ms

Change History (4)

comment:1 Changed 7 years ago by bill

Blocking: 14406 added
Keywords: dohfail added
Milestone: tbd1.8
Owner: set to Rawld Gill
Status: newassigned

Rawld, this started with [27764].

comment:3 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [27791]:

yet another attempt to fix defective dojo.eval without breaking current usages; fixes #14749; refs #14406; !strict

comment:4 Changed 7 years ago by liucougar

Resolution: fixed
Status: closedreopened

dojo.eval has always returns a value in IE since the API is available. I think it's more important to keep the behavior of returning a variable for IE than to make IE eval in true global scope: this is a regression from earlier versions of dojo (dojo.eval has always been not able to eval in global scope in IE, but it always returns value in IE)

comment:5 in reply to:  4 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: reopenedclosed

Replying to liucougar:

dojo.eval has always returns a value in IE since the API is available. I think it's more important to keep the behavior of returning a variable for IE than to make IE eval in true global scope: this is a regression from earlier versions of dojo (dojo.eval has always been not able to eval in global scope in IE, but it always returns value in IE)

Not sure why you reopened. dojo.eval does return a value in IE with the latest change. Note that this ticket was closed with a changeset that missed a file...that mistake was immediately corrected in [27798]

Note: See TracTickets for help on using tickets.