diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_android_cast.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_android_cast.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/meshbay-hub/tests/test_android_cast.py b/packages/meshbay-hub/tests/test_android_cast.py index ebcdec4..82b36d6 100644 --- a/packages/meshbay-hub/tests/test_android_cast.py +++ b/packages/meshbay-hub/tests/test_android_cast.py @@ -113,11 +113,12 @@ def test_relay_calls_keep_their_order(): " || frame.channel == BinaryFrame.CAST_FILE") in _read(SRC / "bridge" / "Channels.kt") -def test_screen_off_survival_is_switched_on_only_while_casting_or_playing(): +def test_screen_off_survival_is_switched_on_only_while_casting_playing_or_backing_up(): activity = _read(SRC / "MainActivity.kt") keep = activity.split("private fun keepAlive()", 1)[1].split("\n }\n", 1)[0] assert "val on = casting || playing" in keep - assert "web.keepVisible = on" in keep + # A photo backup holds the page too, through its own service (§9.12). + assert "web.keepVisible = on || syncing" in keep assert "if (!on) { stopService(service); return }" in keep assert "startForegroundService(service)" in keep assert activity.count("keepVisible =") == 1, "the page is kept visible from one place only" @@ -126,6 +127,8 @@ def test_screen_off_survival_is_switched_on_only_while_casting_or_playing(): manifest = _read(MAIN / "AndroidManifest.xml") assert 'android:name=".cast.CastService"' in manifest assert 'android:foregroundServiceType="mediaPlayback"' in manifest + assert 'android:name=".photos.BackupService"' in manifest + assert 'android:foregroundServiceType="dataSync"' in manifest def test_the_receiver_is_given_what_the_desktop_gives_it(): |