function Test(browser) {
    this._init(browser);
}

Test.prototype = {
    _init: function (browser) {
        this._url = browser.getUrl();
        this._browser = browser;
        browser.open(this._url);
    },

    onLoad: function () {
        this._browser.finish();
    },

    validateCallLog: function (log, out) {
        assertEquals('Unity.init', log[0].func, 'Unity.init');
        assertEquals('Unity.MediaPlayer.init', log[1].func);
        assertEquals('Unity.MediaPlayer.onPlayPause', log[2].func);
        assertEquals('Unity.MediaPlayer.onNext', log[3].func);
        assertEquals('Unity.MediaPlayer.onPrevious', log[4].func);
        // assertEquals('Unity.Notification.showNotification', log[5].func);
        // assertEquals('Unity.MediaPlayer.setTrack', log[6].func);

        var found = false, i;
        for (i = 0; i < out.length; i++) {
            if (out[i] === 'PASS SELF TEST') {
                found = true;
            }
        }
        assertTrue('PASS SELF TEST', found);

    },

    scriptName: 'Deezer.user.js'
};
