tests: Don't use the default stage
https://bugzilla.gnome.org/show_bug.cgi?id=678737
This commit is contained in:
parent
3ce9ad05b3
commit
0d82ce5210
@ -6,11 +6,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
stage.user_resizable = true;
|
||||
stage.width = 1024;
|
||||
stage.height = 768;
|
||||
let stage = new Clutter.Stage({ user_resizable: true, width: 1024, height: 768 });
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ style: 'background: #ffee88;' });
|
||||
vbox.add_constraint(new Clutter.BindConstraint({ source: stage,
|
||||
|
@ -5,10 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
stage.width = 640;
|
||||
stage.height = 480;
|
||||
let stage = new Clutter.Stage({ width: 640, height: 480 });
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ width: stage.width,
|
||||
height: stage.height,
|
||||
|
@ -5,10 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
stage.width = 640;
|
||||
stage.height = 480;
|
||||
let stage = new Clutter.Stage({ width: 640, height: 480 });
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ width: stage.width,
|
||||
height: stage.height,
|
||||
|
@ -5,10 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
stage.width = 640;
|
||||
stage.height = 480;
|
||||
let stage = new Clutter.Stage({ width: 640, height: 480 });
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ width: stage.width,
|
||||
height: stage.height,
|
||||
|
@ -5,8 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
let stage = new Clutter.Stage();
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ vertical: true,
|
||||
width: stage.width,
|
||||
|
@ -5,10 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
stage.width = 640;
|
||||
stage.height = 480;
|
||||
let stage = new Clutter.Stage({ width: 640, height: 480 });
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ width: stage.width,
|
||||
height: stage.height,
|
||||
|
@ -7,10 +7,8 @@ const St = imports.gi.St;
|
||||
const Calendar = imports.ui.calendar;
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
stage.width = stage.height = 400;
|
||||
stage.show();
|
||||
let stage = new Clutter.Stage({ width: 400, height: 400 });
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ vertical: true,
|
||||
width: stage.width,
|
||||
|
@ -5,8 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
let stage = new Clutter.Stage();
|
||||
UI.init(stage);
|
||||
|
||||
let b = new St.BoxLayout({ vertical: true,
|
||||
width: stage.width,
|
||||
|
@ -1,19 +1,14 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Lang = imports.lang;
|
||||
const St = imports.gi.St;
|
||||
|
||||
const Calendar = imports.ui.calendar;
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
Gtk.init(null, null);
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
stage.width = stage.height = 400;
|
||||
stage.show();
|
||||
let stage = new Clutter.Stage({ width: 400, height: 400 });
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ vertical: true,
|
||||
width: stage.width,
|
||||
|
@ -5,11 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
|
||||
stage.width = 400;
|
||||
stage.height = 700;
|
||||
let stage = new Clutter.Stage();
|
||||
UI.init(stage);
|
||||
|
||||
let b = new St.BoxLayout({ vertical: true,
|
||||
width: stage.width,
|
||||
|
@ -5,8 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
let stage = new Clutter.Stage();
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ vertical: true,
|
||||
width: stage.width,
|
||||
|
@ -251,10 +251,8 @@ SizingIllustrator.prototype = {
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
stage.width = 600;
|
||||
stage.height = 600;
|
||||
let stage = new Clutter.Stage({ width: 600, height: 600 });
|
||||
UI.init(stage);
|
||||
|
||||
let mainBox = new St.BoxLayout({ width: stage.width,
|
||||
height: stage.height,
|
||||
|
@ -6,8 +6,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
let stage = new Clutter.Stage();
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ vertical: true,
|
||||
width: stage.width,
|
||||
|
@ -5,9 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
stage.width = stage.height = 600;
|
||||
let stage = new Clutter.Stage({ width: 600, height: 600 });
|
||||
UI.init(stage);
|
||||
|
||||
let vbox = new St.BoxLayout({ vertical: true,
|
||||
width: stage.width,
|
||||
|
@ -5,8 +5,8 @@ const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
|
||||
UI.init();
|
||||
let stage = Clutter.Stage.get_default();
|
||||
let stage = new Clutter.Stage();
|
||||
UI.init(stage);
|
||||
|
||||
let hbox = new St.BoxLayout({ name: 'transition-container',
|
||||
reactive: true,
|
||||
|
@ -3,16 +3,13 @@
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const GLib = imports.gi.GLib;
|
||||
const St = imports.gi.St;
|
||||
const Shell = imports.gi.Shell;
|
||||
|
||||
const Environment = imports.ui.environment;
|
||||
|
||||
function init() {
|
||||
function init(stage) {
|
||||
Environment.init();
|
||||
|
||||
let stage = Clutter.Stage.get_default();
|
||||
let context = St.ThemeContext.get_for_stage (stage);
|
||||
let context = St.ThemeContext.get_for_stage(stage);
|
||||
let stylesheetPath = GLib.getenv("GNOME_SHELL_TESTSDIR") + "/testcommon/test.css";
|
||||
let theme = new St.Theme ({ application_stylesheet: stylesheetPath });
|
||||
context.set_theme (theme);
|
||||
let theme = new St.Theme({ application_stylesheet: stylesheetPath });
|
||||
context.set_theme(theme);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user