0021_output_resolution: fix to use output w/h instead of screen w/h 58/321958/1
authorduna.oh <duna.oh@samsung.com>
Tue, 1 Apr 2025 11:06:30 +0000 (20:06 +0900)
committerduna.oh <duna.oh@samsung.com>
Tue, 1 Apr 2025 11:06:30 +0000 (20:06 +0900)
Change-Id: I135611633920f8f54ef89b49a0d99f2935b8fa51

src/e_test_event.cpp
src/testcase/0021_output_resolution.cpp

index 023064e5464b4bdb1ec0971b2299d14599e315f2..13df4e88c74637c72612a45e1824ab01c37cdfda 100644 (file)
@@ -2511,7 +2511,7 @@ checkEvasDeviceInfo(Evas_Device *dev)
 static Eina_Bool
 checkEcoreDeviceInfo(Ecore_Device *dev)
 {
-   DBG("[%s] name(%s), description(%s), class(%d), subclass(%d)", __func__, ecore_device_name_get(dev), ecore_device_description_get(dev), ecore_device_class_get(dev), evas_device_subclass_get(dev));
+   DBG("[%s] name(%s), description(%s), class(%d), subclass(%d)", __func__, ecore_device_name_get(dev), ecore_device_description_get(dev), ecore_device_class_get(dev), ecore_device_subclass_get(dev));
 
    unsigned int description_len = strlen(ecore_device_description_get(dev));
    unsigned int name_len = strlen(ecore_device_name_get(dev));
index 5dcee20a3a30caf5f2c1a777dec18367ffa596ad..897a3cffde096da2d3c99c67522105dccced3a83 100644 (file)
@@ -39,7 +39,6 @@ TEST_F(etTestOutputResolution, basic)
 {
    Eina_Bool res = 0;
    const int win_w = 100, win_h = 100;
-   int screen_w = 0, screen_h = 0;
    double ratio_w = 1.0, ratio_h = 1.0;
 
    etWin *tw = NULL;
@@ -56,10 +55,8 @@ TEST_F(etTestOutputResolution, basic)
    ASSERT_FOCUS_IN(tw_red);
    ASSERT_TRUE(tw_red != NULL) << "failed to initiation window";
 
-   res = etRunner::get().getScreenSize(&screen_w, &screen_h);
-   ASSERT_EQ(res, EINA_TRUE) << "failed to get screen size";
-   ratio_w = (double) screen_w / CONFIGURED_OUTPUT_RESOLUTION_W;
-   ratio_h = (double) screen_h / CONFIGURED_OUTPUT_RESOLUTION_H;
+   ratio_w = (double) etRunner::get().output.w / CONFIGURED_OUTPUT_RESOLUTION_W;
+   ratio_h = (double) etRunner::get().output.h / CONFIGURED_OUTPUT_RESOLUTION_H;
 
    // Expected window size res:
    // tw_red.w = ratio_w * win_w (150 as FHD screen)
@@ -87,7 +84,6 @@ TEST_F(etTestOutputResolution, base_output_resolution_basic)
 {
    Eina_Bool res = 0;
    const int win_w = 100, win_h = 100;
-   int screen_w = 0, screen_h = 0;
    double ratio_w = 1.0, ratio_h = 1.0;
 
    etWin *tw = NULL;
@@ -106,10 +102,8 @@ TEST_F(etTestOutputResolution, base_output_resolution_basic)
    ASSERT_FOCUS_IN(tw_red);
    ASSERT_TRUE(tw_red != NULL) << "failed to initiation window";
 
-   res = etRunner::get().getScreenSize(&screen_w, &screen_h);
-   ASSERT_EQ(res, EINA_TRUE) << "failed to get screen size";
-   ratio_w = (double) screen_w / BASE_OUTPUT_RESOLUTION_W;
-   ratio_h = (double) screen_h / BASE_OUTPUT_RESOLUTION_H;
+   ratio_w = (double) etRunner::get().output.w / BASE_OUTPUT_RESOLUTION_W;
+   ratio_h = (double) etRunner::get().output.h / BASE_OUTPUT_RESOLUTION_H;
 
    // Expected window size res:
    // tw_red.w = ratio_w * win_w (300 as FHD screen)
@@ -174,6 +168,7 @@ TEST_F(etTestOutputResolution, basic_robustness)
    ret = inputgen_h->generatePointerMove(1, pos_x, pos_y);
    ASSERT_TRUE(ret);
    ev_result = etRunner::get().waitEvent(NULL, E_TC_EVENT_TYPE_INPUT_ECORE_MOUSE);
+   ASSERT_NE(ev_result, nullptr);
 
    res = etRunner::get().unsetConfiguredOutputResolution();
    ASSERT_EQ(res, 0);
@@ -221,6 +216,7 @@ TEST_F(etTestOutputResolution, base_output_resolution_basic_robustness)
    ret = inputgen_h->generatePointerMove(1, pos_x, pos_y);
    ASSERT_TRUE(ret);
    ev_result = etRunner::get().waitEvent(NULL, E_TC_EVENT_TYPE_INPUT_ECORE_MOUSE);
+   ASSERT_NE(ev_result, nullptr);
 
    res = etRunner::get().unsetBaseOutputResolution(getpid());
    ASSERT_EQ(res, 0);