[gtk+] scrolledwindow test: Check natural width for max content size



commit d6187c9a028f678287cc2a7f72e1ea9997fd19d0
Author: Tristan Van Berkom <tristan vanberkom codethink co uk>
Date:   Tue Jun 7 14:02:37 2016 +0900

    scrolledwindow test: Check natural width for max content size
    
    The maximum content size does not increase the minimum request
    but only ensures that both minimum and natural requests do not
    exceed the maximum setting.

 testsuite/gtk/scrolledwindow.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/testsuite/gtk/scrolledwindow.c b/testsuite/gtk/scrolledwindow.c
index 2a72daa..317f913 100644
--- a/testsuite/gtk/scrolledwindow.c
+++ b/testsuite/gtk/scrolledwindow.c
@@ -46,11 +46,11 @@ test_size (GtkOrientation orientation,
            * Here, the content is purposely bigger than the scrolled window,
            * so it should grow up to max-content-width.
            */
-          gtk_widget_get_preferred_width (scrolledwindow, &size, NULL);
+          gtk_widget_get_preferred_width (scrolledwindow, NULL, &size);
           gtk_widget_get_preferred_width (box, &child_size, NULL);
 
           g_assert_cmpint (child_size, ==, BOX_SIZE);
-          g_assert_cmpint (size, >=, MAX_SIZE);
+          g_assert_cmpint (size, ==, MAX_SIZE);
         }
     }
   /* Testing the content-height property */
@@ -74,11 +74,11 @@ test_size (GtkOrientation orientation,
            * Here, the content is purposely bigger than the scrolled window,
            * so it should grow up to max-content-height.
            */
-          gtk_widget_get_preferred_height (scrolledwindow, &size, NULL);
+          gtk_widget_get_preferred_height (scrolledwindow, NULL, &size);
           gtk_widget_get_preferred_height (box, &child_size, NULL);
 
           g_assert_cmpint (child_size, ==, BOX_SIZE);
-          g_assert_cmpint (size, >=, MAX_SIZE);
+          g_assert_cmpint (size, ==, MAX_SIZE);
         }
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]