summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2013-08-01 13:12:16 -0700
committerPhilip Chimento <philip@endlessm.com>2013-08-01 19:04:13 -0700
commitc1dc661f6ea250306c6191e476d61ae58941c2c7 (patch)
tree95870a7f084ae5cbaeb031fb92cf8e483790d7fb /test
parentcd175cbb4a0d9a221be65b6aac314bbfeaac0363 (diff)
Add top bar edge finishing
Add a highlight and shadow, on the bottom of the top bar; two pixels go over the top bar, and two pixels go over the app content. Added a smoke test with a button that turns red on press, in order to test that the two pixels on top of the app content do not catch input events. [endlessm/eos-sdk#197]
Diffstat (limited to 'test')
-rw-r--r--test/smoke-tests/large-content.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/smoke-tests/large-content.js b/test/smoke-tests/large-content.js
new file mode 100644
index 0000000..da34f53
--- /dev/null
+++ b/test/smoke-tests/large-content.js
@@ -0,0 +1,42 @@
+// Copyright 2013 Endless Mobile, Inc.
+
+const Lang = imports.lang;
+const Endless = imports.gi.Endless;
+const Gdk = imports.gi.Gdk;
+const Gtk = imports.gi.Gtk;
+const GObject = imports.gi.GObject;
+
+const TEST_APPLICATION_ID = 'com.endlessm.example.test';
+
+const TestApplication = new Lang.Class ({
+ Name: 'TestApplication',
+ Extends: Endless.Application,
+
+ vfunc_startup: function() {
+ this.parent();
+
+ let big_button = new Gtk.Button({
+ label: "BIG OL BUTTON"
+ });
+ big_button.override_background_color(Gtk.StateFlags.NORMAL,
+ new Gdk.RGBA({ red: 0, green: 0, blue: 1, alpha: 1 }));
+ big_button.override_background_color(Gtk.StateFlags.ACTIVE,
+ new Gdk.RGBA({ red: 1, green: 0, blue: 0, alpha: 1 }));
+ //big_button.set_size_request(9999, 9999);
+
+ let window = new Endless.Window({
+ application: this
+ });
+ window.get_page_manager().add(big_button);
+ // window.connect("size-allocate", function(w, alloc) {
+ // print("Win width", alloc.width);
+ // print("Win height", alloc.height);
+ // });
+
+ window.show_all();
+ }
+});
+
+let app = new TestApplication({ application_id: TEST_APPLICATION_ID,
+ flags: 0 });
+app.run(ARGV);