Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#16121 closed task (fixed)

IE10 dijit place failures

Reported by: haysmark Owned by: bill
Priority: undecided Milestone: 1.7.6
Component: Dijit Version: 1.7.4rc1
Keywords: dohfail Cc:
Blocked By: Blocking:

Description (last modified by haysmark)

 GROUP "dijit/_base/place" has 13 tests to run
 PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenTL 6 ms
 PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenTR 9 ms
     _AssertFailure: assertEqual() failed:
 	expected
		358.3999938964844px
	but got
		358.39px

 with hint: 
		left sides aligned

     ERROR IN:
 		 function placeOnScreenAroundNodeT(t){
						// Dropdown from "aroundTop" node. Should pick the second choice, since the first
						// goes offscreen.
						var ret = dijit.placeOnScreenAroundNode(popup, aroundTop, {
							"TL": "BL",	// aroundTop's top-left corner with the popup's bottom-left corner (fails)
							"BL": "TL",	// aroundTop's bottom-left corner with the popup's top-left corner (works)
							"BR": "TR"	// aroundTop's bottom-right corner with the popup's top-right corner (works)
						});

						doh.is("BL", ret.aroundCorner, "around corner");
						doh.is("TL", ret.corner, "popup's corner");
						doh.is("20px", popup.style.top, "underneath around node");
						doh.is(dojo.position(aroundTop).x+"px", popup.style.left, "left sides aligned");
					}
 FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeT 8 ms
     _AssertFailure: assertEqual() failed:
 	expected
		378.3999938964844
	but got
		378.3899841308594

 with hint: 
		right sides aligned

     ERROR IN:
 		 function placeOnScreenAroundNodeTooltip(t){
						// Same as above test except that shape of drop down changes depending on where it's positioned.
						// Simulates tooltip placement (tooltip shape changes b/c of the arrow).
						// Should pick the third choice this time

						function layoutNode(node, aroundCorner, nodeCorner){
							node.style.width = (nodeCorner == "TL" ? "5000px" : "75px");
						}
						var ret = dijit.placeOnScreenAroundNode(popup, aroundTop, {
							"TL": "BL",	// aroundTop's top-left corner with the popup's bottom-left corner (fails)
							"BL": "TL",	// aroundTop's bottom-left corner with the popup's top-left corner (works)
							"BR": "TR"	// aroundTop's bottom-right corner with the popup's top-right corner (works)
						}, layoutNode);

						doh.is("BR", ret.aroundCorner, "around corner");
						doh.is("TR", ret.corner, "popup's corner");
						doh.is("20px", popup.style.top, "underneath around node");
						doh.is(dojo.position(aroundTop).x+dojo.position(aroundTop).w,
							dojo.position(popup).x+dojo.position(popup).w,
							"right sides aligned");
					}
 FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeTooltip 46 ms
 PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeB 8 ms
     _AssertFailure: assertEqual() failed:
 	expected
		566
	but got
		565.989990234375

 with hint: 
		above around node

     ERROR IN:
 		 function placeOnScreenAroundNodeBM(t){
						// bottom middle popup from "aroundBottom" node
						var ret = dijit.placeOnScreenAroundNode(popup, aroundBottom, {
							"TR": "TL",	// aroundBottom's top-right corner with the popup's top-left corner (fails)
							"TM": "BM",	// aroundBottom's top-middle with the popup's bottom-middle (works)
							"BM": "TM",	// aroundBottom's bottom-middle with the popup's top-middle (fails)
							"TL": "TR"	// aroundBottom's top-left corner with the popup's top-right corner (fails)
						});

						doh.is("TM", ret.aroundCorner, "around middle");
						doh.is("BM", ret.corner, "popup's middle");
						var popupPos = dojo.position(popup);
						var aroundPos = dojo.position(aroundBottom);
						doh.is(aroundPos.y, popupPos.y + popupPos.h, "above around node");
						doh.t(aroundPos.x > popupPos.x, "starts before around node");
						doh.t(aroundPos.x < (popupPos.x + popupPos.w), "ends after around node");
					}
 FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeBM 20 ms
 PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeTM 9 ms
 PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeML 8 ms
     _AssertFailure: assertEqual() failed:
 	expected
		695.7899780273437
	but got
		695.7999877929687

 with hint: 
		before around node

     ERROR IN:
 		 function placeOnScreenAroundNodeMR(t){
						// middle left popup from "aroundRight" node
						var ret = dijit.placeOnScreenAroundNode(popup, aroundRight, {
							"BL": "TL",	// aroundRight's bottom-left corner with the popup's top-left corner (fails)
							"MR": "ML",	// aroundRight's middle-right with the popup's middle-left (fails)
							"ML": "MR",	// aroundRight's middle-left with the popup's middle-right (works)
							"TL": "BL"	// aroundRight's top-left corner with the popup's bottom-left corner (fails)
						});

						doh.is("ML", ret.aroundCorner, "around middle");
						doh.is("MR", ret.corner, "popup's middle");
						var popupPos = dojo.position(popup);
						var aroundPos = dojo.position(aroundRight);
						doh.is(popupPos.x + popupPos.w, aroundPos.x, "before around node");
						doh.t(aroundPos.y > popupPos.y, "starts before around node");
						doh.t(aroundPos.y < (popupPos.y + popupPos.h), "ends after around node");
					}
 FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeMR 11 ms
 PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeMLB 8 ms
     _AssertFailure: assertEqual() failed:
 	expected
		717
	but got
		716.7999877929687

 with hint: 
		right aligned with around node

     ERROR IN:
 		 function placeOnScreenAroundNodeMRT(t){
						// top middle popup from "aroundRight" node
						var ret = dijit.placeOnScreenAroundNode(popup, aroundRight, {
							"BL": "TL",	// aroundRight's bottom-left corner with the popup's top-left corner (fails)
							"TM": "BM",	// aroundRight's top-middle with the popup's bottom-middle (works)
							"TL": "BL"	// aroundRight's top-left corner with the popup's bottom-left corner (fails)
						});

						doh.is("TM", ret.aroundCorner, "around middle");
						doh.is("BM", ret.corner, "popup's middle");
						var popupPos = dojo.position(popup);
						var aroundPos = dojo.position(aroundRight);
						doh.is(popupPos.x + popupPos.w, aroundPos.x + aroundPos.w + 1/*right:1px*/, "right aligned with around node");
						doh.is(popupPos.y + popupPos.h, aroundPos.y, "above around node");
					}
 FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeMRT 15 ms
     _AssertFailure: assertEqual() failed:
 	expected
		358.3999938964844
	but got
		358.3899841308594

 with hint: 
		before around node

     ERROR IN:
 		 function placeOnScreenAroundNodeTML(t){
						// middle left popup from "aroundTop" node
						var ret = dijit.placeOnScreenAroundNode(popup, aroundTop, {
							"BL": "BR",	// aroundTop's bottom-left corner with the popup's bottom-right corner (fails)
							"ML": "MR",	// aroundTop's middle-left with the popup's middle-right (works)
							"BR": "BL"	// aroundTop's bottom-right corner with the popup's bottom-left corner (fails)
						});

						doh.is("ML", ret.aroundCorner, "around middle");
						doh.is("MR", ret.corner, "popup's middle");
						var popupPos = dojo.position(popup);
						var aroundPos = dojo.position(aroundTop);
						doh.is(aroundPos.x, popupPos.x + popupPos.w, "before around node");
						doh.is(aroundPos.y, popupPos.y, "top aligned with around node");
					}
 FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeTML 12 ms
     _AssertFailure: assertEqual() failed:
 	expected
		378.3999938964844
	but got
		378.3899841308594

 with hint: 
		after around node

     ERROR IN:
 		 function placeOnScreenAroundNodeBMR(t){
						// middle right popup from "aroundBottom" node
						var ret = dijit.placeOnScreenAroundNode(popup, aroundBottom, {
							"TL": "TR",	// aroundBottom's top-left corner with the popup's top-right corner (fails)
							"MR": "ML",	// aroundBottom's middle-right with the popup's middle-left (works)
							"TR": "TL"	// aroundBottom's top-right corner with the popup's top-left corner (fails)
						});

						doh.is("MR", ret.aroundCorner, "around middle");
						doh.is("ML", ret.corner, "popup's middle");
						var popupPos = dojo.position(popup);
						var aroundPos = dojo.position(aroundBottom);
						doh.is(aroundPos.x + aroundPos.w, popupPos.x, "after around node");
						doh.is(aroundPos.y + aroundPos.h + 5/*bottom:5px*/, popupPos.y + popupPos.h, "bottom aligned with around node");
					}
 FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeBMR 19 ms
 GROUP "around" has 9 tests to run
     _AssertFailure: assertEqual() failed:
 	expected
		358.3999938964844px
	but got
		358.39px

 with hint: 
		left sides aligned

     ERROR IN:
 		 function aroundT(t){
					// Dropdown from "aroundTop" node. Should pick the second choice, since the first
					// goes off screen.
					var ret = place.around(popup, aroundTop, [
						"above",	// aroundTop's top-left corner with the popup's bottom-left corner (fails)
						"below",	// aroundTop's bottom-left corner with the popup's top-left corner (works)
						"below-alt"	// aroundTop's bottom-right corner with the popup's top-right corner (works)
					], true);

					doh.is("BL", ret.aroundCorner, "around corner");
					doh.is("TL", ret.corner, "popup's corner");
					doh.is("20px", popup.style.top, "underneath around node");
					doh.is(domGeometry.position(aroundTop).x+"px", popup.style.left, "left sides aligned");
				}
 FAILED test: ../../dijit/tests/place.html::around::aroundT 14 ms
     _AssertFailure: assertEqual() failed:
 	expected
		378.3999938964844
	but got
		378.3899841308594

 with hint: 
		right sides aligned

     ERROR IN:
 		 function aroundTooltip(t){
					// Same as above test except that shape of drop down changes depending on where it's positioned.
					// Simulates tooltip placement (tooltip shape changes b/c of the arrow).
					// Should pick the third choice this time

					function layoutNode(node, aroundCorner, nodeCorner){
						node.style.width = (nodeCorner == "TL" ? "5000px" : "75px");
					}
					var ret = place.around(popup, aroundTop, [
						"above",	// aroundTop's top-left corner with the popup's bottom-left corner (fails)
						"below",	// aroundTop's bottom-left corner with the popup's top-left corner (works)
						"below-alt"	// aroundTop's bottom-right corner with the popup's top-right corner (works)
					], true, layoutNode);

					doh.is("BR", ret.aroundCorner, "around corner");
					doh.is("TR", ret.corner, "popup's corner");
					doh.is("20px", popup.style.top, "underneath around node");
					doh.is(domGeometry.position(aroundTop).x+domGeometry.position(aroundTop).w,
						domGeometry.position(popup).x+domGeometry.position(popup).w,
						"right sides aligned");
				}
 FAILED test: ../../dijit/tests/place.html::around::aroundTooltip 26 ms
 PASSED test: ../../dijit/tests/place.html::around::aroundB 9 ms
     _AssertFailure: assertEqual() failed:
 	expected
		566
	but got
		565.989990234375

 with hint: 
		above around node

     ERROR IN:
 		 function aroundBM(t){
					// bottom middle popup from "aroundBottom" node
					var ret = place.around(popup, aroundBottom, [
						"above-centered",	// aroundBottom's top-middle with the popup's bottom-middle (works)
						"below-centered"	// aroundBottom's bottom-middle with the popup's top-middle (fails)
					], true);

					doh.is("TM", ret.aroundCorner, "around middle");
					doh.is("BM", ret.corner, "popup's middle");
					var popupPos = domGeometry.position(popup);
					var aroundPos = domGeometry.position(aroundBottom);
					doh.is(aroundPos.y, popupPos.y + popupPos.h, "above around node");
					doh.t(aroundPos.x > popupPos.x, "starts before around node");
					doh.t(aroundPos.x < (popupPos.x + popupPos.w), "ends after around node");
				}
 FAILED test: ../../dijit/tests/place.html::around::aroundBM 8 ms
 PASSED test: ../../dijit/tests/place.html::around::aroundTM 12 ms
 PASSED test: ../../dijit/tests/place.html::around::aroundML 9 ms
     _AssertFailure: assertEqual() failed:
 	expected
		695.7899780273437
	but got
		695.7999877929687

 with hint: 
		before around node

     ERROR IN:
 		 function aroundMR(t){
					// middle left popup from "aroundRight" node
					var ret = place.around(popup, aroundRight, [
						"after-centered",	// aroundRight's middle-right with the popup's middle-left (fails)
						"before-centered"	// aroundRight's middle-left with the popup's middle-right (works)
					], true);

					doh.is("ML", ret.aroundCorner, "around middle");
					doh.is("MR", ret.corner, "popup's middle");
					var popupPos = domGeometry.position(popup);
					var aroundPos = domGeometry.position(aroundRight);
					doh.is(popupPos.x + popupPos.w, aroundPos.x, "before around node");
					doh.t(aroundPos.y > popupPos.y, "starts before around node");
					doh.t(aroundPos.y < (popupPos.y + popupPos.h), "ends after around node");
				}
 FAILED test: ../../dijit/tests/place.html::around::aroundMR 9 ms
 PASSED test: ../../dijit/tests/place.html::around::aroundMLB 9 ms
     _AssertFailure: assertEqual() failed:
 	expected
		715.7899780273437
	but got
		715.7999877929687

 with hint: 
		right aligned with around node

     ERROR IN:
 		 function aroundMRT(t){
					// This will put the drop-down above the "aroundRight" node, first trying to left-align
					// but since that doesn't work then trying to right-align.
					var ret = place.around(popup, aroundRight, ["above"], true);

					doh.is("TR", ret.aroundCorner, "around right");
					doh.is("BR", ret.corner, "popup's right");
					var popupPos = domGeometry.position(popup);
					var aroundPos = domGeometry.position(aroundRight);
					doh.is(popupPos.x + popupPos.w, aroundPos.x + aroundPos.w, "right aligned with around node");
					doh.is(popupPos.y + popupPos.h, aroundPos.y, "above around node");
				}
 FAILED test: ../../dijit/tests/place.html::around::aroundMRT 12 ms
 PASSED test: ../../dijit/tests/place.html 503 ms

Change History (20)

comment:1 Changed 7 years ago by haysmark

Keywords: dohfail added

comment:2 Changed 7 years ago by haysmark

Description: modified (diff)

comment:3 Changed 7 years ago by bill

Milestone: tbd1.9
Status: newassigned

Thanks, I'll check in a fix to trunk. Since it's only changes to the test I guess it doesn't need to be backported.

comment:4 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [29792]:

Avoid spurious failures due to IE10 rounding errors, fixes #16121

comment:5 Changed 7 years ago by haysmark

Version: 1.8.01.7.4rc1

Would like to see [29792] backported to 1.7.

comment:6 Changed 7 years ago by bill

In [29951]:

backport [29792] to 1.8 branch, refs #16121

comment:7 Changed 7 years ago by bill

Milestone: 1.91.8.2

1.7 doesn't even have a place.html test file, where are you seeing failures?

comment:8 Changed 7 years ago by haysmark

The errors are for dijit/tests/_base/place, which is in 1.7.

comment:9 Changed 7 years ago by bill

In [30104]:

test fixes for dojo/tests/_base/place test not to fail on 1.7 branch due to rounding issues on IE10, fixes #16121 on 1.7 branch

comment:10 Changed 7 years ago by bill

Milestone: 1.8.21.7.5
Type: defecttask

comment:11 Changed 7 years ago by bill

Marked as task since it was only a test issue.

comment:12 Changed 7 years ago by bill

In [30202]:

remove "debugger" statement accidentally checked in, refs #16121 !strict

comment:13 Changed 7 years ago by bill

In [30203]:

test fixes for dojo/tests/_base/place test not to fail on 1.7 branch due to rounding issues on IE10, fixes #16121 on 1.6 branch

comment:14 Changed 7 years ago by bill

Milestone: 1.7.51.6.2

comment:15 Changed 7 years ago by bill

In [31081]:

avoid rounding errors in dijit/tests/_base/place.html, refs #16121

comment:16 Changed 7 years ago by bill

In [31082]:

avoid more rounding errors in dijit/tests/place.html, refs #16121

comment:17 Changed 7 years ago by bill

Milestone: 1.6.21.9

Since some of the test fixes are only in trunk (i.e. 1.9), changing milestone. (If someone wants to backport them, feel free.)

comment:18 Changed 5 years ago by bill

Milestone: 1.91.8.6

[31081] and [31082] were backported to 1.8 in 948cda25a51f8f065a99c1d018beb6889cb3a380.

comment:19 Changed 5 years ago by Bill Keese <bill@…>

In 638463a08991c06891fa37f414f14f049813842a/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:20 Changed 5 years ago by bill

Milestone: 1.8.61.7.6
Note: See TracTickets for help on using tickets.