Changeset 79463 in webkit


Ignore:
Timestamp:
Feb 23, 2011 11:03:32 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-02-23 Alexis Menard <alexis.menard@openbossa.org>

Reviewed by Ariya Hidayat.

[Qt] tst_QWebView::setPalette(activeFG) fails
https://bugs.webkit.org/show_bug.cgi?id=55029

Attempt to make the test more robust. By investigating with the bot virtual machine
I discovered that the activation can take some time. In this patch we make sure that
the active window we want to have is the same as the QApplication.

  • tests/qwebview/tst_qwebview.cpp: (tst_QWebView::setPalette):
Location:
trunk/Source/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/qt/ChangeLog

    r79450 r79463  
     12011-02-23  Alexis Menard  <alexis.menard@openbossa.org>
     2
     3        Reviewed by Ariya Hidayat.
     4
     5        [Qt] tst_QWebView::setPalette(activeFG) fails
     6        https://bugs.webkit.org/show_bug.cgi?id=55029
     7
     8        Attempt to make the test more robust. By investigating with the bot virtual machine
     9        I discovered that the activation can take some time. In this patch we make sure that
     10        the active window we want to have is the same as the QApplication.
     11
     12        * tests/qwebview/tst_qwebview.cpp:
     13        (tst_QWebView::setPalette):
     14
    1152011-02-23  Alexis Menard  <alexis.menard@openbossa.org>
    216
  • trunk/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp

    r79409 r79463  
    333333    QFETCH(bool, active);
    334334    QFETCH(bool, background);
     335
     336    QWidget* activeView = 0;
    335337
    336338    // Use controlView to manage active/inactive state of test views by raising
     
    369371        controlView.activateWindow();
    370372        QTest::qWaitForWindowShown(&controlView);
    371     } else
     373        activeView = &controlView;
     374    } else {
    372375        view1.activateWindow();
     376        activeView = &view1;
     377    }
     378
     379    QTRY_COMPARE(QApplication::activeWindow(), activeView);
    373380
    374381    view1.page()->triggerAction(QWebPage::SelectAll);
     
    411418        controlView.activateWindow();
    412419        QTest::qWaitForWindowShown(&controlView);
    413     } else
     420        activeView = &controlView;
     421    } else {
    414422        view2.activateWindow();
     423        activeView = &view2;
     424    }
     425
     426    QTRY_COMPARE(QApplication::activeWindow(), activeView);
    415427
    416428    view2.page()->triggerAction(QWebPage::SelectAll);
Note: See TracChangeset for help on using the changeset viewer.