var TestUnity = function(name) {
    this._initialize(name);
}

extend(TestUnity.prototype, new BaseTest(), {
    // this.notifySuccess(null, params);
    // this.notifyFailure("CHECKOS", "EXCEPTION", params.merge({exception : e}));

    start: function() {
        if(! Mixamo.Unity.DetectUnityWebPlayer()) {
            // watch for the plugin to be installed...if it is, reload this page to
            // restart the verification process
            setTimeout(this.WatchUnity.bind(this), 500);

            this.notifyFailure("UNITY", "PLUGIN_NOT_DETECTED", {});
        } else
            this.notifySuccess(null, {});  
    },

    WatchUnity : function() {
        navigator.plugins.refresh();
        
        if (Mixamo.Unity.DetectUnityWebPlayer())
            window.location.reload();
        else
            setTimeout(this.WatchUnity.bind(this), 500);
    }
});
