Changes to make DOH robot work with async loader.   Fixes #14929.

Squashed commit of:

---
Make util/doh/robot.js factory return the doh.robot object.   Convert references of doh.robot to plain robot, since they are separate modules and will probably be completely separated in the future.

Make Robot.html call require("doh/robot") on the parent frame, rather than assuming the parent frame has a doh.robot global variable.

util/doh/robot.js still needs to be upgraded to not use document.write(), and to stop referencing the dojo global object.   It's trying to walk the fence, branching it's behavior based on whether or not dojo is loaded, but that doesn't work well with AMD.

Refs #14929 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@28333 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 69c80dd60aee74414cba19037b7e59e3eb131631)

---
Convert robot*.js files to baseless AMD, and remove document.write() usage.

 To get util/doh/robot.js to play nice with AMD (no document.write(), and no reference to dojo global), I introduced a dependency to dojo which theoretically wasn't needed before.   Perhaps it can be removed in the future.   If isolation is desired, the dojo-dependent code should be moved to dojo/robot.js, not put if if(){...} blocks.

 Also removed the document.write() usage in dojo/robotx.js to create a console div.   On IE6/IE7, we are already getting a firebug-lite console, so just using that.   (This might be dependent on having isDebug:true in the data-dojo-config of the test file though.)

 Theoretically fixes #14929 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@28336 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 8862e9d6f3104148af2a6b091b558abd46149e15)

---
Use "dojo/main" rather than "dojo" to pull in the dojo rollup module.   Ideally though this file should be modified to use granular dependencies.

Refs #14929 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@28495 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit e82bb2e2d590700bb5434b0c58165872a3d94377)

---
Use "dojo/main" rather than "dojo" to pull in the dojo rollup module.   Ideally though this file should be modified to use granular dependencies.

Refs #14929 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@28497 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit acc422c363539378f070f1e2700f0e7d258753ed)

---
Woops, for some reason this module needs to explicitly list its module id.   Perhaps because of the mapping from "doh/runner" to util/doh/runner?

Refs #14929 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@28498 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit f41ea00ca998577f0a7721c20e8dd6c62c949e85)

---
convert DOH's unit test file to AMD, refs #14929 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@28578 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit aa93b84b03fdf7be82dc7b38b5a92176c5370247)
Fix robot on Macs with multiple monitors. Add more clicks to the top-left of the browser to guarantee focus is restored. Fixes #12544.

Squash commit of:

---
Fix robot on Macs with multiple monitors. Add more clicks to the top-left of the browser to guarantee focus is restored. Fixes #12544.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@28928 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 5b65c3f2a254a25c7646f0d13309d9d60d44d08c)

---
Remove spurious calls to stopPropagation and console.log. Fixes #12544.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@28958 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 3c5d32e79250be7a0cc1e6facddcd9b6536f6f45)
Squash commit of robot changes to sequence events in javascript.
Refs #15590, fixes #15642.

Doesn't include changes to do mousemove in javascript.
Modified to not depend on dojo/Deferred (which doesn't exist in 1.7)

----
Since setTimeout(f, n) can take longer than n milliseconds, it's better to schedule a sequence of actions by waiting until the first setTimeout() finishes before calling the second setTimeout().   Refactoring robot code to do this, and hopefully avoid some intermittent timing failures.

As a side benefit, enhances sequence() so that the callback function can return a Promise, and execution won't continue until the Promise resolves.

Also rearranged typeKeys() so that all the timing delays happen in Javascript, rather than doing Thread.sleep() calls from java.   (Thread.sleep() can have the same problem as setTimeout() of "oversleeping".)   Like above, it doesn't set the timer for a next keystroke until the previous keystroke has finished.

Finally, added code to make sure that when a test fixture fails (due to an assertion failing, timeout, etc.), the remaining sequence() registered actions for that fixture are cleared, so that they don't interfere with the next test fixture.

This change may increase test runtime since many of the tests currently set unnecessarily large delays and durations to workaround robot delays.   (For that reason I had to increase the timeouts for a few test fixtures.)

Refs #15590 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@29098 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 2c3d0e132ad118d1c37a5bc58525b78be6e2ee90)

Conflicts:
	doh/robot.js

----
just adding some guard code to avoid an exception when robot doesn't initialize correctly, or user hits refresh button during initialization, refs #15590 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@29099 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 29b4b4539bb8a5d015a90937336ff5222709a8db)

----
Leverage dojo/Deferred to chain actions registered via sequence(), refs #15590 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@29101 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 8e9f0657ded0cb56338e20e5c45a5f12c82e9ff5)
(cherry picked from commit 597263f0844b13b42794625c4f2d183c0b001b86)

Conflicts:
	doh/robot.js

---
Allow promise to mark itself as fulfilled before checking to see if it needs to be canceled. Fixes #15642. !strict

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@29184 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 5cd1f9ed2f9ed601949970c2b04e25e483ce7a7f)

Conflicts:
	doh/robot.js
Squash commit of changes to do mousemove timing in javascript:

---
Do mousemove timing in javascript, rather than in java.   This is getting intermittent failures on Tree_dnd.html but I think I can resolve them after the next checkin, where I monitor events on the document to tell when java robot actually executes each command.   Refs #15590 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@29202 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit abe5911bd8d0a98f15dd3addf7e0ca2a0fa1e418)

---
Fix bug where _positionMouseOnLine() was accessing the version of lastMousePos from when the test fixture started (i.e. using the position of the mouse when the test fixture started) rather than the lastMousePos from when the mouseMove() or mouseMoveAt() command started executing.

Refs #15590 !strict

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@29227 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 985a4120bf01471e643bebfee9891399dd0922c7)

---
small simplification, refs #15590 !strict

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@29228 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 24d1b22bd08c588f957bb0dd67331e3d97ec30c6)

---
Further refinements to moveTo() method:
   1. don't call java robot to move the mouse to a position that it's already at
   2. fix easeInOutQuad() method to do rounding on all return values
   3. refactor, simplifying how mousemove events are queued

 Refs #15590 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/util/trunk@29258 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 5481257fbbb78d5ffe3d9b998238729024e86ea0)
Remove robot document.write() usage, and
refactor robot so initRobot() and startRobot() are implemented as asynchronous test fixtures.

Fixes #14929, fixes #16386 (both on 1.7 branch).

Cherry picked from commits:

* 8862e9d6f3104148af2a6b091b558abd46149e15
* 12c84a3c734300b4adada7424823dca0f96ef022
* 07c123ff45abe26eec525afd2f91cf278dcb75cc
* 15e6c812122d35cbf49db93a5e79a81f8758d206
doh.robot support on FF23+.  Fixes #17442.

Squash commit of:

---
Workaround robot errors in FF23+. Still need to figure out how to deal with zoom level. Refs #17442.

(cherry picked from commit 23abc082d571cecce77d3957c405fd5399622b81)
(cherry picked from commit b5c1bd5dfccfc0ed6d7b5b75b8be0cb35faefc38)
(cherry picked from commit 7d601b8d38e2fd40e6afe07f81b9a83b92a645a3)

Conflicts:
	doh/robot/DOHRobot.jar

---
Signed robot applet with a "Dojo Foundation" public key to make Java 7u40 happy. Fix accidental nondeterminism when testing on slower machines. Refs #17442.

(cherry picked from commit 9e1dc62201b7cd06f1c052bae663882003cd3957)
(cherry picked from commit e6490e5ad503b97e79992bbad72f9b3953430b65)
(cherry picked from commit 99969c749fbabda02563f775dc7ca9a11e7a2cab)

Conflicts:
	doh/Robot.html