[Webkit-unassigned] [Bug 33167] New: Add a test harness for the Windows WebKit API, and a few tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 4 12:03:00 PST 2010


           Summary: Add a test harness for the Windows WebKit API, and a
                    few tests
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: aroben at apple.com
                CC: andersca at apple.com, sam at webkit.org, sfalken at apple.com

Adam Roben (aroben) <aroben at apple.com> changed:

           What    |Removed                     |Added
  Attachment #45814|                            |review?
               Flag|                            |

Created an attachment (id=45814)
 --> (https://bugs.webkit.org/attachment.cgi?id=45814)

We currently only have tests for a handful of bugs regarding WebView
destruction, but more tests can easily be added later. Eventually
we'll run these tests as part of run-webkit-tests.

Need a short description and bug URL (OOPS!)

Reviewed by NOBODY (OOPS!).


* WebKit.vcproj/WebKit.sln: Added WebKitAPITest.vcproj. It builds just
after DumpRenderTree.vcproj.


* WebKitAPITest/HostWindow.cpp: Added.
(WebKitAPITest::HostWindow::HostWindow): Initialize m_window.
(WebKitAPITest::HostWindow::~HostWindow): Destroy our window if
(WebKitAPITest::HostWindow::initialize): Create our window.
(WebKitAPITest::HostWindow::clientRect): Return our window's client
(WebKitAPITest::HostWindow::registerWindowClass): Does what it says.
(WebKitAPITest::hostWindow): Return the HostWindow associated with
this HWND.
(WebKitAPITest::HostWindow::wndProc): Just call through to

* WebKitAPITest/HostWindow.h: Added.
(WebKitAPITest::HostWindow::window): Simple getter.

* WebKitAPITest/Test.h: Added. This file defines some macros useful
for writing tests.

* WebKitAPITest/TestsController.cpp: Added.
(WebKitAPITest::TestsController::TestsController): Initialize our
(WebKitAPITest::TestsController::shared): Return the shared instance.
(WebKitAPITest::TestsController::runAllTests): Run a message pump
until a WM_QUIT message is received, then return whether all tests
(WebKitAPITest::TestsController::addTest): Add the test to m_tests and
start running tests soon.
(WebKitAPITest::TestsController::testFailed): Record the failure and
print a message about it to stdout.
(WebKitAPITest::TestsController::runNextTest): If we don't have any
tests to run, post a WM_QUIT message to stop the message pump.
Otherwise, run the test and print whether it passed, then schedule the
next test.
(WebKitAPITest::TestsController::runNextTestSoon): Set a 0-delay timer
to run the next test.
(WebKitAPITest::TestsController::registerWindowClass): Does what it
(WebKitAPITest::TestsController::wndProc): If the runNextTestTimer
fired, call runNextTest(). Pass everything else through to

* WebKitAPITest/TestsController.h: Added.

* WebKitAPITest/WebKitAPITest.vcproj: Added.

* WebKitAPITest/WebKitAPITestCommon.vsprops: Added.

* WebKitAPITest/main.cpp: Added.
(main): (Mostly) just calls TestsController::runAllTests.

* WebKitAPITest/tests/WebViewDestruction.cpp: Added.
(WebKitAPITest::WebKitCreateInstance): Helper function template to
call through to the real WebKitCreateInstance.
(WebKitAPITest::webViewCount): Helper function to call through to
(WebKitAPITest::createWebView): Helper function to create a WebView
and put it inside a HostWindow.
(WebKitAPITest::runMessagePump): Helper function to run a message pump
for a specified number of milliseconds, or until a WM_QUIT message is
(WebKitAPITest::CloseWithoutDestroyWindow): Test for
(WebKitAPITest::MainFrameAfterClose): Test for
(WebKitAPITest::NoCloseOrDestroyWindow): Test for
 12 files changed, 1026 insertions(+), 0 deletions(-)

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list