[gnome-music] tests: use distinct names for mainloops
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] tests: use distinct names for mainloops
- Date: Tue, 4 Jun 2013 11:18:40 +0000 (UTC)
commit 4ffee2be0c3920856a8c181a4090a20de43538df
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Tue Jun 4 13:18:32 2013 +0200
tests: use distinct names for mainloops
tests/tests_albumPlayback.js | 12 ++++++------
tests/tests_artistsPlayback.js | 8 ++++----
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/tests/tests_albumPlayback.js b/tests/tests_albumPlayback.js
index 38c4316..13e211a 100644
--- a/tests/tests_albumPlayback.js
+++ b/tests/tests_albumPlayback.js
@@ -48,10 +48,10 @@ function testAlbumViewPlayback() {
//FIXME: Here we try to quit the mainloop for each album
//this causes exceptions and should be handled correctly
try {
- Mainloop.quit('testMainloop');
+ Mainloop.quit('albumArtLoadedMainloop');
} catch(Exception) {}
}));
- Mainloop.run('testMainloop');
+ Mainloop.run('albumArtLoadedMainloop');
// Loaded, ready to go
// Check that no more than 50 and no less than 0 albums were loaded
@@ -70,12 +70,12 @@ function testAlbumViewPlayback() {
// Select first album
let albumWidget = albumView._albumWidget;
albumWidget.connect("loaded", Lang.bind(this, function(){
- Mainloop.quit('testMainloop');
+ Mainloop.quit('loadedMainloop');
}));
Mainloop.idle_add(function() {
albumView.view.emit('item-activated', "0", firstAlbumPath);
})
- Mainloop.run('testMainloop');
+ Mainloop.run('loadedMainloop');
// Album view loaded
// Make sure that the same artist and album are displayed
@@ -91,9 +91,9 @@ function testAlbumViewPlayback() {
// Wait for tracks to be added
albumWidget.connect('track-added', Lang.bind(this, function(){
- Mainloop.quit('testMainloop');
+ Mainloop.quit('trackAddedMainloop');
}))
- Mainloop.run('testMainloop');
+ Mainloop.run('trackAddedMainloop');
// FIXME: wait for all tracks to be added, for now operate on the first one
let model = albumWidget.model;
diff --git a/tests/tests_artistsPlayback.js b/tests/tests_artistsPlayback.js
index ddb3636..6f77b55 100644
--- a/tests/tests_artistsPlayback.js
+++ b/tests/tests_artistsPlayback.js
@@ -48,10 +48,10 @@ function testArtistsViewPlayback() {
//FIXME: Here we try to quit the mainloop for each album
//this causes exceptions and should be handled correctly
try {
- Mainloop.quit('testMainloop');
+ Mainloop.quit('artistAddedMainloop');
} catch(Exception) {}
}));
- Mainloop.run('testMainloop');
+ Mainloop.run('artistAddedMainloop');
// Loaded, ready to go
// Check that no more than 50 and no less than 0 artists were loaded
@@ -80,9 +80,9 @@ function testArtistsViewPlayback() {
// Wait for all tracks to be added
artistAlbumWidget.connect("tracks-loaded", Lang.bind(this, function(){
- Mainloop.quit('testMainloop1');
+ Mainloop.quit('tracksLoadedMainloop');
}));
- Mainloop.run('testMainloop1');
+ Mainloop.run('tracksLoadedMainloop');
assertTrue(artistAlbumWidget.tracks.length > 0);
let firstTrack = artistAlbumWidget.tracks[0];
let trackTitle = firstTrack.get_title();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]