Opened 9 years ago

Closed 9 years ago

#11279 closed defect (fixed)

Add Support for Safari5

Reported by: Chris Mitchell Owned by: Adam Peller
Priority: high Milestone: 1.5
Component: Core Version: 1.5.0rc1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Adam Peller)

Add support Safari5 which released today on OSX and Windows platforms.

Results of testing on Mac OSX SnowLeopard? with Safari5 so far (just dojo and dijit). No tests were run on dojox yet:


1 Dojo core testcase failure:

    _AssertFailure: doh._AssertFailure: assertTrue('false') failed: assertTrue('false') failed
     ERROR IN:
 		 function testDateProp(t) {
							// dateProp1 specified as 2006-1-1
							t.is("2006-01-01", dojo.date.stamp.toISOString(obj.dateProp1, {selector: 'date'}));
							
							// dateProp2="", should map to NaN (a blank value on DateTextBox)
							t.t(isNaN(obj.dateProp2));
							
							// dateProp3="now", should map to current date
							t.is(dojo.date.stamp.toISOString(new Date(), {selector: 'date'}),
								dojo.date.stamp.toISOString(obj.dateProp3, {selector: 'date'}));
						}
 FAILED test: ../../dojo/tests/parser.html::t::testDateProp 1 ms

================

Numerous Dijit testcase failures (not sure if these are just known limitations on Safari 4 for a11y...most seem to be for a11y support)

FAILED test: ../../dijit/tests/robot/TooltipDialog_a11y.html::interacton with autosave InlineEditBox::InlineEditBox edit mode, change value, then Tab 5104 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		enter
	but got
		inline

 with hint: 
		value changed to enter
: assertEqual() failed:
	expected
		enter
	but got
		inline

 with hint: 
		value changed to enter
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();

							var button = dijit.byId("tooltipDlgButton"),
								inlineEditBox = dijit.byId("inline");
							
							// open TooltipDialog
							doh.robot.sequence(function(){
								button.focus();
							}, 500);
							doh.robot.keyPress(dojo.keys.SPACE, 500, {});

							doh.robot.sequence(d.getTestErrback(function(){
								doh.t(button._opened, "TooltipDialog should be showing");
								doh.f(inlineEditBox.editing, "InlineEditBox not in edit mode yet");
							}), 1000);

							// edit InlineEditBox
							doh.robot.keyPress(dojo.keys.SPACE, 0, {});

							doh.robot.sequence(d.getTestErrback(function(){
								doh.t(button._opened, "TooltipDialog should still be showing");
								doh.t(inlineEditBox.editing, "InlineEditBox in edit mode");
							}), 1000);

							// type something
							doh.robot.typeKeys("enter", 0, 600);

							// save edit
							doh.robot.keyPress(dojo.keys.ENTER, 500, {});

							doh.robot.sequence(d.getTestErrback(function(){
								doh.t(button._opened, "TooltipDialog should still still be showing");
								doh.f(inlineEditBox.editing, "Tab should have exited InlineEditBox edit mode");
								doh.is("enter", inlineEditBox.get("value"), "value changed to enter");
							}), 1000);

							// close TooltipDialog
							doh.robot.keyPress(dojo.keys.ESCAPE, 0, {});

							doh.robot.sequence(d.getTestCallback(function(){
								doh.f(button._opened, "TooltipDialog closed");
							}), 500);

							return d;
						}
 FAILED test: ../../dijit/tests/robot/TooltipDialog_a11y.html::interacton with autosave InlineEditBox::InlineEditBox edit mode, change value, then Enter 5604 ms

-----
: assertEqual() failed:
	expected
		enter
	but got
		inline

 with hint: 
		value changed to enter
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();

							var button = dijit.byId("tooltipDlgButton"),
								inlineEditBox = dijit.byId("inline");
							
							// open TooltipDialog
							doh.robot.sequence(function(){
								button.focus();
							}, 500);
							doh.robot.keyPress(dojo.keys.SPACE, 500, {});

							doh.robot.sequence(d.getTestErrback(function(){
								doh.t(button._opened, "TooltipDialog should be showing");
								doh.f(inlineEditBox.editing, "InlineEditBox not in edit mode yet");
							}), 1000);

							// edit InlineEditBox
							doh.robot.keyPress(dojo.keys.SPACE, 0, {});

							doh.robot.sequence(d.getTestErrback(function(){
								doh.t(button._opened, "TooltipDialog should still be showing");
								doh.t(inlineEditBox.editing, "InlineEditBox in edit mode");
							}), 1000);

							// type something
							doh.robot.typeKeys("enter", 0, 600);

							// save edit
							doh.robot.keyPress(dojo.keys.ENTER, 500, {});

							doh.robot.sequence(d.getTestErrback(function(){
								doh.t(button._opened, "TooltipDialog should still still be showing");
								doh.f(inlineEditBox.editing, "Tab should have exited InlineEditBox edit mode");
								doh.is("enter", inlineEditBox.get("value"), "value changed to enter");
							}), 1000);

							// close TooltipDialog
							doh.robot.keyPress(dojo.keys.ESCAPE, 0, {});

							doh.robot.sequence(d.getTestCallback(function(){
								doh.f(button._opened, "TooltipDialog closed");
							}), 500);

							return d;
						}
 FAILED test: ../../dijit/tests/robot/TooltipDialog_a11y.html::interacton with autosave InlineEditBox::InlineEditBox edit mode, change value, then Enter 5604 ms
-----
FAILED test: ../../dijit/tests/robot/InlineEditBox.html::dijit.InlineEditBox autosave tests::CurrencyTextBox invalid value: blur 6204 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		dollar
	but got
		

 with hint: 
		displayedValue
: assertEqual() failed:
	expected
		dollar
	but got
		

 with hint: 
		displayedValue
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							var inlineBox = dijit.byId("dollar_as");
							moveAndClick(inlineBox.domNode);
							doh.robot.typeKeys("dollar", 1000, 1200); // invalid
							doh.robot.keyPress(dojo.keys.ENTER, 500, {});
							doh.robot.sequence(d.getTestErrback(function(){
								var currencyTextBox = inlineBox.wrapperWidget.editWidget;
								doh.is('dollar', currencyTextBox.get("displayedValue"), "displayedValue");
								doh.f(currencyTextBox.isValid(), "!isValid");
							}), 1000);
							doh.robot.keyPress(dojo.keys.ESCAPE, 500, {});
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is('', inlineBox.get("value"), "value");
							}), 1000);
							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::dijit.InlineEditBox autosave tests::CurrencyTextBox invalid value: ENTER 5202 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		$123.00
	but got
		

 with hint: 
		value
: assertEqual() failed:
	expected
		$123.00
	but got
		

 with hint: 
		value
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							var inlineBox = dijit.byId("dollar_as");
							moveAndClick(inlineBox.domNode);
							doh.robot.typeKeys("123", 1000, 600);
							moveAndClick("predefined");
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is("$123.00", inlineBox.get("value"), "value");
							}), 1000);
							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::dijit.InlineEditBox autosave tests::CurrencyTextBox valid value: blur 7103 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		$234.00
	but got
		

 with hint: 
		value
: assertEqual() failed:
	expected
		$234.00
	but got
		

 with hint: 
		value
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							var inlineBox = dijit.byId("dollar_as");
							moveAndClick(inlineBox.domNode);
							doh.robot.typeKeys("234", 1000, 600);
							doh.robot.keyPress(dojo.keys.ENTER, 500, {});
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is('$234.00', inlineBox.get("value"), "value");
							}), 1000);
							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::dijit.InlineEditBox autosave tests::CurrencyTextBox valid value: ENTER 4602 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		$234.00
	but got
		

 with hint: 
		value
: assertEqual() failed:
	expected
		$234.00
	but got
		

 with hint: 
		value
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							var inlineBox = dijit.byId("dollar_as");
							moveAndClick(inlineBox.domNode);
							doh.robot.typeKeys("345", 1000, 600);
							doh.robot.keyPress(dojo.keys.ESCAPE, 500, {});
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is("$234.00", inlineBox.get("value"), "value");
							}), 1000);
							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::dijit.InlineEditBox autosave tests::CurrencyTextBox valid value: ESCAPE 4602 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		$456.00
	but got
		

 with hint: 
		value
: assertEqual() failed:
	expected
		$456.00
	but got
		

 with hint: 
		value
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							var inlineBox = dijit.byId("dollar_as");
							moveAndClick(inlineBox.domNode);
							doh.robot.typeKeys("456", 1000, 600);
							doh.robot.keyPress(dojo.keys.TAB, 500, {});
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is('$456.00', inlineBox.get("value"), "value");
							}), 1000);
							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::dijit.InlineEditBox autosave tests::CurrencyTextBox valid value: TAB 4602 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		$567.00
	but got
		

 with hint: 
		value
: assertEqual() failed:
	expected
		$567.00
	but got
		

 with hint: 
		value
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							var inlineBox = dijit.byId("editable");
							moveAndClick(inlineBox.domNode);
							doh.robot.typeKeys("editable", 1000, 1600);
							doh.robot.keyPress(dojo.keys.TAB, 500, {});
							doh.robot.keyPress(dojo.keys.TAB, 1500, {}); // wait more than 1 second to TAB
							doh.robot.keyPress(dojo.keys.ENTER, 500, {});
							doh.robot.typeKeys("567", 500, 600);
							doh.robot.keyPress(dojo.keys.ENTER, 500, {});
							doh.robot.keyPress(dojo.keys.TAB, 500, {shift:true}); // do this fast
							doh.robot.keyPress(dojo.keys.TAB, 500, {shift:true}); // do this fast
							doh.robot.keyPress(dojo.keys.ENTER, 500, {}); // quickly back to editable
							doh.robot.keyPress(dojo.keys.RIGHT_ARROW, 500, {});
							doh.robot.typeKeys(" again", 1000, 1200);
							doh.robot.keyPress(dojo.keys.TAB, 500, {});
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is('$567.00', dijit.byId("dollar_as").get("value"), "value");
								doh.is('editable again', inlineBox.get("value"), "value");
							}), 1000);
							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::dijit.InlineEditBox autosave tests::Focus test 13902 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		line 1\nline 2
	but got
		

 with hint: 
		textarea programmatic value was 
: assertEqual() failed:
	expected
		line 1\nline 2
	but got
		

 with hint: 
		textarea programmatic value was 
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							var inlineBox = dijit.byId("textarea");
							moveAndClick(inlineBox.domNode);
							doh.robot.typeKeys("line 1", 1000, 1200);
							doh.robot.keyPress(dojo.keys.ENTER, 500, {});
							doh.robot.typeKeys("line 2", 500, 1200);
							moveAndClick("predefined");
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is('line 1\\nline 2', inlineBox.get("value").replace(/\n/g, "\\n"), "textarea programmatic value was " + inlineBox.get("value").replace(/\n/g, "\\n"));
								doh.is('line 1<br>line 2', inlineBox.domNode.innerHTML.toLowerCase(), "textarea rendered value was " + inlineBox.domNode.innerHTML);
							}), 1000);
							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::dijit.InlineEditBox autosave tests::Textarea test 8403 ms
-----
GROUP "renderAsHtml" has 2 tests to run
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		&lt;B&gt;not bold&lt;/B&gt;&amp;lt;input&amp;gt;end
	but got
		&lt;B&gt;not bold&lt;/B&gt;&amp;lt;input&amp;gt;

 with hint: 
		displayed value after edit
: assertEqual() failed:
	expected
		&lt;B&gt;not bold&lt;/B&gt;&amp;lt;input&amp;gt;end
	but got
		&lt;B&gt;not bold&lt;/B&gt;&amp;lt;input&amp;gt;

 with hint: 
		displayed value after edit
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();

							// confirm initial displayed value
							var inlineBox = dijit.byId("renderAsHtml_false");
							doh.is("&lt;B&gt;not bold&lt;/B&gt;&amp;lt;input&amp;gt;", dojo.trim(inlineBox.domNode.innerHTML),
								"confirm initial value (with special chars) wasn't modified");
							doh.is("<B>not bold</B>&lt;input&gt;", inlineBox.get("value"),
								"confirm initial get('value')");

							// launch editor, and make sure that special characters aren't mangled
							moveAndClick(inlineBox.domNode);
							doh.robot.sequence(d.getTestErrback(function(){
								var editor = inlineBox.wrapperWidget.editWidget;
								doh.is("<B>not bold</B>&lt;input&gt;", editor.get("value"), "initial editor value");
							}), 1000);

							// edit value and save		
							doh.robot.keyPress(dojo.keys.RIGHT_ARROW, 1000, {});
							doh.robot.typeKeys("end", 2000, 1000);
							doh.robot.keyPress(dojo.keys.ENTER, 500, {});

							// check that display value didn't mangle special characters
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is("&lt;B&gt;not bold&lt;/B&gt;&amp;lt;input&amp;gt;end", dojo.trim(inlineBox.domNode.innerHTML),
									"displayed value after edit");
								doh.is("<B>not bold</B>&lt;input&gt;end", inlineBox.get("value"),
									"get('value') after edit");
							}), 1000);

							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::renderAsHtml::false 8002 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		&lt;b&gt;not bold&lt;/b&gt;<b>bold</b>&amp;lt;input&amp;gt;end
	but got
		&lt;b&gt;not bold&lt;/b&gt;<b>bold</b>&amp;lt;input&amp;gt;

 with hint: 
		displayed value after edit
: assertEqual() failed:
	expected
		&lt;b&gt;not bold&lt;/b&gt;<b>bold</b>&amp;lt;input&amp;gt;end
	but got
		&lt;b&gt;not bold&lt;/b&gt;<b>bold</b>&amp;lt;input&amp;gt;

 with hint: 
		displayed value after edit
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();

							// confirm initial displayed value
							var inlineBox = dijit.byId("renderAsHtml_true");
							doh.is("&lt;b&gt;not bold&lt;/b&gt;<b>bold</b>&amp;lt;input&amp;gt;",
								dojo.trim(inlineBox.domNode.innerHTML).toLowerCase(),
								"confirm initial value (with special chars) wasn't modified");
							doh.is("&lt;b&gt;not bold&lt;/b&gt;<b>bold</b>&amp;lt;input&amp;gt;",
								inlineBox.get("value").toLowerCase(),
								"confirm initial get('value')");

							// launch editor, and make sure that value was passed to editor as HTML
							moveAndClick(inlineBox.domNode);
							doh.robot.sequence(d.getTestErrback(function(){
								var editor = inlineBox.wrapperWidget.editWidget;
								doh.is("&lt;b&gt;not bold&lt;/b&gt;<b>bold</b>&amp;lt;input&amp;gt;",
									editor.get("value").toLowerCase(),
									"initial editor value");
							}), 1000);

							// edit value and save		
							doh.robot.keyPress(dojo.keys.RIGHT_ARROW, 1000, {});
							doh.robot.typeKeys("end", 2000, 1000);
							doh.robot.keyPress(dojo.keys.ENTER, 500, {});

							// check that display value didn't mangle special characters
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is("&lt;b&gt;not bold&lt;/b&gt;<b>bold</b>&amp;lt;input&amp;gt;end",
									dojo.trim(inlineBox.domNode.innerHTML).toLowerCase(),
									"displayed value after edit");
								doh.is("&lt;b&gt;not bold&lt;/b&gt;<b>bold</b>&amp;lt;input&amp;gt;end",
									inlineBox.get("value").toLowerCase(),
									"get('value') after edit");
							}), 1000);

							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::renderAsHtml::true 8002 ms
 ------------------------------------------------------------
 GROUP "focus tests" has 1 test to run
     _AssertFailure: doh._AssertFailure: assertTrue('false') failed with hint: 
 		value changed
: assertTrue('false') failed with hint: 
		value changed
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							var inlineBox = dijit.byId("inlineRTE");
							moveAndClick(inlineBox.domNode);
							doh.robot.typeKeys("!start!", 1000, 1400);
							save(d, inlineBox);
							doh.robot.sequence(d.getTestCallback(function(){
								doh.t(inlineBox.get("value").indexOf('!start!') >= 0, "value changed");
							}), 1000);
							return d;
						}
 FAILED test: ../../dijit/tests/robot/InlineEditBox.html::focus tests::RTE 7403 ms
-----
ROUP "keyboard" has 3 tests to run
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		[object HTMLButtonElement]
	but got
		[object HTMLDivElement]

 with hint: 
		focused on title button after pane
: assertEqual() failed:
	expected
		[object HTMLButtonElement]
	but got
		[object HTMLDivElement]

 with hint: 
		focused on title button after pane
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();

							dijit.focus(dojo.byId("input"));

							// should go to title bar
							doh.robot.keyPress(dojo.keys.TAB, 500, {});

							doh.robot.sequence(d.getTestErrback(function(){
								doh.is(pane1.focusNode, dojo.global.dijit._curFocus,"focused on pane1 title")
							}), 500);

							// should skip hidden content and go to button
							doh.robot.keyPress(dojo.keys.TAB, 500, {});

							doh.robot.sequence(d.getTestErrback(function(){
								doh.is(dojo.byId("titleButton"), dojo.global.dijit._curFocus,"focused on title button after pane")
							}), 500);

							// go back to title bar
							doh.robot.keyPress(dojo.keys.TAB, 500, {shift: true});

							doh.robot.sequence(d.getTestCallback(function(){
								doh.is(pane1.focusNode, dojo.global.dijit._curFocus,"focused on pane1 title")
							}), 500);

							return d;
						}
 FAILED test: ../../dijit/tests/robot/TitlePane.html::keyboard::tabbing 2013 ms
-----
    _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		Africa
	but got
		Continents

: assertEqual() failed:
	expected
		Africa
	but got
		Continents

     ERROR IN:
 		 function () {
						var d = new doh.Deferred();

						// From Continents node, press "A".   Should go to Africa.
						doh.robot.keyPress("a", 100);
						doh.robot.sequence(d.getTestCallback(function(){
							var focus = dijit.getEnclosingWidget(dojo.global.dijit._curFocus);
							doh.t(focus, "there is a focused widget");
							doh.is("Africa", focus.label);
						}), 500);

						return d;
					}
 FAILED test: ../../dijit/tests/robot/Tree_a11y.html::keyboard search tests::First 'A' key goes to Africa 601 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		Asia
	but got
		Continents

: assertEqual() failed:
	expected
		Asia
	but got
		Continents

     ERROR IN:
 		 function () {
						var d = new doh.Deferred();

						// From Africa node, press "A" again.   Should go to Asia.
						doh.robot.keyPress("a", 100);
						doh.robot.sequence(d.getTestCallback(function(){
							var focus = dijit.getEnclosingWidget(dojo.global.dijit._curFocus);
							doh.t(focus, "there is a focused widget");
							doh.is("Asia", focus.label);
						}), 500);

						return d;
					}
 FAILED test: ../../dijit/tests/robot/Tree_a11y.html::keyboard search tests::Second 'A' key goes to Asia 601 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		Australia
	but got
		Continents

: assertEqual() failed:
	expected
		Australia
	but got
		Continents

     ERROR IN:
 		 function () {
						var d = new doh.Deferred();

						var oceania = dijit.byId("mytree").rootNode.getChildren()[2];
						doh.t(oceania, "found Oceania node");
						doh.t(oceania.isExpanded, "Oceania node is expanded");

						doh.robot.keyPress("a", 100);
						doh.robot.sequence(d.getTestCallback(function(){
							var focus = dijit.getEnclosingWidget(dojo.global.dijit._curFocus);
							doh.t(focus, "there is a focused widget");
							doh.is("Australia", focus.label);
						}), 500);

						return d;
					}
 FAILED test: ../../dijit/tests/robot/Tree_a11y.html::keyboard search tests::Third 'A' key goes to Australia (nested node) 601 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		Africa
	but got
		Continents

: assertEqual() failed:
	expected
		Africa
	but got
		Continents

     ERROR IN:
 		 function () {
						var d = new doh.Deferred();

						doh.robot.keyPress("a", 100);
						doh.robot.sequence(d.getTestCallback(function(){
							var focus = dijit.getEnclosingWidget(dojo.global.dijit._curFocus);
							doh.t(focus, "there is a focused widget");
							doh.is("Africa", focus.label);
						}), 500);

						return d;
					}
 FAILED test: ../../dijit/tests/robot/Tree_a11y.html::keyboard search tests::Fourth 'A' key loops back to Africa 601 ms
 PASSED test: ../../dijit/tests/robot/Tree_a11y.html::keyboard search tests::multi-key navigation 601 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		Asia
	but got
		Continents

: assertEqual() failed:
	expected
		Asia
	but got
		Continents

     ERROR IN:
 		 function () {
						var d = new doh.Deferred();

						// By typing AS should skip over Africa and go to Asia
						doh.robot.typeKeys("as", 100);
						doh.robot.sequence(d.getTestCallback(function(){
							var focus = dijit.getEnclosingWidget(dojo.global.dijit._curFocus);
							doh.t(focus, "there is a focused widget");
							doh.is("Asia", focus.label);
						}), 500);

						return d;
					}
 FAILED test: ../../dijit/tests/robot/Tree_a11y.html::keyboard search tests::multi-key navigation 600 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		North America
	but got
		Continents

: assertEqual() failed:
	expected
		North America
	but got
		Continents

     ERROR IN:
 		 function () {
						var d = new doh.Deferred();

						// After the 500ms delay from above, typing a new character should
						// start a new search
						doh.robot.typeKeys("n", 100);
						doh.robot.sequence(d.getTestCallback(function(){
							var focus = dijit.getEnclosingWidget(dojo.global.dijit._curFocus);
							doh.t(focus, "there is a focused widget");
							doh.is("North America", focus.label);
						}), 500);

						return d;
					}
 FAILED test: ../../dijit/tests/robot/Tree_a11y.html::keyboard search tests::multi-key navigation clears 600 ms

-----
GROUP "toolbar buttons" has 2 tests to run
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		hello <b>world</b>. <i>how are you</i>?
	but got
		  <i>  </i>

: assertEqual() failed:
	expected
		hello <b>world</b>. <i>how are you</i>?
	but got
		  <i>  </i>

     ERROR IN:
 		 function () {
							var d = new doh.Deferred();

							var toolbar = editor1.toolbar,
								boldButton = toolbar.getChildren()[7],
								italicButton = toolbar.getChildren()[8];

							dojo.window.scrollIntoView(editor1.domNode);

							// Focus the editor
							doh.robot.mouseMoveAt(editor1.editNode, 500);
							doh.robot.mouseClick({left: true}, 500);
							// select all
							doh.robot.sequence(function(){
								editor1.execCommand("SelectAll");
							},500);

							doh.robot.typeKeys("hello ", 1000);		// and erase (by typing something new)

							// turn on bold
							doh.robot.mouseMoveAt(boldButton.domNode, 500);
							doh.robot.mouseClick({left: true}, 500);

							doh.robot.typeKeys("world", 1000);

							// turn off bold
							doh.robot.mouseMoveAt(boldButton.domNode, 500);
							doh.robot.mouseClick({left: true}, 500);

							doh.robot.typeKeys(". ", 1000);

							// turn on italic
							doh.robot.mouseMoveAt(italicButton.domNode, 500);
							doh.robot.mouseClick({left: true}, 500);

							doh.robot.typeKeys("how are you", 1000);

							// turn off italic
							doh.robot.mouseMoveAt(italicButton.domNode, 500);
							doh.robot.mouseClick({left: true}, 500);

							doh.robot.typeKeys("?", 1000);

							doh.robot.sequence(d.getTestCallback(function(){
								// Get the value and try to do some normalization to make all browsers look
								// the same.   Would be nice if we didn't need this, the normalization should
								// probably happen as pre and post filters on the editor
								var val = normalize(editor1.get("value"));
								doh.is("hello <b>world</b>. <i>how are you</i>?", val);
							}), 5000);

							return d;
						}
 FAILED test: ../../dijit/tests/editor/robot/Editor_mouse.html::toolbar buttons::bold/italic 16017 ms
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		hello. <i>how are you</i>?
	but got
		  <i>  </i>

: assertEqual() failed:
	expected
		hello. <i>how are you</i>?
	but got
		  <i>  </i>

     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							
							// Find the bolded "world" word in the editor
							var bold=dojo.query('b',editor1.editNode);
							if(!bold.length){
								bold=dojo.query('strong',editor1.editNode)
							}
							
							// Double-click "world" to select it
							doh.robot.mouseMoveAt(bold[0],500,100,5,5);
							doh.robot.mouseClick({left: true}, 500);
							doh.robot.mouseClick({left: true}, 50);

							// Delete "world" and the space before it
							doh.robot.keyPress(dojo.keys.DELETE,500);
							if(!dojo.isSafari&&!dojo.isChrome){
								// they delete the space too?
								doh.robot.keyPress(dojo.keys.BACKSPACE,500);
							}
	
							doh.robot.sequence(d.getTestCallback(function(){
								doh.is("hello. <i>how are you</i>?", normalize(editor1.get("value")));
							}),500);

							return d;
						}
 FAILED test: ../../dijit/tests/editor/robot/Editor_mouse.html::toolbar buttons::delete bold tag 2154 ms

-----
GROUP "keyboard shortcuts" has 1 test to run
     _AssertFailure: doh._AssertFailure: assertEqual() failed:
 	expected
		hello <b>bold</b> and <i>exciting</i> new world.
	but got
		     This instance is created from a div directly with default toolbar and plugins</p>
	The following HTML should appear as source: &lt;INPUT TYPE=&quot;IMAGE&quot; SRC=&quot;javascript:alert('no scripting attacks')&quot;&gt;
	

: assertEqual() failed:
	expected
		hello <b>bold</b> and <i>exciting</i> new world.
	but got
		     This instance is created from a div directly with default toolbar and plugins</p>
	The following HTML should appear as source: &lt;INPUT TYPE=&quot;IMAGE&quot; SRC=&quot;javascript:alert('no scripting attacks')&quot;&gt;
	

     ERROR IN:
 		 function () {
							var d = new doh.Deferred();

							dojo.window.scrollIntoView(editor1.domNode);

							// Set contents of editor1
							doh.robot.sequence(function(){
								editor1.focus();
							}, 500);
							doh.robot.keyPress("a", 500, metaKey);	// select all
							doh.robot.typeKeys("hello ", 500);		// and erase (by typing something new)
							doh.robot.keyPress("b", 500, metaKey);	// start bold
							doh.robot.typeKeys("bold", 500);
							doh.robot.keyPress("b", 500, metaKey);	// stop bold
							doh.robot.typeKeys(" and ", 500);
							doh.robot.keyPress("i", 500, metaKey);	// start italic
							doh.robot.typeKeys("exciting", 500);
							doh.robot.keyPress("i", 500, metaKey);	// stop italic
							doh.robot.typeKeys(" new world.", 500);

							doh.robot.sequence(d.getTestCallback(function(){
								var val = normalize(editor1.get('value'));
								doh.is("hello <b>bold</b> and <i>exciting</i> new world.", val);
							}), 1500);

							return d;
						}
 FAILED test: ../../dijit/tests/editor/robot/Editor_a11y.html::keyboard shortcuts::bold/italic 7009 ms
-----
    _AssertFailure: doh._AssertFailure: assertTrue('false') failed: assertTrue('false') failed
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();
							try{
								//Focus on the editor window
								dojo.window.scrollIntoView(editor0.domNode);
								doh.robot.mouseMoveAt(editor0.iframe, 500, null, 10, 10);
								doh.robot.mouseClick({left:true}, 500);
 								doh.robot.sequence(function(){
									editor0.placeCursorAtStart();
								}, 500);
								doh.robot.typeKeys("abc", 500);
 								doh.robot.sequence(d.getTestCallback(function(){
									//Now check the state!
									var content = editor0.get("value");
									doh.assertTrue(content.indexOf("abc<br") >= 0);
								}), 1000);
							}catch(e){
								d.errback(e);
							}
							return d;
						}
 FAILED test: ../../dijit/tests/editor/robot/Editor_misc.html::Miscellaneous_tests::Test placeCurorAtStart (br tag) moves input before br, not inside. 3119 ms
 -----
    ERROR IN:
 		 function () {
							var d = new doh.Deferred();

							try{
								//Focus on the editor window
								dojo.window.scrollIntoView(editor.domNode);
								editor.focus();

								var origEditorSize = dojo.marginBox(editor.domNode);
								var origContainerSize = dojo.marginBox(container.domNode);
								os = {w: origContainerSize.w, h: origContainerSize.h}

								//Find the fullscreen plugin, we'll need it.
								doh.assertTrue(fsPlugin != null);

								doh.robot.sequence(function(){
									// Engage FullScreen Mode
									fsPlugin.button.set("checked", true);
								}, 1000);
								doh.robot.sequence(function(){
									// Resize the container
									container.resize({w: 400, h: 400});
								}, 1000);
								doh.robot.sequence(function(){
									// Disengage FullScreen Mode
									fsPlugin.button.set("checked", false);
								}, 1000);
								doh.robot.sequence(d.getTestCallback(function(){
									// Now validate the editor resized when it returned since
									// the Container was resized.
									var curEditorSize = dojo.marginBox(editor.domNode);
									var curContainerSize = dojo.marginBox(container.domNode);
									var containerWdiff = origContainerSize.w - curContainerSize.w;
									var containerHdiff = origContainerSize.h - curContainerSize.h;
									var eWdiff= origEditorSize.w - curEditorSize.w;
									var eHdiff= origEditorSize.h - curEditorSize.h;
									
									doh.assertTrue(origEditorSize.w > curEditorSize.w, "Validating new width is less that the original size");
									doh.assertTrue(origEditorSize.h > curEditorSize.h, "Validating new height is less that the original size");
									doh.assertTrue((eWdiff < (containerWdiff + 5)) && (eWdiff > (containerWdiff - 5)), "Doing a rouch check that the editor width resized roughly to the Container difference");
									doh.assertTrue((eHdiff < (containerHdiff + 5)) && (eHdiff > (containerHdiff - 5)), "Doing a rouch check that the editor height resized roughly to the Container difference");
								}), 1000);


							}catch(e){
								d.errback(e);
							}
							return d;
						}
 FAILED test: ../../dijit/tests/editor/robot/Editor_FullScreen.html::FullScreen_tests::AccordionContainer:  Go Fullscreen, Reduce AccordionContainer, Exit FullScreen, Validate Resize 50 ms
-----
    _AssertFailure: doh._AssertFailure: assertTrue('false') failed: assertTrue('false') failed
     ERROR IN:
 		 function () {
							var d = new doh.Deferred();

							try{
								//Focus on the editor window
								dojo.window.scrollIntoView(editor.domNode);
								editor.focus();
								doh.robot.mouseMoveAt(editor.iframe, 500);
								doh.robot.mouseClick({left:true}, 500);

								//Find the fullscreen plugin, we'll need it.
								doh.assertTrue(ldPlugin !== null, "Verifying the link dialog.");
								var value = editor.get("value");

								doh.robot.mouseMoveAt(node, 500);
								doh.robot.mouseClick({left:true}, 500);
								doh.robot.sequence(d.getTestCallback(function(){
									var selectedElement = editor._sCall("getSelectedElement", [null]);
									doh.assertTrue(selectedElement != null);
									var tag = selectedElement.tagName? selectedElement.tagName.toLowerCase() : "";
									doh.assertTrue(tag === "img");
									doh.assertTrue(selectedElement.getAttribute("id") === "exampleImage");
								}), 2000);
							}catch(e){
								d.errback(e);
							}
							return d;
						}
 FAILED test: ../../dijit/tests/editor/robot/Editor_LinkDialog.html::LinkDialog_tests::Image Tag: Single click selects image. 4212 ms

-----

Numerous form validation errors


Numerous other dijit errors

Attachments (1)

11279.patch (4.4 KB) - added by Douglas Hays 9 years ago.
possible fix to Date("") problem

Download all attachments as: .zip

Change History (32)

comment:1 Changed 9 years ago by Chris Mitchell

dojox.data has 3 failures: Error: test timeout in testReadAPI_fetch_patternMatch1

ERROR IN:

function testReadAPI_fetch_patternMatch1(t) {

summary: Function to test pattern matching of everything with $ in it. description: Function to test pattern matching of everything with $ in it.

var args = dojox.data.tests.stores.CsvStore?.getDatasource("stores/patterns.csv"); var csvStore = new dojox.data.CsvStore?(args);

var d = new doh.Deferred(); function completed(items, request){

t.assertTrue(items.length === 2); var valueArray = [ "jfq4@#!$!@Rf14r14i5u", "bit$Bite"]; t.assertTrue(dojox.data.tests.stores.CsvStore?.verifyItems(csvStore, items, "value", valueArray)); d.callback(true);

}

csvStore.fetch({query: {value: "*$*"}, onComplete: completed, onError: dojo.partial(dojox.data.tests.stores.CsvStore?.error, t, d)}); return d; Object;

}

FAILED test: testReadAPI_fetch_patternMatch1 1002 ms


ERROR IN:

function (t) {

summary: Simple test of the fetchItemByIdentity function of the store. var store = new dojox.data.AndOrReadStore?(dojox.data.tests.stores.AndOrReadStore?.getTestData("countries"));

var d = new doh.Deferred(); var onItem = function(item){

t.assertTrue(item !== null); if(item !== null){

var name = store.getValue(item,"name"); t.assertEqual(name, "El Salvador");

} d.callback(true);

}; var onError = function(errData){

t.assertTrue(false); d.errback(errData);

}; store.fetchItemByIdentity({identity: "sv", onItem: onItem, onError: onError}); return d; Deferred;

}

FAILED test: Identity API: fetchItemByIdentity() 1004 ms


Error: test timeout in ReadAPI: Fetch_One

ERROR IN:

function (t) {

summary: Simple test of a basic fetch on FlickrRestStore? of a single item. description: Simple test of a basic fetch on FlickrRestStore? of a single item.

var flickrStore = new dojox.data.FlickrRestStore?();

var d = new doh.Deferred(); function onComplete(items, request){

t.is(1, items.length); d.callback(true);

} flickrStore.fetch({

query: {

userid: "44153025@N00", apikey: "8c6803164dbc395fb7131c9d54843627"

}, count: 1, onComplete: onComplete, onError: dojo.partial(dojox.data.tests.stores.FlickrRestStore?.error, doh, d)

}); return d; Object;

}

FAILED test: ReadAPI: Fetch_One 10004 ms

comment:2 Changed 9 years ago by Chris Mitchell

dojox.gfx has some failures, most notably, alpha gradient fills and pattern fills seem to be broken in these tests: dojox/gfx/tests/test_gradient.html dojox/gfx/tests/test_linearGradient.html dojox/gfx/tests/test_pattern.html

comment:3 Changed 9 years ago by Chris Mitchell

charting looks ok (even with gradients... so maybe it's because chart themes arent using alpha gradients or pattern fills with images so far?

comment:4 Changed 9 years ago by Chris Mitchell

Here's the details for the form validation tests that are failing on OSX: GROUP "intermediatechanges" has 1 test to run

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

Testing

but got

with hint:

focusNode value

: assertEqual() failed:

expected

Testing

but got

with hint:

focusNode value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc1'); doh.robot.typeKeys('Testing', 1000, 1400); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

test that value changed while typing since intermediateChanges = true doh.is('Testing', this.textbox.focusNode.value, "focusNode value"); doh.is('Testing', this.textbox.get('value'), "attr value"); doh.is('Testing', onChange.value, "onChange.value");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::intermediatechanges::valid 3402 ms ------------------------------------------------------------ GROUP "allcaps" has 1 test to run

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

TESTING

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

TESTING

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); doh.robot.typeKeys('Testing', 1000, 1400); doh.robot.sequence(function(){

dojo.byId("q01").focus();

}, 500); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('TESTING', this.textbox.focusNode.value, "focusNode.value"); doh.is('TESTING', this.textbox.get('value'), "get('value')");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::allcaps::valid 3901 ms ------------------------------------------------------------ GROUP "maxlength" has 2 tests to run

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

100

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

100

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); doh.robot.typeKeys('100', 1000, 600); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

test that value changed while typing since intermediateChanges = true doh.is('100', this.textbox.focusNode.value, "focusNode.value"); doh.is(100, this.textbox.get('value'), "get('value')");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::maxlength::3chars 2601 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

100

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

100

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); doh.robot.typeKeys('1001', 1000, 800); doh.robot.sequence(d.getTestErrback(dojo.hitch(this, function(){

test that value changed while typing since intermediateChanges = true doh.is('100', this.textbox.focusNode.value, "focusNode.value"); doh.is(100, this.textbox.get('value'), "get('value')"); doh.robot.typeKeys('1', 500, 200); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('100', this.textbox.focusNode.value, "focusNode.value"); doh.is(100, this.textbox.get('value'), "get('value')");

})), 500);

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::maxlength::4chars 2801 ms ------------------------------------------------------------ GROUP "errorStyle" has 3 tests to run PASSED test: ../../dijit/tests/form/robot/test_validate.html::errorStyle::beforeClick 0 ms PASSED test: ../../dijit/tests/form/robot/test_validate.html::errorStyle::afterClick 2501 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

a

but got

with hint:

get('value')

: assertEqual() failed:

expected

a

but got

with hint:

get('value')

ERROR IN:

function () {

var d = new doh.Deferred(); this.textbox = dijit.byId(this.textbox); this.textbox.focusNode.focus(); doh.robot.sequence(d.getTestErrback(dojo.hitch(this, function(){

doh.is('Error', this.textbox.get('state')); doh.is(false, this.textbox.isValid(), "isValid()"); doh.robot.typeKeys('a', 500, 200); doh.robot.sequence(d.getTestErrback(dojo.hitch(this, function(){

doh.is('a', this.textbox.get('value'), "get('value')"); doh.is(, this.textbox.get('state'), "state 1"); doh.is(true, this.textbox.isValid(), "isValid() 1"); dojo.byId("q01").focus(); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is(, this.textbox.get('state'), "state 2"); doh.is(true, this.textbox.isValid(), "isValid() 2");

})), 1000);

})), 500);

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::errorStyle::valid 2220 ms ------------------------------------------------------------ GROUP "commaformat" has 5 tests to run PASSED test: ../../dijit/tests/form/robot/test_validate.html::commaformat::beforeClick 1 ms PASSED test: ../../dijit/tests/form/robot/test_validate.html::commaformat::click 1002 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

3000

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

3000

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc5'); doh.robot.typeKeys('3000', 1000, 800); doh.robot.sequence(d.getTestErrback(dojo.hitch(this, function(){

doh.is('3000', this.textbox.focusNode.value, "focusNode.value"); doh.is('3000', this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()"); doh.is('NaN', onChange.value); dojo.byId("q01").focus(); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('3,000', this.textbox.focusNode.value, "focusNode.value"); doh.is('3000', this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()"); doh.is('3000', onChange.value);

})), 1000);

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::commaformat::type_valid_nocomma 2801 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

3,000

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

3,000

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc5'); doh.robot.typeKeys('3,000', 1000, 1000); doh.robot.sequence(d.getTestErrback(dojo.hitch(this, function(){

doh.is('3,000', this.textbox.focusNode.value, "focusNode.value"); doh.is('3000', this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()"); doh.is('NaN', onChange.value); dojo.byId("q01").focus(); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('3,000', this.textbox.focusNode.value, "focusNode.value"); doh.is('3000', this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()"); doh.is('3000', onChange.value);

})), 1000);

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::commaformat::type_valid_comma 3002 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

300,0

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

300,0

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc5'); doh.robot.typeKeys('300,0', 1000, 1000); doh.robot.sequence(d.getTestErrback(dojo.hitch(this, function(){

doh.is('300,0', this.textbox.focusNode.value, "focusNode.value"); doh.is(undefined, this.textbox.get('value'), "get('value')"); doh.is(false, this.textbox.isValid(), "isValid()"); doh.is('NaN', onChange.value); dojo.byId("q01").focus(); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('300,0', this.textbox.focusNode.value, "focusNode.value"); doh.is(undefined, this.textbox.get('value'), "get('value')"); doh.is(false, this.textbox.isValid(), "isValid()"); doh.is('undefined', onChange.value);

})), 1000);

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::commaformat::type_invalid_comma 3002 ms ------------------------------------------------------------ GROUP "currencyFormat" has 12 tests to run PASSED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::beforeClick 1 ms PASSED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::click 503 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

10000.01

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

10000.01

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('10000.01', 1000, 1600); doh.robot.sequence(d.getTestErrback(dojo.hitch(this, function(){

doh.is('10000.01', this.textbox.focusNode.value, "focusNode.value"); doh.is('10000.01', this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()"); doh.is('NaN', onChange.value); dojo.byId("q01").focus(); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('$10,000.01', this.textbox.focusNode.value, "focusNode.value"); doh.is('10000.01', this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()"); doh.is('10000.01', onChange.value);

})), 1000);

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::type_valid_number 3602 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

$20000.01

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

$20000.01

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('$20000.01', 1000, 1800); doh.robot.sequence(d.getTestErrback(dojo.hitch(this, function(){

doh.is('$20000.01', this.textbox.focusNode.value, "focusNode.value"); doh.is(20000.01, this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()"); doh.is('NaN', onChange.value); dojo.byId("q01").focus(); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('$20,000.01', this.textbox.focusNode.value, "focusNode.value"); doh.is(20000.01, this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()"); doh.is('20000.01', onChange.value);

})), 1000);

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::type_valid_dollarsign 3802 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

123

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

123

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('123', 1000, 600); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('123', this.textbox.focusNode.value, "focusNode.value"); doh.is(undefined, this.textbox.get('value'), "get('value')"); doh.f(this.textbox.isValid(), "!isValid()");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::missing required decimal 2601 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

123.0

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

123.0

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('123.0', 1000, 1000); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('123.0', this.textbox.focusNode.value, "focusNode.value"); doh.is(undefined, this.textbox.get('value'), "get('value')"); doh.f(this.textbox.isValid(), "!isValid()");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::too few decimal digits 3001 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

123.000

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

123.000

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('123.000', 1000, 1400); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('123.000', this.textbox.focusNode.value, "focusNode.value"); doh.is(undefined, this.textbox.get('value'), "get('value')"); doh.f(this.textbox.isValid(), "!isValid()");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::too many decimal digits 3401 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

-123.00

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

-123.00

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('-123.00', 1000, 1400); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('-123.00', this.textbox.focusNode.value, "focusNode.value"); doh.is(-123, this.textbox.get('value'), "get('value')"); doh.t(this.textbox.isValid(), "isValid()");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::negative decimal 3401 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

($123.00)

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

($123.00)

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('($123.00)', 1000, 1600); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('($123.00)', this.textbox.focusNode.value, "focusNode.value"); doh.is(-123, this.textbox.get('value'), "get('value')"); doh.t(this.textbox.isValid(), "isValid()");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::negative currency 3601 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

($123.45)

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

($123.45)

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('-123.45', 1000, 1400); doh.robot.keyPress(dojo.keys.TAB, 500, {}); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('($123.45)', this.textbox.focusNode.value, "focusNode.value"); doh.is(-123.45, this.textbox.get('value'), "get('value')"); doh.t(this.textbox.isValid(), "isValid()");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::convert negative decimal to negative currency 3902 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

-123.45

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

-123.45

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('($123.45)', 1000, 1800); doh.robot.keyPress(dojo.keys.TAB, 500, {}); doh.robot.keyPress(dojo.keys.TAB, 500, {shift:true}); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('-123.45', this.textbox.focusNode.value, "focusNode.value"); doh.is(-123.45, this.textbox.get('value'), "get('value')"); doh.t(this.textbox.isValid(), "isValid()");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::convert negative negative currency to negative decimal 4802 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

1.23e0

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

1.23e0

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); var onChange = dojo.byId('oc8'); doh.robot.typeKeys('1.23e0', 1000, 1200); doh.robot.keyPress(dojo.keys.TAB, 500, {}); doh.robot.keyPress(dojo.keys.TAB, 500, {shift:true}); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('1.23e0', this.textbox.focusNode.value, "focusNode.value"); doh.is(undefined, this.textbox.get('value'), "get('value')"); doh.f(this.textbox.isValid(), "!isValid()");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::currencyFormat::exponent not allowed 4201 ms ------------------------------------------------------------ GROUP "euroformat" has 1 test to run

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

€1.00

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

€1.00

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); doh.robot.typeKeys('1', 1000, 200); doh.robot.sequence(dojo.hitch(this, function(){

dijit.byId('q01').focusNode.focus();

}), 500); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('€1.00', this.textbox.focusNode.value, "focusNode.value"); doh.is('1', this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::euroformat::type_1 2701 ms ------------------------------------------------------------ GROUP "regexp" has 2 tests to run

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

a

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

a

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); doh.robot.typeKeys('a', 1000, 200); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('a', this.textbox.focusNode.value, "focusNode.value"); doh.is('a', this.textbox.get('value'), "get('value')"); doh.is(true, this.textbox.isValid(), "isValid()");

})), 500); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::regexp::valid 1700 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

a

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

a

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); doh.robot.typeKeys('a ', 1000, 400); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('a ', this.textbox.focusNode.value, "focusNode.value"); doh.is('a ', this.textbox.get('value'), "get('value')"); doh.is(false, this.textbox.isValid(), "isValid()");

})), 500); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::regexp::invalid 1901 ms ------------------------------------------------------------ GROUP "password" has 1 test to run

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

abcdef

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

abcdef

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); doh.robot.typeKeys('abcdef', 1000, 1200); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('abcdef', this.textbox.focusNode.value, "focusNode.value"); doh.is('abcdef', this.textbox.get('value'), "get('value')");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::password::type 3202 ms ------------------------------------------------------------ GROUP "readonly" has 2 tests to run PASSED test: ../../dijit/tests/form/robot/test_validate.html::readonly::readonly 3101 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

abc

but got

with hint:

focusNode.value

: assertEqual() failed:

expected

abc

but got

with hint:

focusNode.value

ERROR IN:

function () {

var d = new doh.Deferred(); doh.robot.typeKeys('abc', 1000, 600); doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is('abc', this.textbox.focusNode.value, "focusNode.value"); doh.is('abc', this.textbox.get('value'), "get('value')");

})), 1000); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::readonly::write 2602 ms ------------------------------------------------------------ GROUP "disabled" has 2 tests to run PASSED test: ../../dijit/tests/form/robot/test_validate.html::disabled::click doesn't focus 1603 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

removereadonly

but got

q26

with hint:

tabbed past input, to the button after it

: assertEqual() failed:

expected

removereadonly

but got

q26

with hint:

tabbed past input, to the button after it

ERROR IN:

function () {

var d = new doh.Deferred();

doh.robot.keyPress(dojo.keys.TAB, 500);

doh.robot.sequence(d.getTestCallback(dojo.hitch(this, function(){

doh.is("removereadonly", dojo.global.dijit._curFocus.id,

"tabbed past input, to the button after it");

})), 500); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::disabled::tab jumps over 1001 ms ------------------------------------------------------------ GROUP "selectOnClick" has 5 tests to run

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

Abc

but got

Testing

with hint:

was highlighted

: assertEqual() failed:

expected

Abc

but got

Testing

with hint:

was highlighted

ERROR IN:

function () {

var d = new doh.Deferred(),

textbox = dijit.byId("q01");

textbox.set('value', 'Testing'); Clicking shouldn't have any effect since it's disabled doh.robot.mouseMoveAt(textbox.focusNode, 500, 500); doh.robot.mouseClick({left: true}, 500); doh.robot.typeKeys("abc", 1000, 600);

doh.robot.sequence(d.getTestCallback(function(){

doh.is("Abc", textbox.get('value'), "was highlighted");

}), 500); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::selectOnClick::1 click does highlight 3603 ms

_AssertFailure: doh._AssertFailure: assertNotEqual() failed: not expected |Testing| but got |Testing| with hint:

didn't change at all

: assertNotEqual() failed: not expected |Testing| but got |Testing| with hint:

didn't change at all

ERROR IN:

function () {

var d = new doh.Deferred(),

textbox = dijit.byId("q01");

textbox.set('value', 'Testing'); Clicking shouldn't have any effect since it's disabled doh.robot.mouseMoveAt(textbox.focusNode, 500, 500); doh.robot.mouseClick({left: true}, 500); doh.robot.mouseClick({left: true}, 1000); var oldValue = textbox.get('value'); doh.robot.typeKeys("abc", 500, 600);

doh.robot.sequence(d.getTestCallback(function(){

doh.isNot(oldValue, textbox.get('value'), "didn't change at all"); doh.isNot("Abc", textbox.get('value'), "was highlighted");

}), 500); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::selectOnClick::2 clicks doesn't highlight 4104 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

Abc

but got

Testing

with hint:

was not highlighted

: assertEqual() failed:

expected

Abc

but got

Testing

with hint:

was not highlighted

ERROR IN:

function () {

var d = new doh.Deferred(),

textbox = dijit.byId("q01");

textbox.set('value', 'Testing'); Clicking shouldn't have any effect since it's disabled doh.robot.mouseMoveAt(textbox.focusNode, 500, 500); doh.robot.mouseClick({left: true}, 500); doh.robot.mouseClick({left: true}, 1000); doh.robot.keyPress(dojo.keys.TAB, 1000); doh.robot.keyPress(dojo.keys.TAB, 1000, {shift:true}); doh.robot.typeKeys("abc", 500, 600);

doh.robot.sequence(d.getTestCallback(function(){

doh.is("Abc", textbox.get('value'), "was not highlighted");

}), 500); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::selectOnClick::TAB focus still highlights a selectOnFocus textbox 6103 ms

_AssertFailure: doh._AssertFailure: assertNotEqual() failed: not expected |Testing| but got |Testing| with hint:

didn't change at all

: assertNotEqual() failed: not expected |Testing| but got |Testing| with hint:

didn't change at all

ERROR IN:

function () {

var d = new doh.Deferred(),

textbox = dijit.byId("q01");

textbox.set('value', 'Testing'); Clicking shouldn't have any effect since it's disabled doh.robot.mouseMoveAt(textbox.focusNode, 500, 500); doh.robot.mouseClick({left: true}, 500); doh.robot.mouseClick({left: true}, 1000); doh.robot.keyPress(dojo.keys.TAB, 1000); doh.robot.keyPress(dojo.keys.TAB, 1000, {shift:true}); doh.robot.mouseClick({left: true}, 1000); var oldValue = textbox.get('value'); doh.robot.typeKeys("abc", 500, 600);

doh.robot.sequence(d.getTestCallback(function(){

doh.isNot(oldValue, textbox.get('value'), "didn't change at all"); doh.isNot("Abc", textbox.get('value'), "was highlighted");

}), 500); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::selectOnClick::click doesn't highlight after TAB focus 7105 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

AbcMMMMMM

but got

MMMMMMM

with hint:

could not select text

: assertEqual() failed:

expected

AbcMMMMMM

but got

MMMMMMM

with hint:

could not select text

ERROR IN:

function () {

var d = new doh.Deferred(),

textbox = dijit.byId("q01");

textbox.set('value', 'MMMMMMM'); Clicking shouldn't have any effect since it's disabled doh.robot.mouseMoveAt(textbox.focusNode, 500, 500, 3, 6); doh.robot.mousePress({left: true}, 500); doh.robot.mouseMoveAt(textbox.focusNode, 500, 500, 10, 6); doh.robot.mouseRelease({left: true}, 500); doh.robot.typeKeys("abc", 500, 600);

doh.robot.sequence(d.getTestCallback(function(){

doh.is("AbcMMMMMM", textbox.get('value'), "could not select text");

}), 500); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::selectOnClick::mouse selection still works 4603 ms ------------------------------------------------------------ GROUP "set constraints" has 2 tests to run PASSED test: ../../dijit/tests/form/robot/test_validate.html::set constraints::number 3 ms PASSED test: ../../dijit/tests/form/robot/test_validate.html::set constraints::currency 9 ms ------------------------------------------------------------ GROUP "placeholder" has 5 tests to run PASSED test: ../../dijit/tests/form/robot/test_validate.html::placeholder::textbox 1 ms PASSED test: ../../dijit/tests/form/robot/test_validate.html::placeholder::focus/blur textbox 2603 ms

_AssertFailure: doh._AssertFailure: assertEqual() failed:

expected

none

but got

with hint:

_phspan.style.display 1

: assertEqual() failed:

expected

none

but got

with hint:

_phspan.style.display 1

ERROR IN:

function () {

var d = new doh.Deferred(), textWidget = dijit.byId("q26"); textWidget.set('placeHolder','placeholder is here'); textWidget.set('value',);

Clicking into the input should hide _phspan doh.robot.mouseMoveAt(textWidget.focusNode, 500); doh.robot.mouseClick({left: true}, 500);

doh.robot.sequence(d.getTestErrback(function(){

doh.is("", textWidget.get('value'), "get('value')"); doh.is("none", textWidget._phspan.style.display, "_phspan.style.display 1");

doh.robot.typeKeys('new', 1000, 1400); doh.robot.sequence(d.getTestCallback(function(){

doh.is("new", textWidget.get('value'), "get('value')"); doh.is("none", textWidget._phspan.style.display, "_phspan.style.display 2");

}), 500);

}), 500); return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::placeholder::type in textbox 1602 ms

_AssertFailure: doh._AssertFailure: assertNotEqual() failed: not expected |none| but got |none| with hint:

_phspan.style.display

: assertNotEqual() failed: not expected |none| but got |none| with hint:

_phspan.style.display

ERROR IN:

function () {

var textWidget = dijit.byId("q26"), d = new doh.Deferred(); textWidget.focus(); textWidget.set('placeHolder','placeholder is here'); textWidget.set('value',);

doh.is("", textWidget.get('value'), "get('value') 1"); doh.is("none", textWidget._phspan.style.display, "_phspan.style.display");

textWidget.set('value','abc'); textWidget.reset();

doh.is("", textWidget.get('value'), "get('value') 2"); doh.is("none", textWidget._phspan.style.display, "_phspan.style.display 1");

doh.robot.keyPress(dojo.keys.TAB, 500, {}); doh.robot.sequence(d.getTestCallback(function(){

textWidget.set('value','xyz'); textWidget.reset();

doh.is("", textWidget.get('value'), "get('value')"); doh.isNot("none", textWidget._phspan.style.display, "_phspan.style.display");

}), 500);

return d;

}

FAILED test: ../../dijit/tests/form/robot/test_validate.html::placeholder::reset textbox 1014 ms PASSED test: ../../dijit/tests/form/robot/test_validate.html::placeholder::set textbox value 5 ms PASSED test: ../../dijit/tests/form/robot/test_validate.html 117461 ms ------------------------------------------------------------ | TEST SUMMARY: ------------------------------------------------------------

214 tests in 83 groups 0 errors 31 failures

comment:5 Changed 9 years ago by Douglas Hays

Milestone: tbd1.5
Version: 1.5.0b21.5.0rc1

I just ran dijit/tests/robot/TooltipDialog_a11y.html and dijit/tests/form/robot/test_validate.html on WinXP with 0 errors.

comment:6 Changed 9 years ago by Chris Mitchell

For the dojox.gfx gradient fill failures, it appears that there may be a regression in Safari5 gradients based on running these svg tests: http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-pservers-grad-18-b.html http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-pservers-grad-10-b.html

comment:7 Changed 9 years ago by Chris Mitchell

on further inspection the svg tests failures above also occur on chrome , but chrome doesnt fail gfx tests... this needs more investigation.

comment:8 Changed 9 years ago by Douglas Hays

dijit/tests/form/runTests.html at revision [22310] using Safari 5 on WinXP:


| TEST SUMMARY:
------------------------------------------------------------

1485 tests in 33 groups
0 errors
0 failures

comment:9 Changed 9 years ago by nic

The dojo core failure seems a Date bug to me:
on Safari 5 Date.parse("") returns 0 the first time (expected NaN)
but if I write Date.parse("June 11, 2010"), I get 1276207200000.
then another Date.parse("") returns 1276207200000 again!
Last test: Date.parse("1") returns NaN, then another Date.parse("") returns NaN (!!)

Tested on Safari 5 / Mac 10.6.3

comment:10 Changed 9 years ago by Adam Peller

Milestone: 1.51.6

comment:11 in reply to:  7 Changed 9 years ago by ulfnielsen

Replying to chrism:

on further inspection the svg tests failures above also occur on chrome , but chrome doesnt fail gfx tests... this needs more investigation.

I stumpled upon a quick fix for the gradient in gfx, by adding <!DOCTYPE html> to force safari to consider it html5 the gradients suddenly works perfectly..

comment:12 Changed 9 years ago by Adam Peller

Milestone: 1.61.5
Type: enhancementdefect

got moved to 1.6 in bulk with other tickets. moving back to 1.5.

we should probably open separate tickets on each problem. regarding the date issue, if this is not a problem in Chrome5, perhaps this is just a glitch in a particular build Safari picked up? We should test against the webkit nightly and maybe ask for some help tracking or reporting this problem in webkit before we venture to fix it.

comment:13 Changed 9 years ago by Adam Peller

Description: modified (diff)

comment:14 Changed 9 years ago by Douglas Hays

Refs #11342 opened to tweak a few dijit/form robot tests to workaround changed Safari 5 TAB behavior wrt BUTTON tags.

comment:15 Changed 9 years ago by Douglas Hays

Verified that the robot IS working, so any problems found should be investigated closely. I found that Safari 5 prefers to not focus BUTTON's when TAB'ing, per #11342, and this was causing several failures in dijit/form tests. Those have been fixed in [22341]. Please open any remaining problems as separate tickets.

comment:16 Changed 9 years ago by James Burke

peller: it looks like the date test failure in Core is the last thing for this ticket -- you mention an webkit bug URL, does that mean we are stuck with the failure for now? Is there something we can do to fix it our end? Just a test issue or a module code issue? Seems like just a test issue with comparisons we do. If so, then maybe we close this ticket out and create a targeted one to track the webkit issue and clear Safari 5 support for 1.5.

comment:17 Changed 9 years ago by Adam Peller

This feature is relied on by DateTextBox, but Doug was unable to produce an error in the widget. Perhaps the fact that it's inconsistent, as nic says, is causing the widget state to somehow correct itself after multiple parse calls? I suppose we hold this aside as a separate bug and wait for Webkit to fix it.

comment:18 Changed 9 years ago by Douglas Hays

I finally found a problem in DateTextBox?. The new Date() returns some random date, and so you don't know what that is without a debugger, but you can't set a date to that value.
I think I have the solution:
replace new Date(
) with (new Date()).setTime(NaN)
it seems to work everywhere, is still an instanceof Date, and its value is NaN.
I prototyped it and everything seems to work.

comment:19 Changed 9 years ago by Douglas Hays

trying again with proper formatting: replace new Date("") with (new Date()).setTime(NaN)

Changed 9 years ago by Douglas Hays

Attachment: 11279.patch added

possible fix to Date("") problem

comment:20 Changed 9 years ago by Douglas Hays

I attached a possible fix to the Date("")/NaN problem. It needs careful review by all interested parties since it touches the parser, dijit, and dojox.

comment:21 Changed 9 years ago by Adam Peller

Owner: changed from anonymous to Adam Peller
Status: newassigned

comment:22 Changed 9 years ago by Adam Peller

I'm unable to reproduce the problem as Doug described using the Date value from the debugger, so I'm leaving this open in 1.5.1 for when he returns so we can go over this. I'm not comfortable with the patch since

  (new Date()).setTime(NaN)

returns NaN (type Number) rather than a Date object, and I believe the value property should be a Date. I also thought that the empty string could come in other paths, through a variable to the constructor, but I am unable to recall the exact circumstances.

The Safari workaround of declaring a Date object with some bogus argument seems to clear up the NaN case, so simply putting that in the parser and in the widget seems to be the safest way forward.

comment:23 Changed 9 years ago by Adam Peller

Milestone: 1.51.5.1

comment:24 Changed 9 years ago by Adam Peller

(In [22381]) declare bogus Date("x") to clear up Safari5 NaN bug. \!strict Refs #11279.

comment:25 in reply to:  22 Changed 9 years ago by nic

I haven't tried the widget, but sometimes I have to close Safari and reopen it to reproduce the bug.

Replying to peller:

I'm unable to reproduce the problem as Doug described using the Date value from the debugger, so I'm leaving this open in 1.5.1 for when he returns so we can go over this. I'm not comfortable with the patch since

  (new Date()).setTime(NaN)

returns NaN (type Number) rather than a Date object, and I believe the value property should be a Date. I also thought that the empty string could come in other paths, through a variable to the constructor, but I am unable to recall the exact circumstances.

The Safari workaround of declaring a Date object with some bogus argument seems to clear up the NaN case, so simply putting that in the parser and in the widget seems to be the safest way forward.

comment:26 Changed 9 years ago by Adam Peller

@nic: right, based on your observation, I put in something which *seems* to make the NaN behavior appear for the session. That's the nature of the workaround in [22381]. Because of this, I'm starting to wonder whether this needs to be tracked as a separate bug in webkit from the other illegal Dates. Note also that Chrome does not use webkit's core JS so it does not have this bug.

comment:27 Changed 9 years ago by bill

Milestone: 1.5.11.5

I'm going to close this, since all regression tests are now passing (for me), albeit that I need to run some of them stand-alone. If Doug (or nic, or anyone) sees another problem with safari 5 then we can reopen, or preferably open a new ticket.

comment:28 Changed 9 years ago by Chris Mitchell

Just ran tests on Saf5... 9 errors still reported in dijit, one test case in dojox.gfx broken, due to missing doctype. Will open individual tickets to track each.

comment:29 Changed 9 years ago by bill

Thanks. There are many failures from runTests.html by the tests pass for me when run individually. I'll doublecheck your tickets though. I assume you are talking about safari5 on mac, rather than (or in addition to) the PC?

comment:30 Changed 9 years ago by Chris Mitchell

re Mac, yes, version tested is Safari 5.0(6533.16) Mac OSX SnowLeopard? 64bit

comment:31 Changed 9 years ago by Adam Peller

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.