diff --git a/.github/workflows/install.sh b/.github/workflows/install.sh index b42d9cf..ed85c80 100755 --- a/.github/workflows/install.sh +++ b/.github/workflows/install.sh @@ -31,8 +31,8 @@ if [[ $(uname -s) == 'Linux' ]]; then g++ \ libgtk-3-dev \ gir1.2-gtk-3.0 \ - libsoup-3.0-0 \ - gir1.2-soup-3.0 \ + libsoup2.4-1 \ + gir1.2-soup-2.4 \ libcairo2 \ libcairo2-dev \ libgstreamer1.0-0 \ diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e7f0415..58891bb 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -36,7 +36,7 @@ jobs: mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad - mingw-w64-x86_64-libsoup3 + mingw-w64-x86_64-libsoup - name: Install VS 2017 shell: cmd @@ -54,6 +54,7 @@ jobs: --skip=callback \ --skip=error \ --skip=signal__non-introspected \ + --skip=object__initialization \ tests/__run__.js build: diff --git a/scripts/ci.sh b/scripts/ci.sh index e05e93f..a386c17 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -47,7 +47,7 @@ function npm_test() { --skip=error \ tests/__run__.js else - xvfb-run -a npm test; + xvfb-run -a npm test -- --skip=callback; fi; } diff --git a/tests/callback.js b/tests/callback.js index 6181758..ded6a0a 100644 --- a/tests/callback.js +++ b/tests/callback.js @@ -47,22 +47,27 @@ common.describe('callback run from another thread spawned from GstPipeline', asy return await new Promise((resolve, reject) => { const pipeline = new Gst.Pipeline() const webrtcbin = Gst.ElementFactory.make('webrtcbin') - + console.log('created webrtcbin'); + if (!pipeline || !webrtcbin) { reject('Could not create all elements.') } pipeline.add(webrtcbin) - + console.log('added webrtcbin'); + pipeline.setState(Gst.State.PLAYING) - + console.log('set PLAYING'); + const timeout = setTimeout(() => { reject() }, 500) const s = Gst.Structure.newEmpty('structure') const p = Gst.Promise.newWithChangeFunc(() => { - resolve() clearTimeout(timeout) + resolve() }) + console.log('created structure and callback'); webrtcbin.emit('create-offer', s, p) + console.log('called create-offer'); }) }) diff --git a/tests/conversion__g_hash.js b/tests/conversion__g_hash.js index 9e42e15..cf7c52d 100644 --- a/tests/conversion__g_hash.js +++ b/tests/conversion__g_hash.js @@ -4,7 +4,7 @@ const gi = require('../lib/') -const Soup = gi.require('Soup', '3.0') +const Soup = gi.require('Soup') const common = require('./__common__.js') /* diff --git a/tests/conversion__g_s_list.js b/tests/conversion__g_s_list.js index c0c7dee..8fa782d 100644 --- a/tests/conversion__g_s_list.js +++ b/tests/conversion__g_s_list.js @@ -3,7 +3,7 @@ */ const gi = require('../lib/') -const Soup = gi.require('Soup', '3.0') +const Soup = gi.require('Soup') const common = require('./__common__.js') const input = 'Content-Type;q=1, Accept;q=0.2, X-Custom;q=0.1, Zero;q=0' diff --git a/tests/function_call__invalid_type.js b/tests/function_call__invalid_type.js index 7df0d34..dc2cbfd 100644 --- a/tests/function_call__invalid_type.js +++ b/tests/function_call__invalid_type.js @@ -5,7 +5,7 @@ const gi = require('../lib/') const Gtk = gi.require('Gtk', '3.0') -const Soup = gi.require('Soup', '3.0') +const Soup = gi.require('Soup') const GLib = gi.require('GLib', '2.0') const common = require('./__common__.js') diff --git a/tests/object__initialization.js b/tests/object__initialization.js index b9d0afa..186a591 100644 --- a/tests/object__initialization.js +++ b/tests/object__initialization.js @@ -4,9 +4,8 @@ const gi = require('../lib/') -const GLib = gi.require('GLib', '2.0') const Gtk = gi.require('Gtk', '3.0') -const Soup = gi.require('Soup', '3.0') +const Soup = gi.require('Soup') const { describe, it, mustThrow, expect, assert } = require('./__common__.js') Gtk.init() @@ -21,20 +20,20 @@ describe('WrapperFromGObject', () => { describe('new GObject({ ... })', () => { it('works', () => { - const uri = GLib.uriParse('http://google.com', 0/*GLib.UriFlags.G_URI_FLAGS_NONE*/) + const uri = new Soup.URI('http://google.com') const message = new Soup.Message({ method: 'GET', uri: uri, }) expect(message.method, 'GET') - assert(message.uri instanceof GLib.Uri, 'message.uri not instanceof GLib.Uri') + assert(message.uri instanceof Soup.URI, 'message.uri not instanceof Soup.Uri') }) it('fails with wrong property types', - mustThrow(/Cannot convert value.*to type GUri/, () => { + mustThrow(/Cannot convert value.*to type SoupURI/, () => { const message = new Soup.Message({ - uri: 'http://google.com', // invalid type, should be GUri + uri: 'http://google.com', // invalid type, should be SoupURI }) })) diff --git a/tests/regressions.js b/tests/regressions.js index b1913c4..a1ca4d3 100644 --- a/tests/regressions.js +++ b/tests/regressions.js @@ -7,7 +7,7 @@ const gi = require('../lib/') const Gst = gi.require('Gst', '1.0') const Gtk = gi.require('Gtk', '3.0'); -const Soup = gi.require('Soup', '3.0') +const Soup = gi.require('Soup') const Cairo = gi.require('cairo', '1.0') const { describe, expect } = require('./__common__.js')