Changeset 68910 in webkit


Ignore:
Timestamp:
Oct 1, 2010 12:07:40 PM (14 years ago)
Author:
weinig@apple.com
Message:

Add simple API tester for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=46953

Reviewed by Adam Roben.

This adds a very simple testing infrastructure for testing APIs exposed
through the WebKit project. It consists of two parts: 1) a project that
builds the all the tests 2) a script that searches the tests directory and
calls the tester once for each test.

This adds the infrastructure and two tests:

  • Tests/WTF/Vector1.cpp - A proof of concept test of WTF data-structures.
  • Tests/WebKit2/BasicTest1.cpp - A proof of concept test of WebKit2 API.

This currently only works on the mac, but is designed to be easily ported
to any platform.

  • Scripts/run-api-tests: Added.
  • Scripts/build-api-tests: Added.

Scripts to build/run the tests.

  • TestWebKitAPI: Added.
  • TestWebKitAPI/Configurations: Added.
  • TestWebKitAPI/Configurations/Base.xcconfig: Added.
  • TestWebKitAPI/Configurations/DebugRelease.xcconfig: Added.
  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Added.
  • TestWebKitAPI/ForwardingHeaders: Added.
  • TestWebKitAPI/ForwardingHeaders/wtf: Added.
  • TestWebKitAPI/PlatformUtilities.h: Added.
  • TestWebKitAPI/PlatformWebView.h: Added.

(TestWebKitAPI::PlatformWebView::platformView):

  • TestWebKitAPI/StringFunctions.h: Added.
  • TestWebKitAPI/Test.h: Added.

(TestWebKitAPI::Test::~Test):
(TestWebKitAPI::Test::name):
(TestWebKitAPI::Test::Register::Register):
(TestWebKitAPI::Test::Register::create):
(TestWebKitAPI::Test::Test):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj: Added.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added.
  • TestWebKitAPI/TestWebKitAPIPrefix.h: Added.
  • TestWebKitAPI/TestsController.cpp: Added.

(TestWebKitAPI::TestsController::shared):
(TestWebKitAPI::TestsController::TestsController):
(TestWebKitAPI::TestsController::runTestNamed):
(TestWebKitAPI::TestsController::testFailed):
(TestWebKitAPI::TestsController::registerCreateTestFunction):

  • TestWebKitAPI/TestsController.h: Added.
  • TestWebKitAPI/mac: Added.
  • TestWebKitAPI/mac/PlatformUtilitiesMac.mm: Added.

(TestWebKitAPI::Util::run):
(TestWebKitAPI::Util::createURLForResource):

  • TestWebKitAPI/mac/PlatformWebViewMac.mm: Added.

(TestWebKitAPI::PlatformWebView::PlatformWebView):
(TestWebKitAPI::PlatformWebView::resizeTo):
(TestWebKitAPI::PlatformWebView::~PlatformWebView):
(TestWebKitAPI::PlatformWebView::page):
(TestWebKitAPI::PlatformWebView::focus):

  • TestWebKitAPI/mac/main.mm: Added.

Infrastructure.

  • TestWebKitAPI/Tests: Added.
  • TestWebKitAPI/Tests/WTF: Added.
  • TestWebKitAPI/Tests/WTF/Vector1.cpp: Added.
  • TestWebKitAPI/Tests/WebKit2: Added.
  • TestWebKitAPI/Tests/WebKit2/BasicTest1.cpp: Added.

(TestWebKitAPI::State::State):

  • TestWebKitAPI/Tests/WebKit2/basic-1.html: Added.

Proof of concept tests.

Location:
trunk/WebKitTools
Files:
52 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r68907 r68910  
     12010-10-01  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Adam Roben.
     4
     5        Add simple API tester for WebKit2
     6        https://bugs.webkit.org/show_bug.cgi?id=46953
     7
     8        This adds a very simple testing infrastructure for testing APIs exposed
     9        through the WebKit project. It consists of two parts: 1) a project that
     10        builds the all the tests 2) a script that searches the tests directory and
     11        calls the tester once for each test.
     12
     13        This adds the infrastructure and two tests:
     14        - Tests/WTF/Vector1.cpp - A proof of concept test of WTF data-structures.
     15        - Tests/WebKit2/BasicTest1.cpp - A proof of concept test of WebKit2 API.
     16
     17        This currently only works on the mac, but is designed to be easily ported
     18        to any platform.
     19
     20        * Scripts/run-api-tests: Added.
     21        * Scripts/build-api-tests: Added.
     22        Scripts to build/run the tests.
     23
     24        * TestWebKitAPI: Added.
     25        * TestWebKitAPI/Configurations: Added.
     26        * TestWebKitAPI/Configurations/Base.xcconfig: Added.
     27        * TestWebKitAPI/Configurations/DebugRelease.xcconfig: Added.
     28        * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Added.
     29        * TestWebKitAPI/ForwardingHeaders: Added.
     30        * TestWebKitAPI/ForwardingHeaders/wtf: Added.
     31        * TestWebKitAPI/PlatformUtilities.h: Added.
     32        * TestWebKitAPI/PlatformWebView.h: Added.
     33        (TestWebKitAPI::PlatformWebView::platformView):
     34        * TestWebKitAPI/StringFunctions.h: Added.
     35        * TestWebKitAPI/Test.h: Added.
     36        (TestWebKitAPI::Test::~Test):
     37        (TestWebKitAPI::Test::name):
     38        (TestWebKitAPI::Test::Register::Register):
     39        (TestWebKitAPI::Test::Register::create):
     40        (TestWebKitAPI::Test::Test):
     41        * TestWebKitAPI/TestWebKitAPI.xcodeproj: Added.
     42        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added.
     43        * TestWebKitAPI/TestWebKitAPIPrefix.h: Added.
     44        * TestWebKitAPI/TestsController.cpp: Added.
     45        (TestWebKitAPI::TestsController::shared):
     46        (TestWebKitAPI::TestsController::TestsController):
     47        (TestWebKitAPI::TestsController::runTestNamed):
     48        (TestWebKitAPI::TestsController::testFailed):
     49        (TestWebKitAPI::TestsController::registerCreateTestFunction):
     50        * TestWebKitAPI/TestsController.h: Added.
     51        * TestWebKitAPI/mac: Added.
     52        * TestWebKitAPI/mac/PlatformUtilitiesMac.mm: Added.
     53        (TestWebKitAPI::Util::run):
     54        (TestWebKitAPI::Util::createURLForResource):
     55        * TestWebKitAPI/mac/PlatformWebViewMac.mm: Added.
     56        (TestWebKitAPI::PlatformWebView::PlatformWebView):
     57        (TestWebKitAPI::PlatformWebView::resizeTo):
     58        (TestWebKitAPI::PlatformWebView::~PlatformWebView):
     59        (TestWebKitAPI::PlatformWebView::page):
     60        (TestWebKitAPI::PlatformWebView::focus):
     61        * TestWebKitAPI/mac/main.mm: Added.
     62        Infrastructure.
     63
     64        * TestWebKitAPI/Tests: Added.
     65        * TestWebKitAPI/Tests/WTF: Added.
     66        * TestWebKitAPI/Tests/WTF/Vector1.cpp: Added.
     67        * TestWebKitAPI/Tests/WebKit2: Added.
     68        * TestWebKitAPI/Tests/WebKit2/BasicTest1.cpp: Added.
     69        (TestWebKitAPI::State::State):
     70        * TestWebKitAPI/Tests/WebKit2/basic-1.html: Added.
     71        Proof of concept tests.
     72
    1732010-10-01  Adam Roben  <aroben@apple.com>
    274
Note: See TracChangeset for help on using the changeset viewer.