Changeset 204364 in webkit


Ignore:
Timestamp:
Aug 10, 2016 5:09:41 PM (8 years ago)
Author:
Simon Fraser
Message:

[iOS WK2] Have WebKitTestRunnerApp.app use a UIViewController, and fix to avoid the status bar
https://bugs.webkit.org/show_bug.cgi?id=160757

Reviewed by Tim Horton.

When programmatically creating the test UIWindow, make a root UIViewController and parent
the WKWebView in its view. This makes the app more like a normal UIKit application.

Move the WKWebView down 20px to avoid the status bar.

Give the UIWindow a gray background so it's obvious where the window and view positioned.

Sorted the project file. Removed the link to UIKit which showed red, and wasn't necessary.

Remove duplicate references to Launch.storyboard.

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
  • WebKitTestRunner/WebKitTestRunnerApp/AppDelegate.h: Add license.
  • WebKitTestRunner/WebKitTestRunnerApp/AppDelegate.m: Add license.

(-[AppDelegate applicationWillResignActive:]): Deleted.
(-[AppDelegate applicationDidEnterBackground:]): Deleted.
(-[AppDelegate applicationWillEnterForeground:]): Deleted.
(-[AppDelegate applicationDidBecomeActive:]): Deleted.
(-[AppDelegate applicationWillTerminate:]): Deleted.

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::viewRectForWindowRect):
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::setWindowFrame):

Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r204363 r204364  
     12016-08-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [iOS WK2] Have WebKitTestRunnerApp.app use a UIViewController, and fix to avoid the status bar
     4        https://bugs.webkit.org/show_bug.cgi?id=160757
     5
     6        Reviewed by Tim Horton.
     7
     8        When programmatically creating the test UIWindow, make a root UIViewController and parent
     9        the WKWebView in its view. This makes the app more like a normal UIKit application.
     10       
     11        Move the WKWebView down 20px to avoid the status bar.
     12       
     13        Give the UIWindow a gray background so it's obvious where the window and view positioned.
     14
     15        Sorted the project file. Removed the link to UIKit which showed red, and wasn't necessary.
     16       
     17        Remove duplicate references to Launch.storyboard.
     18
     19        * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
     20        * WebKitTestRunner/WebKitTestRunnerApp/AppDelegate.h: Add license.
     21        * WebKitTestRunner/WebKitTestRunnerApp/AppDelegate.m: Add license.
     22        (-[AppDelegate applicationWillResignActive:]): Deleted.
     23        (-[AppDelegate applicationDidEnterBackground:]): Deleted.
     24        (-[AppDelegate applicationWillEnterForeground:]): Deleted.
     25        (-[AppDelegate applicationDidBecomeActive:]): Deleted.
     26        (-[AppDelegate applicationWillTerminate:]): Deleted.
     27        * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
     28        (WTR::viewRectForWindowRect):
     29        (WTR::PlatformWebView::PlatformWebView):
     30        (WTR::PlatformWebView::setWindowFrame):
     31
    1322016-08-10  Simon Fraser  <simon.fraser@apple.com>
    233
  • trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj

    r203209 r204364  
    3434
    3535/* Begin PBXBuildFile section */
     36                0F4B08731D5BE88D00EC1B78 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F4B08721D5BE88D00EC1B78 /* Launch.storyboard */; };
    3637                0F5169CC1445222D00E0A9D7 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F5169CA1445222D00E0A9D7 /* WebKit.framework */; };
    3738                0F622CE91BBB3A1A00838AD3 /* TestOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F622CE81BBB3A1A00838AD3 /* TestOptions.cpp */; };
     
    4243                0F87B6131BACAD82004EC572 /* UIScriptControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B6111BACAD6F004EC572 /* UIScriptControllerMac.mm */; };
    4344                0F87B6171BACC4C0004EC572 /* TestRunnerWKWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B6151BACC4B9004EC572 /* TestRunnerWKWebView.mm */; };
    44                 0F87B6191BACC558004EC572 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F87B6181BACC558004EC572 /* Launch.storyboard */; };
    4545                0F87B61E1BACDA93004EC572 /* UIScriptContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B61A1BACDA93004EC572 /* UIScriptContext.cpp */; };
    4646                0F87B6201BACDA93004EC572 /* UIScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B61C1BACDA93004EC572 /* UIScriptController.cpp */; };
     
    188188/* Begin PBXFileReference section */
    189189                0F2109C7189C650D00F879A3 /* BaseTarget.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = BaseTarget.xcconfig; sourceTree = "<group>"; };
     190                0F4B08721D5BE88D00EC1B78 /* Launch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Launch.storyboard; path = ios/Launch.storyboard; sourceTree = SOURCE_ROOT; };
    190191                0F5169CA1445222D00E0A9D7 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
    191192                0F622CE81BBB3A1A00838AD3 /* TestOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestOptions.cpp; sourceTree = "<group>"; };
     
    194195                0F73B5571BA7929E004B3EF4 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
    195196                0F73B55B1BA89042004B3EF4 /* UIScriptControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIScriptControllerIOS.mm; sourceTree = "<group>"; };
    196                 0F831AE71BAB72D000F96CD8 /* Launch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Launch.storyboard; sourceTree = "<group>"; };
    197197                0F87B6111BACAD6F004EC572 /* UIScriptControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIScriptControllerMac.mm; sourceTree = "<group>"; };
    198198                0F87B6141BACC4B9004EC572 /* TestRunnerWKWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRunnerWKWebView.h; path = cocoa/TestRunnerWKWebView.h; sourceTree = "<group>"; };
    199199                0F87B6151BACC4B9004EC572 /* TestRunnerWKWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestRunnerWKWebView.mm; path = cocoa/TestRunnerWKWebView.mm; sourceTree = "<group>"; };
    200                 0F87B6181BACC558004EC572 /* Launch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Launch.storyboard; sourceTree = "<group>"; };
    201200                0F87B61A1BACDA93004EC572 /* UIScriptContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptContext.cpp; path = UIScriptContext/UIScriptContext.cpp; sourceTree = "<group>"; };
    202201                0F87B61B1BACDA93004EC572 /* UIScriptContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptContext.h; path = UIScriptContext/UIScriptContext.h; sourceTree = "<group>"; };
     
    248247                2EE52CE21890A9A80010ED21 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
    249248                2EE52CE41890A9A80010ED21 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
    250                 2EE52CE61890A9A80010ED21 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
    251249                2EE52CEA1890A9A80010ED21 /* WebKitTestRunnerApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "WebKitTestRunnerApp-Info.plist"; path = "WebKitTestRunnerApp/WebKitTestRunnerApp-Info.plist"; sourceTree = "<group>"; };
    252250                2EE52CEC1890A9A80010ED21 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
     
    256254                2EE52D141890A9FB0010ED21 /* TestControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestControllerIOS.mm; sourceTree = "<group>"; };
    257255                2EE52D151890A9FB0010ED21 /* WebArchiveDumpSupportIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebArchiveDumpSupportIOS.mm; sourceTree = "<group>"; };
    258                 2EE52D161890A9FB0010ED21 /* mainIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = mainIOS.mm; sourceTree = "<group>"; };
     256                2EE52D161890A9FB0010ED21 /* mainIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = mainIOS.mm; path = ../ios/mainIOS.mm; sourceTree = "<group>"; };
    259257                3110BE0F15BA011400D216AC /* WebNotificationProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationProvider.h; sourceTree = "<group>"; };
    260258                3164C8EF15D1ADA100EF1FE0 /* WebNotificationProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationProvider.cpp; sourceTree = "<group>"; };
     
    414412                        isa = PBXGroup;
    415413                        children = (
     414                                BC9192021333E4CD003011DC /* cg */,
    416415                                0FEB90A11905BC4A000FDBF3 /* cocoa */,
    417416                                2EE52D121890A9FB0010ED21 /* ios */,
    418                                 841CC00D181185BF0042E9B6 /* Options.cpp */,
    419                                 841CC00E181185BF0042E9B6 /* Options.h */,
    420                                 BC9192021333E4CD003011DC /* cg */,
    421417                                BC7933FE118F7C74005EA8E2 /* mac */,
     418                                0F73B5471BA782FE004B3EF4 /* UIScriptContext */,
    422419                                5322FB4113FDA0CD0041ABCC /* CyclicRedundancyCheck.cpp */,
    423420                                5322FB4213FDA0CD0041ABCC /* CyclicRedundancyCheck.h */,
     
    425422                                26D758E5160BECDC00268472 /* GeolocationProviderMock.cpp */,
    426423                                26D758E6160BECDD00268472 /* GeolocationProviderMock.h */,
     424                                841CC00D181185BF0042E9B6 /* Options.cpp */,
     425                                841CC00E181185BF0042E9B6 /* Options.h */,
    427426                                5322FB4413FDA0EA0041ABCC /* PixelDumpSupport.cpp */,
    428427                                5322FB4513FDA0EA0041ABCC /* PixelDumpSupport.h */,
     
    439438                                4429FC5E1627089600F66D8B /* WorkQueueManager.cpp */,
    440439                                4429FC611627089600F66D8B /* WorkQueueManager.h */,
    441                                 0F73B5471BA782FE004B3EF4 /* UIScriptContext */,
    442440                        );
    443441                        name = TestRunner;
     
    460458                        isa = PBXGroup;
    461459                        children = (
     460                                0F73B54B1BA78350004B3EF4 /* Bindings */,
    462461                                0F73B54E1BA78954004B3EF4 /* Derived Sources */,
    463                                 0F73B54B1BA78350004B3EF4 /* Bindings */,
    464462                                0F87B61A1BACDA93004EC572 /* UIScriptContext.cpp */,
    465463                                0F87B61B1BACDA93004EC572 /* UIScriptContext.h */,
     
    512510                        children = (
    513511                                8DD76FA10486AA7600D96B5E /* WebKitTestRunner */,
     512                                A18510271B9ADE4800744AEB /* libWebKitTestRunner.a */,
     513                                2EE52CE01890A9A80010ED21 /* WebKitTestRunnerApp.app */,
    514514                                BC25186211D15D54002EBC01 /* WebKitTestRunnerInjectedBundle.bundle */,
    515                                 2EE52CE01890A9A80010ED21 /* WebKitTestRunnerApp.app */,
    516                                 A18510271B9ADE4800744AEB /* libWebKitTestRunner.a */,
    517515                        );
    518516                        name = Products;
     
    553551                        isa = PBXGroup;
    554552                        children = (
     553                                2EE52CE41890A9A80010ED21 /* CoreGraphics.framework */,
     554                                2EE52CE21890A9A80010ED21 /* Foundation.framework */,
    555555                                0F73B5571BA7929E004B3EF4 /* JavaScriptCore.framework */,
    556                                 2EE52CE21890A9A80010ED21 /* Foundation.framework */,
    557                                 2EE52CE41890A9A80010ED21 /* CoreGraphics.framework */,
    558                                 2EE52CE61890A9A80010ED21 /* UIKit.framework */,
    559556                        );
    560557                        name = Frameworks;
     
    566563                                2EE52CF11890A9A80010ED21 /* AppDelegate.h */,
    567564                                2EE52CF21890A9A80010ED21 /* AppDelegate.m */,
     565                                2EE52CEB1890A9A80010ED21 /* InfoPlist.strings */,
     566                                0F4B08721D5BE88D00EC1B78 /* Launch.storyboard */,
     567                                2EE52D161890A9FB0010ED21 /* mainIOS.mm */,
    568568                        );
    569569                        path = WebKitTestRunnerApp;
     
    573573                        isa = PBXGroup;
    574574                        children = (
    575                                 0F87B6181BACC558004EC572 /* Launch.storyboard */,
    576                                 2EE52CEB1890A9A80010ED21 /* InfoPlist.strings */,
    577                                 0FEBF85B1BB62A370028722D /* IOKitSPI.h */,
    578                                 0FEBF85C1BB62D460028722D /* UIKitSPI.h */,
    579575                                0FEBF8581BB61DF20028722D /* HIDEventGenerator.h */,
    580576                                0FEBF8591BB61DF20028722D /* HIDEventGenerator.mm */,
     577                                0FEBF85B1BB62A370028722D /* IOKitSPI.h */,
    581578                                2EE52D131890A9FB0010ED21 /* PlatformWebViewIOS.mm */,
    582579                                2EE52D141890A9FB0010ED21 /* TestControllerIOS.mm */,
     580                                0FEBF85C1BB62D460028722D /* UIKitSPI.h */,
    583581                                0F73B55B1BA89042004B3EF4 /* UIScriptControllerIOS.mm */,
    584582                                2EE52D151890A9FB0010ED21 /* WebArchiveDumpSupportIOS.mm */,
    585                                 2EE52D161890A9FB0010ED21 /* mainIOS.mm */,
    586                                 0F831AE71BAB72D000F96CD8 /* Launch.storyboard */,
    587583                        );
    588584                        path = ios;
     
    605601                                29A8FCE4145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm */,
    606602                                29210EAB144CACB200835BB5 /* AccessibilityUIElementMac.mm */,
     603                                BC8DAD771316D7B900EC96FC /* InjectedBundleMac.mm */,
    607604                                5C45C30E17398E290079714E /* WebArchiveDumpSupportMac.mm */,
    608                                 BC8DAD771316D7B900EC96FC /* InjectedBundleMac.mm */,
    609605                        );
    610606                        path = mac;
     
    631627                        isa = PBXGroup;
    632628                        children = (
    633                                 2E63ED741891ACE9002A7AFC /* ios */,
     629                                BC952C0A11F3B939003398B4 /* Bindings */,
     630                                5C45C31017398E370079714E /* cf */,
    634631                                0FEB909D1905A75D000FDBF3 /* cocoa */,
    635                                 5C45C31017398E370079714E /* cf */,
    636                                 BC952C0A11F3B939003398B4 /* Bindings */,
    637632                                BC14E4E0120E02F900826C0C /* Controllers */,
    638633                                BC952D3A11F3BF1F003398B4 /* Derived Sources */,
     634                                2E63ED741891ACE9002A7AFC /* ios */,
    639635                                65EB859E11EC67CC0034D300 /* mac */,
    640636                                65EB859D11EC67CC0034D300 /* ActivateFonts.h */,
     
    652648                        children = (
    653649                                6510A77711EC643800410867 /* AHEM____.TTF */,
     650                                1CA211C71BCA107300B2101F /* FontWithFeatures.otf */,
     651                                1CA211C81BCA107300B2101F /* FontWithFeatures.ttf */,
    654652                                BC25186311D15D54002EBC01 /* InjectedBundle-Info.plist */,
    655653                                6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */,
     
    662660                                6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */,
    663661                                6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */,
    664                                 1CA211C71BCA107300B2101F /* FontWithFeatures.otf */,
    665                                 1CA211C81BCA107300B2101F /* FontWithFeatures.ttf */,
    666662                        );
    667663                        name = Resources;
     
    895891                        files = (
    896892                                2EE52CED1890A9A80010ED21 /* InfoPlist.strings in Resources */,
    897                                 0F87B6191BACC558004EC572 /* Launch.storyboard in Resources */,
     893                                0F4B08731D5BE88D00EC1B78 /* Launch.storyboard in Resources */,
    898894                        );
    899895                        runOnlyForDeploymentPostprocessing = 0;
     
    904900                        files = (
    905901                                6510A78211EC643800410867 /* AHEM____.TTF in Resources */,
     902                                1CA211C91BCA107300B2101F /* FontWithFeatures.otf in Resources */,
     903                                1CA211CA1BCA107300B2101F /* FontWithFeatures.ttf in Resources */,
    906904                                6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */,
    907                                 1CA211CA1BCA107300B2101F /* FontWithFeatures.ttf in Resources */,
    908905                                6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */,
    909906                                6510A78611EC643800410867 /* WebKitWeightWatcher300.ttf in Resources */,
     
    913910                                6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */,
    914911                                6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */,
    915                                 1CA211C91BCA107300B2101F /* FontWithFeatures.otf in Resources */,
    916912                                6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */,
    917913                        );
     
    942938                        buildActionMask = 2147483647;
    943939                        files = (
     940                                2E63ED9C1891ADC7002A7AFC /* AppDelegate.m in Sources */,
    944941                                2E749BF21891EBFA007FC175 /* EventSenderProxyIOS.mm in Sources */,
     942                                0FEBF85A1BB61DF20028722D /* HIDEventGenerator.mm in Sources */,
    945943                                2E63ED941891ADAD002A7AFC /* mainIOS.mm in Sources */,
     944                                2E63ED911891ADAD002A7AFC /* PlatformWebViewIOS.mm in Sources */,
    946945                                2E63ED921891ADAD002A7AFC /* TestControllerIOS.mm in Sources */,
    947                                 2E63ED9C1891ADC7002A7AFC /* AppDelegate.m in Sources */,
    948                                 0FEBF85A1BB61DF20028722D /* HIDEventGenerator.mm in Sources */,
    949                                 2E63ED911891ADAD002A7AFC /* PlatformWebViewIOS.mm in Sources */,
    950946                        );
    951947                        runOnlyForDeploymentPostprocessing = 0;
     
    955951                        buildActionMask = 2147483647;
    956952                        files = (
    957                                 E1C642C317CBCC7300D66A3C /* PoseAsClass.mm in Sources */,
    958                                 E132AA3D17CE776F00611DF0 /* WebKitTestRunnerEvent.mm in Sources */,
    959953                                5670B8281386FCA5002EB355 /* EventSenderProxy.mm in Sources */,
    960954                                BC793400118F7C84005EA8E2 /* main.mm in Sources */,
     955                                BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */,
     956                                E1C642C317CBCC7300D66A3C /* PoseAsClass.mm in Sources */,
     957                                BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */,
     958                                0F87B6131BACAD82004EC572 /* UIScriptControllerMac.mm in Sources */,
     959                                E132AA3A17CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.mm in Sources */,
     960                                E132AA3D17CE776F00611DF0 /* WebKitTestRunnerEvent.mm in Sources */,
    961961                                E1C642C617CBCD4C00D66A3C /* WebKitTestRunnerPasteboard.mm in Sources */,
    962                                 0F87B6131BACAD82004EC572 /* UIScriptControllerMac.mm in Sources */,
    963                                 BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */,
    964                                 BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */,
    965                                 E132AA3A17CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.mm in Sources */,
    966962                        );
    967963                        runOnlyForDeploymentPostprocessing = 0;
     
    971967                        buildActionMask = 2147483647;
    972968                        files = (
     969                                A185103A1B9AE0DA00744AEB /* CrashReporterInfo.mm in Sources */,
     970                                A185103E1B9AE12200744AEB /* CyclicRedundancyCheck.cpp in Sources */,
     971                                A185103F1B9AE12900744AEB /* GeolocationProviderMock.cpp in Sources */,
     972                                0F73B5511BA78968004B3EF4 /* JSUIScriptController.cpp in Sources */,
     973                                0F73B55A1BA792FF004B3EF4 /* JSWrapper.cpp in Sources */,
     974                                A185103C1B9AE0FE00744AEB /* Options.cpp in Sources */,
     975                                A18510401B9AE13100744AEB /* PixelDumpSupport.cpp in Sources */,
     976                                A18510411B9AE13800744AEB /* TestController.cpp in Sources */,
     977                                A185103B1B9AE0E200744AEB /* TestControllerCocoa.mm in Sources */,
     978                                A18510421B9AE13E00744AEB /* TestInvocation.cpp in Sources */,
     979                                A185103D1B9AE10600744AEB /* TestInvocationCG.cpp in Sources */,
    973980                                0F622CE91BBB3A1A00838AD3 /* TestOptions.cpp in Sources */,
    974                                 0F73B55A1BA792FF004B3EF4 /* JSWrapper.cpp in Sources */,
     981                                0F87B6171BACC4C0004EC572 /* TestRunnerWKWebView.mm in Sources */,
     982                                0F87B61E1BACDA93004EC572 /* UIScriptContext.cpp in Sources */,
     983                                0F87B6201BACDA93004EC572 /* UIScriptController.cpp in Sources */,
     984                                0F73B55C1BA89042004B3EF4 /* UIScriptControllerIOS.mm in Sources */,
     985                                A18510431B9AE14500744AEB /* WebNotificationProvider.cpp in Sources */,
    975986                                A18510441B9AE14A00744AEB /* WorkQueueManager.cpp in Sources */,
    976                                 A185103F1B9AE12900744AEB /* GeolocationProviderMock.cpp in Sources */,
    977                                 0F73B55C1BA89042004B3EF4 /* UIScriptControllerIOS.mm in Sources */,
    978                                 A185103C1B9AE0FE00744AEB /* Options.cpp in Sources */,
    979                                 A18510431B9AE14500744AEB /* WebNotificationProvider.cpp in Sources */,
    980                                 A18510411B9AE13800744AEB /* TestController.cpp in Sources */,
    981                                 0F87B6201BACDA93004EC572 /* UIScriptController.cpp in Sources */,
    982                                 A18510421B9AE13E00744AEB /* TestInvocation.cpp in Sources */,
    983                                 A18510401B9AE13100744AEB /* PixelDumpSupport.cpp in Sources */,
    984                                 A185103D1B9AE10600744AEB /* TestInvocationCG.cpp in Sources */,
    985                                 A185103A1B9AE0DA00744AEB /* CrashReporterInfo.mm in Sources */,
    986                                 0F73B5511BA78968004B3EF4 /* JSUIScriptController.cpp in Sources */,
    987                                 0F87B61E1BACDA93004EC572 /* UIScriptContext.cpp in Sources */,
    988                                 A185103E1B9AE12200744AEB /* CyclicRedundancyCheck.cpp in Sources */,
    989                                 0F87B6171BACC4C0004EC572 /* TestRunnerWKWebView.mm in Sources */,
    990                                 A185103B1B9AE0E200744AEB /* TestControllerCocoa.mm in Sources */,
    991987                        );
    992988                        runOnlyForDeploymentPostprocessing = 0;
     
    996992                        buildActionMask = 2147483647;
    997993                        files = (
    998                                 2E63EDA61891BDC0002A7AFC /* TestRunner.cpp in Sources */,
    999                                 2E63EDA11891B291002A7AFC /* AccessibilityUIElementIOS.mm in Sources */,
    1000                                 2E63ED9E1891AEC1002A7AFC /* WebArchiveDumpSupportIOS.mm in Sources */,
    1001                                 2E63ED8A1891AD7E002A7AFC /* AccessibilityControllerIOS.mm in Sources */,
    1002                                 2E63ED8B1891AD7E002A7AFC /* AccessibilityTextMarkerIOS.mm in Sources */,
    1003                                 2E63ED8E1891AD7E002A7AFC /* EventSenderProxyIOS.mm in Sources */,
    1004                                 2E63ED8F1891AD7E002A7AFC /* InjectedBundleIOS.mm in Sources */,
    1005994                                29210EDA144CC3EA00835BB6 /* AccessibilityCommonMac.mm in Sources */,
    1006995                                29210EB0144CACBD00835BB5 /* AccessibilityController.cpp in Sources */,
     996                                2E63ED8A1891AD7E002A7AFC /* AccessibilityControllerIOS.mm in Sources */,
    1007997                                8034C6621487636400AC32E9 /* AccessibilityControllerMac.mm in Sources */,
    1008998                                8097338A14874A5A008156D9 /* AccessibilityNotificationHandler.mm in Sources */,
    1009                                 0FEB90A51905C016000FDBF3 /* CrashReporterInfo.mm in Sources */,
    1010999                                29210EB4144CACD500835BB5 /* AccessibilityTextMarker.cpp in Sources */,
     1000                                2E63ED8B1891AD7E002A7AFC /* AccessibilityTextMarkerIOS.mm in Sources */,
    10111001                                29210EB5144CACD500835BB5 /* AccessibilityTextMarkerMac.mm in Sources */,
    10121002                                29A8FCE2145F037B009045A6 /* AccessibilityTextMarkerRange.cpp in Sources */,
    10131003                                29A8FCE5145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm in Sources */,
    10141004                                29210EAE144CACB700835BB5 /* AccessibilityUIElement.cpp in Sources */,
     1005                                2E63EDA11891B291002A7AFC /* AccessibilityUIElementIOS.mm in Sources */,
    10151006                                29210EDA144CC3EA00835BB5 /* AccessibilityUIElementMac.mm in Sources */,
    10161007                                65EB85A011EC67CC0034D300 /* ActivateFontsCocoa.mm in Sources */,
     1008                                0FEB90A51905C016000FDBF3 /* CrashReporterInfo.mm in Sources */,
     1009                                2E63ED8E1891AD7E002A7AFC /* EventSenderProxyIOS.mm in Sources */,
    10171010                                BC8FD8CA120E527F00F3E71A /* EventSendingController.cpp in Sources */,
    10181011                                BC14E4DB120E02D000826C0C /* GCController.cpp in Sources */,
    10191012                                BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */,
     1013                                2E63ED8F1891AD7E002A7AFC /* InjectedBundleIOS.mm in Sources */,
    10201014                                BC8DAD7B1316D91000EC96FC /* InjectedBundleMac.mm in Sources */,
    10211015                                BC251A3E11D16831002EBC01 /* InjectedBundleMain.cpp in Sources */,
    10221016                                BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */,
     1017                                0FEB90A01905A834000FDBF3 /* InjectedBundlePageCocoa.mm in Sources */,
    10231018                                29210EDB144CD47900835BB5 /* JSAccessibilityController.cpp in Sources */,
    10241019                                29A8FCCB145EF02E009045A6 /* JSAccessibilityTextMarker.cpp in Sources */,
    1025                                 0FEB90A01905A834000FDBF3 /* InjectedBundlePageCocoa.mm in Sources */,
    10261020                                29A8FCDD145F0337009045A6 /* JSAccessibilityTextMarkerRange.cpp in Sources */,
    10271021                                29210EE1144CDB2600835BB5 /* JSAccessibilityUIElement.cpp in Sources */,
     
    10311025                                5641E2D014335E95008307E5 /* JSTextInputController.cpp in Sources */,
    10321026                                BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */,
    1033                                 5C45C30F17398E290079714E /* WebArchiveDumpSupportMac.mm in Sources */,
    1034                                 5C45C31317398E480079714E /* WebArchiveDumpSupport.cpp in Sources */,
     1027                                2E63EDA61891BDC0002A7AFC /* TestRunner.cpp in Sources */,
    10351028                                C0CE720B1247C93300BC0EC4 /* TestRunnerMac.mm in Sources */,
    10361029                                5664A49A14326384008881BE /* TextInputController.cpp in Sources */,
     1030                                5C45C31317398E480079714E /* WebArchiveDumpSupport.cpp in Sources */,
     1031                                2E63ED9E1891AEC1002A7AFC /* WebArchiveDumpSupportIOS.mm in Sources */,
     1032                                5C45C30F17398E290079714E /* WebArchiveDumpSupportMac.mm in Sources */,
    10371033                        );
    10381034                        runOnlyForDeploymentPostprocessing = 0;
     
    10801076                        );
    10811077                        name = InfoPlist.strings;
    1082                         path = ../WebKitTestRunnerApp;
    10831078                        sourceTree = "<group>";
    10841079                };
  • trunk/Tools/WebKitTestRunner/WebKitTestRunnerApp/AppDelegate.h

    r162729 r204364  
    1 //
    2 //  AppDelegate.h
    3 //  WebKitTestRunnerApp
    4 //
    5 //  Created by David Farler on 1/22/14.
    6 //
    7 //
     1/*
     2 * Copyright (C) 2014 Apple Inc. All rights reserved.
     3 *
     4 * Redistribution and use in source and binary forms, with or without
     5 * modification, are permitted provided that the following conditions
     6 * are met:
     7 * 1. Redistributions of source code must retain the above copyright
     8 *    notice, this list of conditions and the following disclaimer.
     9 * 2. Redistributions in binary form must reproduce the above copyright
     10 *    notice, this list of conditions and the following disclaimer in the
     11 *    documentation and/or other materials provided with the distribution.
     12 *
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     23 * THE POSSIBILITY OF SUCH DAMAGE.
     24 */
    825
    926#import <UIKit/UIKit.h>
  • trunk/Tools/WebKitTestRunner/WebKitTestRunnerApp/AppDelegate.m

    r162729 r204364  
    1 //
    2 //  AppDelegate.m
    3 //  WebKitTestRunnerApp
    4 //
    5 //  Created by David Farler on 1/22/14.
    6 //
    7 //
     1/*
     2 * Copyright (C) 2014 Apple Inc. All rights reserved.
     3 *
     4 * Redistribution and use in source and binary forms, with or without
     5 * modification, are permitted provided that the following conditions
     6 * are met:
     7 * 1. Redistributions of source code must retain the above copyright
     8 *    notice, this list of conditions and the following disclaimer.
     9 * 2. Redistributions in binary form must reproduce the above copyright
     10 *    notice, this list of conditions and the following disclaimer in the
     11 *    documentation and/or other materials provided with the distribution.
     12 *
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     23 * THE POSSIBILITY OF SUCH DAMAGE.
     24 */
    825
    926#import "AppDelegate.h"
     
    1431{
    1532    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    16     // Override point for customization after application launch.
    1733    self.window.backgroundColor = [UIColor whiteColor];
    1834    [self.window makeKeyAndVisible];
     
    2036}
    2137
    22 - (void)applicationWillResignActive:(UIApplication *)application
    23 {
    24     // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    25     // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
    26 }
    27 
    28 - (void)applicationDidEnterBackground:(UIApplication *)application
    29 {
    30     // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    31     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
    32 }
    33 
    34 - (void)applicationWillEnterForeground:(UIApplication *)application
    35 {
    36     // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
    37 }
    38 
    39 - (void)applicationDidBecomeActive:(UIApplication *)application
    40 {
    41     // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    42 }
    43 
    44 - (void)applicationWillTerminate:(UIApplication *)application
    45 {
    46     // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
    47 }
    48 
    4938@end
  • trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm

    r202532 r204364  
    9999namespace WTR {
    100100
     101static CGRect viewRectForWindowRect(CGRect windowRect)
     102{
     103    CGFloat statusBarBottom = CGRectGetMaxY([[UIApplication sharedApplication] statusBarFrame]);
     104    return CGRectMake(windowRect.origin.x, windowRect.origin.y + statusBarBottom, windowRect.size.width, windowRect.size.height);
     105}
     106
    101107PlatformWebView::PlatformWebView(WKWebViewConfiguration* configuration, const TestOptions& options)
    102108    : m_windowIsKey(true)
     
    104110{
    105111    CGRect rect = CGRectMake(0, 0, TestController::viewWidth, TestController::viewHeight);
    106     m_view = [[TestRunnerWKWebView alloc] initWithFrame:rect configuration:configuration];
    107112
    108113    m_window = [[WebKitTestRunnerWindow alloc] initWithFrame:rect];
     114    m_window.backgroundColor = [UIColor lightGrayColor];
    109115    m_window.platformWebView = this;
    110116
    111     [m_window addSubview:m_view];
     117    UIViewController *viewController = [[UIViewController alloc] init];
     118    [m_window setRootViewController:viewController];
     119
     120    m_view = [[TestRunnerWKWebView alloc] initWithFrame:viewRectForWindowRect(rect) configuration:configuration];
     121
     122    [m_window.rootViewController.view addSubview:m_view];
    112123    [m_window makeKeyAndVisible];
    113124}
     
    161172{
    162173    [m_window setFrame:CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height)];
    163     [platformView() setFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
     174    [platformView() setFrame:viewRectForWindowRect(CGRectMake(0, 0, frame.size.width, frame.size.height))];
    164175}
    165176
Note: See TracChangeset for help on using the changeset viewer.