33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass/**
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * Represents a stoppage in test execution to wait for an amount of time before
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * continuing.
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * @param {Function} segment A function to run when the wait is over.
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * @param {int} delay The number of milliseconds to wait before running the code.
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * @class Wait
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * @namespace Test
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * @constructor
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass *
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass */
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav GlassYUITest.Wait = function (segment, delay) {
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass /**
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * The segment of code to run when the wait is over.
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * @type Function
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * @property segment
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass */
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass this.segment = (typeof segment == "function" ? segment : null);
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass /**
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * The delay before running the segment of code.
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * @type int
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass * @property delay
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass */
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass this.delay = (typeof delay == "number" ? delay : 0);
33d85edf47749fa345d7b636b9b4b9d0d0386f44Dav Glass};