[gtk/wip/otte/titlebar: 55/55] reftests: Add tests that check default-size is computed correctly
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/titlebar: 55/55] reftests: Add tests that check default-size is computed correctly
- Date: Tue, 21 Sep 2021 02:52:32 +0000 (UTC)
commit 1ef000b1abd734979096589344e0c052ec4fc4c6
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 21 00:59:36 2021 +0200
reftests: Add tests that check default-size is computed correctly
Related: #4136
testsuite/reftests/default-size-undecorated.ref.ui | 52 +++++++++++++++++++
testsuite/reftests/default-size-undecorated.ui | 56 ++++++++++++++++++++
.../reftests/default-size-with-titlebar.ref.ui | 55 ++++++++++++++++++++
testsuite/reftests/default-size-with-titlebar.ui | 59 ++++++++++++++++++++++
.../reftests/default-size-without-titlebar.ref.ui | 52 +++++++++++++++++++
.../reftests/default-size-without-titlebar.ui | 56 ++++++++++++++++++++
testsuite/reftests/meson.build | 6 +++
7 files changed, 336 insertions(+)
---
diff --git a/testsuite/reftests/default-size-undecorated.ref.ui
b/testsuite/reftests/default-size-undecorated.ref.ui
new file mode 100644
index 0000000000..815a17caba
--- /dev/null
+++ b/testsuite/reftests/default-size-undecorated.ref.ui
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window">
+ <property name="width_request">600</property>
+ <property name="height_request">400</property>
+ <property name="decorated">0</property>
+ <property name="child">
+ <object class="GtkGrid">
+ <property name="valign">center</property>
+ <property name="halign">center</property>
+ <property name="column-spacing">10</property>
+ <property name="row-spacing">10</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default width:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">600</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default height:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">400</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+</interface>
diff --git a/testsuite/reftests/default-size-undecorated.ui b/testsuite/reftests/default-size-undecorated.ui
new file mode 100644
index 0000000000..92f636a8ca
--- /dev/null
+++ b/testsuite/reftests/default-size-undecorated.ui
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window">
+ <property name="width_request">600</property>
+ <property name="height_request">400</property>
+ <property name="decorated">0</property>
+ <property name="child">
+ <object class="GtkGrid">
+ <property name="valign">center</property>
+ <property name="halign">center</property>
+ <property name="column-spacing">10</property>
+ <property name="row-spacing">10</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default width:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <!-- This binding should never do anything because the text is set to
+ the correct value from the start, all we do is make sure it doesn't change -->
+ <property name="label" bind-source="window" bind-property="default-width">600</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default height:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <!-- This binding should never do anything because the text is set to
+ the correct value from the start, all we do is make sure it doesn't change -->
+ <property name="label" bind-source="window" bind-property="default-height">400</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+</interface>
diff --git a/testsuite/reftests/default-size-with-titlebar.ref.ui
b/testsuite/reftests/default-size-with-titlebar.ref.ui
new file mode 100644
index 0000000000..37826fb763
--- /dev/null
+++ b/testsuite/reftests/default-size-with-titlebar.ref.ui
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window">
+ <property name="width_request">600</property>
+ <property name="height_request">400</property>
+ <property name="title">size?</property>
+ <property name="titlebar">
+ <object class="GtkHeaderBar" />
+ </property>
+ <property name="child">
+ <object class="GtkGrid">
+ <property name="valign">center</property>
+ <property name="halign">center</property>
+ <property name="column-spacing">10</property>
+ <property name="row-spacing">10</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default width:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">600</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default height:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">400</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+</interface>
diff --git a/testsuite/reftests/default-size-with-titlebar.ui
b/testsuite/reftests/default-size-with-titlebar.ui
new file mode 100644
index 0000000000..9e57aa45f4
--- /dev/null
+++ b/testsuite/reftests/default-size-with-titlebar.ui
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window">
+ <property name="width_request">600</property>
+ <property name="height_request">400</property>
+ <property name="title">size?</property>
+ <property name="titlebar">
+ <object class="GtkHeaderBar" />
+ </property>
+ <property name="child">
+ <object class="GtkGrid">
+ <property name="valign">center</property>
+ <property name="halign">center</property>
+ <property name="column-spacing">10</property>
+ <property name="row-spacing">10</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default width:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <!-- This binding should never do anything because the text is set to
+ the correct value from the start, all we do is make sure it doesn't change -->
+ <property name="label" bind-source="window" bind-property="default-width">600</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default height:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <!-- This binding should never do anything because the text is set to
+ the correct value from the start, all we do is make sure it doesn't change -->
+ <property name="label" bind-source="window" bind-property="default-height">400</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+</interface>
diff --git a/testsuite/reftests/default-size-without-titlebar.ref.ui
b/testsuite/reftests/default-size-without-titlebar.ref.ui
new file mode 100644
index 0000000000..01064637ca
--- /dev/null
+++ b/testsuite/reftests/default-size-without-titlebar.ref.ui
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window">
+ <property name="width_request">600</property>
+ <property name="height_request">400</property>
+ <property name="title">size?</property>
+ <property name="child">
+ <object class="GtkGrid">
+ <property name="valign">center</property>
+ <property name="halign">center</property>
+ <property name="column-spacing">10</property>
+ <property name="row-spacing">10</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default width:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">600</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default height:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">400</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+</interface>
diff --git a/testsuite/reftests/default-size-without-titlebar.ui
b/testsuite/reftests/default-size-without-titlebar.ui
new file mode 100644
index 0000000000..dcc27aebab
--- /dev/null
+++ b/testsuite/reftests/default-size-without-titlebar.ui
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window">
+ <property name="width_request">600</property>
+ <property name="height_request">400</property>
+ <property name="title">size?</property>
+ <property name="child">
+ <object class="GtkGrid">
+ <property name="valign">center</property>
+ <property name="halign">center</property>
+ <property name="column-spacing">10</property>
+ <property name="row-spacing">10</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default width:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <!-- This binding should never do anything because the text is set to
+ the correct value from the start, all we do is make sure it doesn't change -->
+ <property name="label" bind-source="window" bind-property="default-width">600</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">default height:</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <!-- This binding should never do anything because the text is set to
+ the correct value from the start, all we do is make sure it doesn't change -->
+ <property name="label" bind-source="window" bind-property="default-height">400</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+</interface>
diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
index 5e4d5d08d7..ea967f2d0c 100644
--- a/testsuite/reftests/meson.build
+++ b/testsuite/reftests/meson.build
@@ -225,6 +225,12 @@ testdata = [
'data-url.css',
'data-url.ref.ui',
'data-url.ui',
+ 'default-size-undecorated.ui',
+ 'default-size-undecorated.ref.ui',
+ 'default-size-with-titlebar.ui',
+ 'default-size-with-titlebar.ref.ui',
+ 'default-size-without-titlebar.ui',
+ 'default-size-without-titlebar.ref.ui',
'fixed-widget-stacking.ref.ui',
'fixed-widget-stacking.ui',
'flipping-icons.ref.ui',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]