Opened 7 years ago

Closed 7 years ago

#15249 closed defect (fixed)

dojo/request/iframe.html fails regression

Reported by: bill Owned by: Bryan Forbes
Priority: undecided Milestone: 1.8
Component: IO Version: 1.7.2
Keywords: dohfail Cc:
Blocked By: Blocking:

Description

Here's the failure log from runTests.html. It also fails running standalone.

GROUP "tests.request.iframe" has 1 test to run 7 tests to run in 1 groups ------------------------------------------------------------ GROUP "dojo/request/iframe" has 7 tests to run     Error: test timeout in ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetText     ERROR IN: 		 function ioIframeGetText(t){
						var d = new doh.Deferred();
						var td = iframe.get("iframeDummyMethod.php?type=text", {
							preventCache: true
						});
						td.then(d.getTestCallback(function(response){
							t.is("iframe succeeded", response.data);
						}));
						return d;
					} FAILED test: ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetText 1062 ms     Error: test timeout in ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetJson     ERROR IN: 		 function ioIframeGetJson(t){
						var d = new doh.Deferred();
						var td = iframe.post("iframeDummyMethod.php?type=json", {
							preventCache: true,
							form: "contentArrayTest",
							data: {
								color: "blue",
								size: 42
							},
							handleAs: "json"
						});
						td.then(d.getTestCallback(function(response){
							t.is("blue", response.data.post.color);
						}));
						return d;
					} FAILED test: ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetJson 1125 ms     Error: test timeout in ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetJavascript     ERROR IN: 		 function ioIframeGetJavascript(t){
						var d = new doh.Deferred();
						var td = iframe.get("iframeDummyMethod.php?type=javascript", {
							preventCache: true,
							handleAs: "javascript"
						});
						td.then(d.getTestCallback(function(response){
							t.is(42, window.iframeTestingFunction());
						}));
						return d;
					} FAILED test: ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetJavascript 1000 ms     Error: test timeout in ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetHtml     ERROR IN: 		 function ioIframeGetHtml(t){
						var d = new doh.Deferred();
						var td = iframe.get("iframeDummyMethod.php?type=html", {
							preventCache: true,
							handleAs: "html"
						});
						td.then(d.getTestCallback(function(response){
							t.is("SUCCESSFUL HTML response",
								response.data.getElementsByTagName("h1")[0].innerHTML);
						}));
						return d;
					} FAILED test: ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetHtml 1000 ms     Error: test timeout in ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetXml     ERROR IN: 		 function ioIframeGetXml(t){
						var d = new doh.Deferred();
						var td = iframe.get("iframeDummyMethod.php?type=xml", {
							preventCache: true,
							handleAs: "xml"
						});
						td.then(d.getTestCallback(function(response){
							t.is(4, response.data.documentElement.getElementsByTagName("child").length);
						}));
						return d;
					} FAILED test: ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeGetXml 1000 ms     Error: test timeout in ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeDataArray     ERROR IN: 		 function ioIframeDataArray(t){
						//Tests if an array passed in content causes as an error on cleanup.
						var d = new doh.Deferred();
						var td = iframe.post("iframeDummyMethod.php?type=json", {
							form: "contentArrayTest",
							data: {"tag": ["value1","value2"]},
							handleAs: "json"
						});
						td.then(d.getTestCallback(function(response){
							t.is("value2", response.data.post.tag);
						}));
						return d;
					} FAILED test: ../../dojo/tests/request/iframe.html::dojo/request/iframe::ioIframeDataArray 1000 ms     _AssertFailure: assertEqual() failed: 	expected
		3
	but got
		7

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

							iframe.get("iframeDummyMethod.php",{
								query: {
									type: "text",
									delay: 2,
									text: "one"
								}
							}).then(d.getTestErrback(function(data){
								t.is("one", data.text);
							}));
							iframe.get("iframeDummyMethod.php",{
								query: {
									type: "text",
									text: "two"
								}
							}).then(d.getTestErrback(function(data){
								t.is("two", data.text);
							}));
							iframe.get("iframeDummyMethod.php",{
								query: {
									type: "text",
									text: "three"
								}
							}).then(d.getTestCallback(function(data){
								t.is("three", data.text);
							}));

							t.is(3, iframe._dfdQueue.length);

							return d;
						} FAILED test: ../../dojo/tests/request/iframe.html::dojo/request/iframe::iframeQueue 0 ms PASSED test: ../../dojo/tests/request/iframe.html 6500 ms

Change History (5)

comment:1 Changed 7 years ago by bill

Keywords: dohfail added
Milestone: tbd1.8

comment:2 Changed 7 years ago by Bryan Forbes

What URL are you using to run this test? When I test, I'm using my local web server. Are you running from nightly?

comment:3 Changed 7 years ago by bill

I was using my "local" web server too, meaning that I was running apache on mac and then accessing it from a VM. But it must be something weird because I don't see the failures from a remote machine (bill.dojotoolkit.org) either. So it's either timing related (although increasing the test timeout doesn't help), or some detail about how the webserver is responding.

comment:4 Changed 7 years ago by bill

Summary: dojo/request/iframe.html fails regression on IE8dojo/request/iframe.html fails regression

Actually, it fails for me everywhere. On FF/mac, it fails on the line:

response.text = doc.getElementsByTagName('textarea')[0].value; // text

That doc says:

<br>
<b>Parse error</b>
: parse error in
<b>/volumes/Data/workspace/trunk/dojo/tests/request/iframeDummyMethod.php</b>
on line
<b>72</b>
<br>

Line 72 is:

<?xml version="1.0" encoding="UTF-8"?>

Do I need a newer version of PHP? I'm running:

$ php -version
PHP 5.3.8 (cli) (built: Dec  5 2011 21:24:09) 
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

comment:5 Changed 7 years ago by bill

Resolution: fixed
Status: newclosed

In [28502]:

Fix to avoid PHP parse error on my machine, thanks to Bryan for the suggestion, fixes #15249

Note: See TracTickets for help on using tickets.