Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion data/20_elementary.pantheon.wm.gschema.override
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
dynamic-workspaces = true
attach-modal-dialogs = false
edge-tiling = true
experimental-features = ['scale-monitor-framebuffer']

[org.gnome.desktop.wm.preferences:Pantheon]
button-layout='close:maximize'
59 changes: 33 additions & 26 deletions tests/MutterTestCase.vala
Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,40 @@ public abstract class Gala.MutterTestCase : Gala.TestCase {
"--virtual-monitor", "1280x720@60"
};

protected Meta.Context context { get; private set; }
protected Meta.Context? context { get; private set; }
protected Clutter.Stage stage { get { return (Clutter.Stage) context.get_backend ().get_stage (); } }

private MainLoop? main_loop;

construct {
context = new Meta.Context ("");

unowned var unowned_args = MUTTER_ARGS;
try {
context.configure (ref unowned_args);
} catch (Error e) {
assert_no_error (e);
}

context.set_plugin_gtype (typeof (MockPlugin));

try {
context.setup ();
} catch (Error e) {
assert_no_error (e);
}

try {
context.start ();
} catch (Error e) {
assert_no_error (e);
}
}

public override void set_up () {
Test.log_set_fatal_handler (fatal_log_handler);

if (context == null) {
/* We can only create the context once, because Mutter doesn't allow recreating it */
context = new Meta.Context ("");

unowned var unowned_args = MUTTER_ARGS;
try {
context.configure (ref unowned_args);
} catch (Error e) {
assert_no_error (e);
}

context.set_plugin_gtype (typeof (MockPlugin));

try {
context.setup ();
} catch (Error e) {
assert_no_error (e);
}

try {
context.start ();
} catch (Error e) {
assert_no_error (e);
}
}

main_loop = new MainLoop (null, false);
}

Expand All @@ -74,6 +75,12 @@ public abstract class Gala.MutterTestCase : Gala.TestCase {
return false;
}

if (domain == "libmutter" && FLAG_FATAL in level && "Failed to make thread" in message) {
/* Mutter sends a fatal log when failing to make a thread rt scheduled but that doesn't matter for us */
Test.message ("Got expected fatal make thread rt log, not aborting");
return false;
}

return true;
}

Expand Down
2 changes: 2 additions & 0 deletions tests/lib/SwipeTriggerTest.vala
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public class Gala.SwipeTriggerTest : MutterTestCase {
}

public override void set_up () {
base.set_up ();

actor = new Clutter.Actor ();
trigger = new SwipeTrigger (actor, Clutter.Orientation.HORIZONTAL);
}
Expand Down
Loading