Changeset 205353 in webkit


Ignore:
Timestamp:
Sep 2, 2016 11:01:51 AM (8 years ago)
Author:
jer.noble@apple.com
Message:

Refactor MobileMiniBrowser into an application framework to allow external XCTesting
https://bugs.webkit.org/show_bug.cgi?id=161462

Reviewed by Eric Carlson.

XCTest targets need to be in the same project as the application which they're testing. To facilitate
having external projects with XCTest targets, move the application's implementation into a framework
that can be included with a bare-bones application shell for testing.

Simultaneously, add the ability to load files from within the new framework's bundle by using a
'bundle:/' URL scheme. Update the tests to use this new bundle URL and remove the dependency on
an external server for testing.

  • MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
  • MobileMiniBrowser/MobileMiniBrowser/Base.lproj/LaunchScreen.storyboard:
  • MobileMiniBrowser/MobileMiniBrowser/Info.plist:
  • MobileMiniBrowser/MobileMiniBrowser/main.m:
  • MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.h.
  • MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.m.

(-[AppDelegate application:didFinishLaunchingWithOptions:]): Manually instantiate the main view

controller from the framework's bundle.

  • MobileMiniBrowser/MobileMiniBrowserFramework/Assets.xcassets/AppIcon.appiconset/Contents.json: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json.
  • MobileMiniBrowser/MobileMiniBrowserFramework/Base.lproj/Main.storyboard: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/Base.lproj/Main.storyboard.
  • MobileMiniBrowser/MobileMiniBrowserFramework/Info.plist: Added.
  • MobileMiniBrowser/MobileMiniBrowserFramework/MobileMiniBrowser.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.h.
  • MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.h.
  • MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.m.
  • MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.h.
  • MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.m.

(+[NSURL bundleURLForFileURL:bundle:]): Add utility method.
(+[NSURL
fileURLForBundleURL:bundle:]): Ditto.
(-[WebViewController navigateTo:]): Support loading "bundle:/" URLs which are really just "file:" URLs

pointing to the framework's resources directory.

(-[WebViewController observeValueForKeyPath:ofObject:change:context:]): Ditto.

  • MobileMiniBrowser/MobileMiniBrowserUITests/MobileMiniBrowserUITests.m:

(-[MobileMiniBrowserUITests testBasicVideoPlayback]):

Location:
trunk/Tools
Files:
9 added
1 deleted
9 edited
2 copied
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r205351 r205353  
     12016-08-31  Jer Noble  <jer.noble@apple.com>
     2
     3        Refactor MobileMiniBrowser into an application framework to allow external XCTesting
     4        https://bugs.webkit.org/show_bug.cgi?id=161462
     5
     6        Reviewed by Eric Carlson.
     7
     8        XCTest targets need to be in the same project as the application which they're testing. To facilitate
     9        having external projects with XCTest targets, move the application's implementation into a framework
     10        that can be included with a bare-bones application shell for testing.
     11
     12        Simultaneously, add the ability to load files from within the new framework's bundle by using a
     13        'bundle:/' URL scheme. Update the tests to use this new bundle URL and remove the dependency on
     14        an external server for testing.
     15
     16        * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
     17        * MobileMiniBrowser/MobileMiniBrowser/Base.lproj/LaunchScreen.storyboard:
     18        * MobileMiniBrowser/MobileMiniBrowser/Info.plist:
     19        * MobileMiniBrowser/MobileMiniBrowser/main.m:
     20        * MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.h.
     21        * MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.m.
     22        (-[AppDelegate application:didFinishLaunchingWithOptions:]): Manually instantiate the main view
     23            controller from the framework's bundle.
     24        * MobileMiniBrowser/MobileMiniBrowserFramework/Assets.xcassets/AppIcon.appiconset/Contents.json: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json.
     25        * MobileMiniBrowser/MobileMiniBrowserFramework/Base.lproj/Main.storyboard: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/Base.lproj/Main.storyboard.
     26        * MobileMiniBrowser/MobileMiniBrowserFramework/Info.plist: Added.
     27        * MobileMiniBrowser/MobileMiniBrowserFramework/MobileMiniBrowser.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.h.
     28        * MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.h.
     29        * MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.m.
     30        * MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.h.
     31        * MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.m.
     32        (+[NSURL __bundleURLForFileURL:bundle:]): Add utility method.
     33        (+[NSURL __fileURLForBundleURL:bundle:]): Ditto.
     34        (-[WebViewController navigateTo:]): Support loading "bundle:/" URLs which are really just "file:" URLs
     35            pointing to the framework's resources directory.
     36        (-[WebViewController observeValueForKeyPath:ofObject:change:context:]): Ditto.
     37        * MobileMiniBrowser/MobileMiniBrowserUITests/MobileMiniBrowserUITests.m:
     38        (-[MobileMiniBrowserUITests testBasicVideoPlayback]):
     39
    1402016-09-02  Jonathan Bedard  <jbedard@apple.com>
    241
  • trunk/Tools/MobileMiniBrowser/Configurations/Base.xcconfig

    r205057 r205353  
    2424#include "../../../../Internal/Configurations/HaveInternalSDK.xcconfig"
    2525
    26 SDKROOT = iphoneos;
     26USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
     27USE_INTERNAL_SDK_Production = YES;
     28USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
     29USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
    2730
    28 TARGETED_DEVICE_FAMILY = 1,2;
     31CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
     32CLANG_CXX_LIBRARY = libc++;
     33CLANG_WARN_CXX0X_EXTENSIONS = NO;
     34HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include;
     35DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
     36PREBINDING = NO
     37GCC_C_LANGUAGE_STANDARD = gnu99
     38GCC_ENABLE_CPP_EXCEPTIONS = NO;
     39GCC_ENABLE_CPP_RTTI = NO;
     40GCC_PRECOMPILE_PREFIX_HEADER = YES
     41GCC_TREAT_WARNINGS_AS_ERRORS = YES
     42GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     43GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO
     44GCC_WARN_UNUSED_FUNCTION = YES
     45GCC_WARN_UNUSED_VARIABLE = YES
     46GCC_WARN_64_TO_32_BIT_CONVERSION[arch=arm64] = NO;
     47GCC_WARN_64_TO_32_BIT_CONVERSION[arch=x86_64] = NO;
     48WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -Wundef
    2949
    30 DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
     50SUPPORTED_PLATFORMS = iphoneos iphonesimulator;
     51SDKROOT = iphonesimulator;
    3152
    32 GCC_C_LANGUAGE_STANDARD = gnu99;
     53OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
     54OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
     55OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
    3356
    34 GCC_PREPROCESSOR_DEFINITIONS = $(ENGINEERING_BUILD_DEFINES) $(inherited);
    35 
    36 GCC_TREAT_WARNINGS_AS_ERRORS = YES;
    37 
    38 CLANG_WARN_BOOL_CONVERSION = YES;
    39 CLANG_WARN_CONSTANT_CONVERSION = YES;
    40 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
    41 CLANG_WARN_EMPTY_BODY = YES;
    42 CLANG_WARN_ENUM_CONVERSION = YES;
    43 CLANG_WARN_INT_CONVERSION = YES;
    44 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
    45 CLANG_ENABLE_OBJC_ARC = YES;
    46 
    47 GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
    48 GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
    49 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
    50 GCC_WARN_ABOUT_RETURN_TYPE = YES;
    51 GCC_WARN_UNDECLARED_SELECTOR = YES;
    52 GCC_WARN_UNINITIALIZED_AUTOS = YES;
    53 GCC_WARN_UNUSED_FUNCTION = YES;
    54 GCC_WARN_UNUSED_VARIABLE = YES;
    55 
    56 WARNING_CFLAGS = -Wall -Wundef -Wformat-security -Wimplicit-fallthrough -Wmissing-format-attribute -Wpointer-arith -Wexit-time-destructors -Wglobal-constructors -Woverriding-method-mismatch -Wmethod-signatures;
    57 
    58 OTHER_CFLAGS = -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(inherited);
    59 
    60 ALWAYS_SEARCH_USER_PATHS = NO;
     57CODE_SIGN_IDENTITY = -;
  • trunk/Tools/MobileMiniBrowser/Configurations/DebugRelease.xcconfig

    r205057 r205353  
    2929
    3030GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
    31 
    32 SDKROOT = $(SDKROOT_$(PLATFORM_NAME));
    33 SDKROOT_iphoneos = $(SDKROOT);
    34 SDKROOT_iphonesimulator = $(SDKROOT);
  • trunk/Tools/MobileMiniBrowser/Configurations/MobileMiniBrowser.xcconfig

    r205057 r205353  
    2323
    2424PRODUCT_NAME = MiniBrowser
    25 EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj

    r205311 r205353  
    99/* Begin PBXBuildFile section */
    1010                CD1DAF971D709E3600017CF0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAF961D709E3600017CF0 /* main.m */; };
    11                 CD1DAF9A1D709E3600017CF0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAF991D709E3600017CF0 /* AppDelegate.m */; };
    12                 CD1DAFA01D709E3600017CF0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAF9E1D709E3600017CF0 /* Main.storyboard */; };
    13                 CD1DAFA21D709E3600017CF0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAFA11D709E3600017CF0 /* Assets.xcassets */; };
    1411                CD1DAFA51D709E3600017CF0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAFA31D709E3600017CF0 /* LaunchScreen.storyboard */; };
    1512                CD1DAFB01D709E3600017CF0 /* MobileMiniBrowserUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFAF1D709E3600017CF0 /* MobileMiniBrowserUITests.m */; };
    16                 CD1DAFBE1D709EF200017CF0 /* TabViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFBB1D709EF200017CF0 /* TabViewController.m */; };
    17                 CD1DAFBF1D709EF200017CF0 /* WebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFBD1D709EF200017CF0 /* WebViewController.m */; };
    1813                CD1DAFC21D70E12D00017CF0 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD1DAFC11D70E12D00017CF0 /* WebKit.framework */; };
     14                CD498B421D76348000681FA7 /* MobileMiniBrowser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */; };
     15                CD498B431D76348000681FA7 /* MobileMiniBrowser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
     16                CD498B4A1D763D4800681FA7 /* MobileMiniBrowser.h in Headers */ = {isa = PBXBuildFile; fileRef = CD498B481D7634C700681FA7 /* MobileMiniBrowser.h */; settings = {ATTRIBUTES = (Public, ); }; };
     17                CD498B4B1D763D7100681FA7 /* TabViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFBB1D709EF200017CF0 /* TabViewController.m */; };
     18                CD498B4C1D763D7100681FA7 /* WebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFBD1D709EF200017CF0 /* WebViewController.m */; };
     19                CD498B4D1D763D7100681FA7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAF991D709E3600017CF0 /* AppDelegate.m */; };
     20                CD498B4E1D763D7600681FA7 /* TabViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = CD1DAFBA1D709EF200017CF0 /* TabViewController.h */; };
     21                CD498B4F1D763D7600681FA7 /* WebViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = CD1DAFBC1D709EF200017CF0 /* WebViewController.h */; };
     22                CD498B501D763D7600681FA7 /* AppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = CD1DAF981D709E3600017CF0 /* AppDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
     23                CD498B511D763D7F00681FA7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAF9E1D709E3600017CF0 /* Main.storyboard */; };
     24                CD498B521D763D8800681FA7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAFA11D709E3600017CF0 /* Assets.xcassets */; };
     25                CD498B531D763D9300681FA7 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = CD498B471D7634C700681FA7 /* Info.plist */; };
     26                CD4DEEE51D78C6FF00625986 /* Base.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CD4DEEE21D78C6FF00625986 /* Base.xcconfig */; };
     27                CD4DEEE61D78C6FF00625986 /* DebugRelease.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */; };
     28                CD4DEEE71D78C6FF00625986 /* MobileMiniBrowser.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */; };
     29                CDA985191D76483400EBC399 /* test.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = CDA985151D76477900EBC399 /* test.mp4 */; };
     30                CDA9851A1D76483400EBC399 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = CDA985131D76474100EBC399 /* index.html */; };
     31                CDA9851B1D76483400EBC399 /* looping.html in Resources */ = {isa = PBXBuildFile; fileRef = CDA985171D7647CD00EBC399 /* looping.html */; };
    1932/* End PBXBuildFile section */
    2033
     
    2740                        remoteInfo = MobileMiniBrowser;
    2841                };
     42                CD498B401D76348000681FA7 /* PBXContainerItemProxy */ = {
     43                        isa = PBXContainerItemProxy;
     44                        containerPortal = CD1DAF8A1D709E3600017CF0 /* Project object */;
     45                        proxyType = 1;
     46                        remoteGlobalIDString = CD498B3A1D76348000681FA7;
     47                        remoteInfo = MobileMiniBrowser;
     48                };
    2949/* End PBXContainerItemProxy section */
     50
     51/* Begin PBXCopyFilesBuildPhase section */
     52                CD498B231D76341700681FA7 /* Embed Frameworks */ = {
     53                        isa = PBXCopyFilesBuildPhase;
     54                        buildActionMask = 2147483647;
     55                        dstPath = "";
     56                        dstSubfolderSpec = 10;
     57                        files = (
     58                                CD498B431D76348000681FA7 /* MobileMiniBrowser.framework in Embed Frameworks */,
     59                        );
     60                        name = "Embed Frameworks";
     61                        runOnlyForDeploymentPostprocessing = 0;
     62                };
     63/* End PBXCopyFilesBuildPhase section */
    3064
    3165/* Begin PBXFileReference section */
     
    4680                CD1DAFBD1D709EF200017CF0 /* WebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewController.m; sourceTree = "<group>"; };
    4781                CD1DAFC11D70E12D00017CF0 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = "../../WebKitBuild/Debug-iphonesimulator/WebKit.framework"; sourceTree = "<group>"; };
     82                CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MobileMiniBrowser.framework; sourceTree = BUILT_PRODUCTS_DIR; };
     83                CD498B471D7634C700681FA7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
     84                CD498B481D7634C700681FA7 /* MobileMiniBrowser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MobileMiniBrowser.h; sourceTree = "<group>"; };
     85                CD4DEEE21D78C6FF00625986 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Base.xcconfig; path = Configurations/Base.xcconfig; sourceTree = "<group>"; };
     86                CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = DebugRelease.xcconfig; path = Configurations/DebugRelease.xcconfig; sourceTree = "<group>"; };
     87                CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = MobileMiniBrowser.xcconfig; path = Configurations/MobileMiniBrowser.xcconfig; sourceTree = "<group>"; };
     88                CDA985131D76474100EBC399 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = index.html; path = Resources/index.html; sourceTree = "<group>"; };
     89                CDA985151D76477900EBC399 /* test.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; name = test.mp4; path = Resources/test.mp4; sourceTree = "<group>"; };
     90                CDA985171D7647CD00EBC399 /* looping.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = looping.html; path = Resources/looping.html; sourceTree = "<group>"; };
    4891/* End PBXFileReference section */
    4992
     
    5396                        buildActionMask = 2147483647;
    5497                        files = (
     98                                CD498B421D76348000681FA7 /* MobileMiniBrowser.framework in Frameworks */,
    5599                                CD1DAFC21D70E12D00017CF0 /* WebKit.framework in Frameworks */,
    56100                        );
     
    64108                        runOnlyForDeploymentPostprocessing = 0;
    65109                };
     110                CD498B371D76348000681FA7 /* Frameworks */ = {
     111                        isa = PBXFrameworksBuildPhase;
     112                        buildActionMask = 2147483647;
     113                        files = (
     114                        );
     115                        runOnlyForDeploymentPostprocessing = 0;
     116                };
    66117/* End PBXFrameworksBuildPhase section */
    67118
     
    70121                        isa = PBXGroup;
    71122                        children = (
    72                                 CD1DAF941D709E3600017CF0 /* MobileMiniBrowser */,
     123                                CD4DEEE11D78C6F400625986 /* Configurations */,
     124                                CD1DAF941D709E3600017CF0 /* MobileMiniBrowser App */,
     125                                CD498B3C1D76348000681FA7 /* MobileMiniBrowser Framework */,
    73126                                CD1DAFAE1D709E3600017CF0 /* MobileMiniBrowserUITests */,
    74127                                CD1DAF931D709E3600017CF0 /* Products */,
     
    82135                                CD1DAF921D709E3600017CF0 /* MobileMiniBrowser.app */,
    83136                                CD1DAFAB1D709E3600017CF0 /* MobileMiniBrowserUITests.xctest */,
     137                                CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */,
    84138                        );
    85139                        name = Products;
    86140                        sourceTree = "<group>";
    87141                };
    88                 CD1DAF941D709E3600017CF0 /* MobileMiniBrowser */ = {
    89                         isa = PBXGroup;
    90                         children = (
     142                CD1DAF941D709E3600017CF0 /* MobileMiniBrowser App */ = {
     143                        isa = PBXGroup;
     144                        children = (
     145                                CD1DAFA61D709E3600017CF0 /* Info.plist */,
     146                                CD1DAFA31D709E3600017CF0 /* LaunchScreen.storyboard */,
     147                                CD1DAF961D709E3600017CF0 /* main.m */,
     148                        );
     149                        name = "MobileMiniBrowser App";
     150                        path = MobileMiniBrowser;
     151                        sourceTree = "<group>";
     152                };
     153                CD1DAFAE1D709E3600017CF0 /* MobileMiniBrowserUITests */ = {
     154                        isa = PBXGroup;
     155                        children = (
     156                                CD1DAFAF1D709E3600017CF0 /* MobileMiniBrowserUITests.m */,
     157                                CD1DAFB11D709E3600017CF0 /* Info.plist */,
     158                        );
     159                        path = MobileMiniBrowserUITests;
     160                        sourceTree = "<group>";
     161                };
     162                CD1DAFC01D70E12D00017CF0 /* Frameworks */ = {
     163                        isa = PBXGroup;
     164                        children = (
     165                                CD1DAFC11D70E12D00017CF0 /* WebKit.framework */,
     166                        );
     167                        name = Frameworks;
     168                        sourceTree = "<group>";
     169                };
     170                CD498B3C1D76348000681FA7 /* MobileMiniBrowser Framework */ = {
     171                        isa = PBXGroup;
     172                        children = (
     173                                CDA985121D76471700EBC399 /* Resources */,
     174                                CD1DAF981D709E3600017CF0 /* AppDelegate.h */,
     175                                CD1DAF991D709E3600017CF0 /* AppDelegate.m */,
     176                                CD1DAFA11D709E3600017CF0 /* Assets.xcassets */,
     177                                CD498B471D7634C700681FA7 /* Info.plist */,
     178                                CD1DAF9E1D709E3600017CF0 /* Main.storyboard */,
     179                                CD498B481D7634C700681FA7 /* MobileMiniBrowser.h */,
    91180                                CD1DAFBA1D709EF200017CF0 /* TabViewController.h */,
    92181                                CD1DAFBB1D709EF200017CF0 /* TabViewController.m */,
    93182                                CD1DAFBC1D709EF200017CF0 /* WebViewController.h */,
    94183                                CD1DAFBD1D709EF200017CF0 /* WebViewController.m */,
    95                                 CD1DAF981D709E3600017CF0 /* AppDelegate.h */,
    96                                 CD1DAF991D709E3600017CF0 /* AppDelegate.m */,
    97                                 CD1DAF9E1D709E3600017CF0 /* Main.storyboard */,
    98                                 CD1DAFA11D709E3600017CF0 /* Assets.xcassets */,
    99                                 CD1DAFA31D709E3600017CF0 /* LaunchScreen.storyboard */,
    100                                 CD1DAFA61D709E3600017CF0 /* Info.plist */,
    101                                 CD1DAF951D709E3600017CF0 /* Supporting Files */,
    102                         );
    103                         path = MobileMiniBrowser;
    104                         sourceTree = "<group>";
    105                 };
    106                 CD1DAF951D709E3600017CF0 /* Supporting Files */ = {
    107                         isa = PBXGroup;
    108                         children = (
    109                                 CD1DAF961D709E3600017CF0 /* main.m */,
    110                         );
    111                         name = "Supporting Files";
    112                         sourceTree = "<group>";
    113                 };
    114                 CD1DAFAE1D709E3600017CF0 /* MobileMiniBrowserUITests */ = {
    115                         isa = PBXGroup;
    116                         children = (
    117                                 CD1DAFAF1D709E3600017CF0 /* MobileMiniBrowserUITests.m */,
    118                                 CD1DAFB11D709E3600017CF0 /* Info.plist */,
    119                         );
    120                         path = MobileMiniBrowserUITests;
    121                         sourceTree = "<group>";
    122                 };
    123                 CD1DAFC01D70E12D00017CF0 /* Frameworks */ = {
    124                         isa = PBXGroup;
    125                         children = (
    126                                 CD1DAFC11D70E12D00017CF0 /* WebKit.framework */,
    127                         );
    128                         name = Frameworks;
     184                        );
     185                        name = "MobileMiniBrowser Framework";
     186                        path = MobileMiniBrowserFramework;
     187                        sourceTree = SOURCE_ROOT;
     188                };
     189                CD4DEEE11D78C6F400625986 /* Configurations */ = {
     190                        isa = PBXGroup;
     191                        children = (
     192                                CD4DEEE21D78C6FF00625986 /* Base.xcconfig */,
     193                                CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */,
     194                                CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */,
     195                        );
     196                        name = Configurations;
     197                        sourceTree = "<group>";
     198                };
     199                CDA985121D76471700EBC399 /* Resources */ = {
     200                        isa = PBXGroup;
     201                        children = (
     202                                CDA985151D76477900EBC399 /* test.mp4 */,
     203                                CDA985131D76474100EBC399 /* index.html */,
     204                                CDA985171D7647CD00EBC399 /* looping.html */,
     205                        );
     206                        name = Resources;
    129207                        sourceTree = "<group>";
    130208                };
    131209/* End PBXGroup section */
     210
     211/* Begin PBXHeadersBuildPhase section */
     212                CD498B381D76348000681FA7 /* Headers */ = {
     213                        isa = PBXHeadersBuildPhase;
     214                        buildActionMask = 2147483647;
     215                        files = (
     216                                CD498B4A1D763D4800681FA7 /* MobileMiniBrowser.h in Headers */,
     217                                CD498B4F1D763D7600681FA7 /* WebViewController.h in Headers */,
     218                                CD498B4E1D763D7600681FA7 /* TabViewController.h in Headers */,
     219                                CD498B501D763D7600681FA7 /* AppDelegate.h in Headers */,
     220                        );
     221                        runOnlyForDeploymentPostprocessing = 0;
     222                };
     223/* End PBXHeadersBuildPhase section */
    132224
    133225/* Begin PBXNativeTarget section */
     
    139231                                CD1DAF8F1D709E3600017CF0 /* Frameworks */,
    140232                                CD1DAF901D709E3600017CF0 /* Resources */,
     233                                CD498B231D76341700681FA7 /* Embed Frameworks */,
    141234                        );
    142235                        buildRules = (
    143236                        );
    144237                        dependencies = (
     238                                CD498B411D76348000681FA7 /* PBXTargetDependency */,
    145239                        );
    146240                        name = MobileMiniBrowser;
     
    166260                        productReference = CD1DAFAB1D709E3600017CF0 /* MobileMiniBrowserUITests.xctest */;
    167261                        productType = "com.apple.product-type.bundle.ui-testing";
     262                };
     263                CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */ = {
     264                        isa = PBXNativeTarget;
     265                        buildConfigurationList = CD498B441D76348000681FA7 /* Build configuration list for PBXNativeTarget "MobileMiniBrowser.framework" */;
     266                        buildPhases = (
     267                                CD498B361D76348000681FA7 /* Sources */,
     268                                CD498B371D76348000681FA7 /* Frameworks */,
     269                                CD498B381D76348000681FA7 /* Headers */,
     270                                CD498B391D76348000681FA7 /* Resources */,
     271                        );
     272                        buildRules = (
     273                        );
     274                        dependencies = (
     275                        );
     276                        name = MobileMiniBrowser.framework;
     277                        productName = MobileMiniBrowser;
     278                        productReference = CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */;
     279                        productType = "com.apple.product-type.framework";
    168280                };
    169281/* End PBXNativeTarget section */
     
    183295                                                TestTargetID = CD1DAF911D709E3600017CF0;
    184296                                        };
     297                                        CD498B3A1D76348000681FA7 = {
     298                                                CreatedOnToolsVersion = 8.0;
     299                                                ProvisioningStyle = Automatic;
     300                                        };
    185301                                };
    186302                        };
     
    200316                                CD1DAF911D709E3600017CF0 /* MobileMiniBrowser */,
    201317                                CD1DAFAA1D709E3600017CF0 /* MobileMiniBrowserUITests */,
     318                                CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */,
    202319                        );
    203320                };
     
    210327                        files = (
    211328                                CD1DAFA51D709E3600017CF0 /* LaunchScreen.storyboard in Resources */,
    212                                 CD1DAFA21D709E3600017CF0 /* Assets.xcassets in Resources */,
    213                                 CD1DAFA01D709E3600017CF0 /* Main.storyboard in Resources */,
     329                                CD4DEEE61D78C6FF00625986 /* DebugRelease.xcconfig in Resources */,
     330                                CD4DEEE71D78C6FF00625986 /* MobileMiniBrowser.xcconfig in Resources */,
     331                                CD4DEEE51D78C6FF00625986 /* Base.xcconfig in Resources */,
    214332                        );
    215333                        runOnlyForDeploymentPostprocessing = 0;
     
    219337                        buildActionMask = 2147483647;
    220338                        files = (
     339                        );
     340                        runOnlyForDeploymentPostprocessing = 0;
     341                };
     342                CD498B391D76348000681FA7 /* Resources */ = {
     343                        isa = PBXResourcesBuildPhase;
     344                        buildActionMask = 2147483647;
     345                        files = (
     346                                CDA9851A1D76483400EBC399 /* index.html in Resources */,
     347                                CD498B521D763D8800681FA7 /* Assets.xcassets in Resources */,
     348                                CD498B511D763D7F00681FA7 /* Main.storyboard in Resources */,
     349                                CDA9851B1D76483400EBC399 /* looping.html in Resources */,
     350                                CD498B531D763D9300681FA7 /* Info.plist in Resources */,
     351                                CDA985191D76483400EBC399 /* test.mp4 in Resources */,
    221352                        );
    222353                        runOnlyForDeploymentPostprocessing = 0;
     
    229360                        buildActionMask = 2147483647;
    230361                        files = (
    231                                 CD1DAFBE1D709EF200017CF0 /* TabViewController.m in Sources */,
    232                                 CD1DAF9A1D709E3600017CF0 /* AppDelegate.m in Sources */,
    233362                                CD1DAF971D709E3600017CF0 /* main.m in Sources */,
    234                                 CD1DAFBF1D709EF200017CF0 /* WebViewController.m in Sources */,
    235363                        );
    236364                        runOnlyForDeploymentPostprocessing = 0;
     
    241369                        files = (
    242370                                CD1DAFB01D709E3600017CF0 /* MobileMiniBrowserUITests.m in Sources */,
     371                        );
     372                        runOnlyForDeploymentPostprocessing = 0;
     373                };
     374                CD498B361D76348000681FA7 /* Sources */ = {
     375                        isa = PBXSourcesBuildPhase;
     376                        buildActionMask = 2147483647;
     377                        files = (
     378                                CD498B4B1D763D7100681FA7 /* TabViewController.m in Sources */,
     379                                CD498B4C1D763D7100681FA7 /* WebViewController.m in Sources */,
     380                                CD498B4D1D763D7100681FA7 /* AppDelegate.m in Sources */,
    243381                        );
    244382                        runOnlyForDeploymentPostprocessing = 0;
     
    252390                        targetProxy = CD1DAFAC1D709E3600017CF0 /* PBXContainerItemProxy */;
    253391                };
     392                CD498B411D76348000681FA7 /* PBXTargetDependency */ = {
     393                        isa = PBXTargetDependency;
     394                        target = CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */;
     395                        targetProxy = CD498B401D76348000681FA7 /* PBXContainerItemProxy */;
     396                };
    254397/* End PBXTargetDependency section */
    255398
     
    276419                CD1DAFB21D709E3600017CF0 /* Debug */ = {
    277420                        isa = XCBuildConfiguration;
     421                        baseConfigurationReference = CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */;
    278422                        buildSettings = {
    279423                                ALWAYS_SEARCH_USER_PATHS = NO;
     
    322466                CD1DAFB31D709E3600017CF0 /* Release */ = {
    323467                        isa = XCBuildConfiguration;
     468                        baseConfigurationReference = CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */;
    324469                        buildSettings = {
    325470                                ALWAYS_SEARCH_USER_PATHS = NO;
     
    362507                CD1DAFB51D709E3600017CF0 /* Debug */ = {
    363508                        isa = XCBuildConfiguration;
     509                        baseConfigurationReference = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */;
    364510                        buildSettings = {
    365511                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
     
    367513                                LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
    368514                                PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowser;
    369                                 PRODUCT_NAME = "$(TARGET_NAME)";
     515                                PRODUCT_NAME = MobileMiniBrowser;
    370516                        };
    371517                        name = Debug;
     
    373519                CD1DAFB61D709E3600017CF0 /* Release */ = {
    374520                        isa = XCBuildConfiguration;
     521                        baseConfigurationReference = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */;
    375522                        buildSettings = {
    376523                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
     
    378525                                LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
    379526                                PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowser;
    380                                 PRODUCT_NAME = "$(TARGET_NAME)";
     527                                PRODUCT_NAME = MobileMiniBrowser;
    381528                        };
    382529                        name = Release;
     
    401548                                PRODUCT_NAME = "$(TARGET_NAME)";
    402549                                TEST_TARGET_NAME = MobileMiniBrowser;
     550                        };
     551                        name = Release;
     552                };
     553                CD498B451D76348000681FA7 /* Debug */ = {
     554                        isa = XCBuildConfiguration;
     555                        baseConfigurationReference = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */;
     556                        buildSettings = {
     557                                CURRENT_PROJECT_VERSION = 1;
     558                                DEFINES_MODULE = YES;
     559                                DYLIB_COMPATIBILITY_VERSION = 1;
     560                                DYLIB_CURRENT_VERSION = 1;
     561                                DYLIB_INSTALL_NAME_BASE = "@rpath";
     562                                INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
     563                                INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
     564                                LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
     565                                PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserFramework;
     566                                PRODUCT_NAME = MobileMiniBrowser;
     567                                SKIP_INSTALL = YES;
     568                                VERSIONING_SYSTEM = "apple-generic";
     569                                VERSION_INFO_PREFIX = "";
     570                        };
     571                        name = Debug;
     572                };
     573                CD498B461D76348000681FA7 /* Release */ = {
     574                        isa = XCBuildConfiguration;
     575                        baseConfigurationReference = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */;
     576                        buildSettings = {
     577                                CURRENT_PROJECT_VERSION = 1;
     578                                DEFINES_MODULE = YES;
     579                                DYLIB_COMPATIBILITY_VERSION = 1;
     580                                DYLIB_CURRENT_VERSION = 1;
     581                                DYLIB_INSTALL_NAME_BASE = "@rpath";
     582                                INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
     583                                INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
     584                                LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
     585                                PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserFramework;
     586                                PRODUCT_NAME = MobileMiniBrowser;
     587                                SKIP_INSTALL = YES;
     588                                VERSIONING_SYSTEM = "apple-generic";
     589                                VERSION_INFO_PREFIX = "";
    403590                        };
    404591                        name = Release;
     
    434621                        defaultConfigurationName = Release;
    435622                };
     623                CD498B441D76348000681FA7 /* Build configuration list for PBXNativeTarget "MobileMiniBrowser.framework" */ = {
     624                        isa = XCConfigurationList;
     625                        buildConfigurations = (
     626                                CD498B451D76348000681FA7 /* Debug */,
     627                                CD498B461D76348000681FA7 /* Release */,
     628                        );
     629                        defaultConfigurationIsVisible = 0;
     630                        defaultConfigurationName = Release;
     631                };
    436632/* End XCConfigurationList section */
    437633        };
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowser/Base.lproj/LaunchScreen.storyboard

    r205311 r205353  
    1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    2 <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
     1<?xml version="1.0" encoding="UTF-8"?>
     2<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11191" systemVersion="16B2314" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
    33    <dependencies>
    44        <deployment version="2304" identifier="iOS"/>
    5         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
     5        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11156"/>
    66        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
     7        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    78    </dependencies>
    89    <scenes>
     
    1011        <scene sceneID="EHf-IW-A2E">
    1112            <objects>
    12                 <viewController id="01J-lp-oVM" sceneMemberID="viewController">
     13                <viewController storyboardIdentifier="idViewController" id="01J-lp-oVM" sceneMemberID="viewController">
    1314                    <layoutGuides>
    1415                        <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
     
    1617                    </layoutGuides>
    1718                    <view key="view" contentMode="scaleToFill" id="9qo-7e-hd1">
    18                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
     19                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
    1920                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
    2021                        <subviews>
    21                             <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="F7I-Hn-oUR">
    22                                 <rect key="frame" x="0.0" y="0.0" width="0.0" height="44"/>
     22                            <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F7I-Hn-oUR">
    2323                                <constraints>
    2424                                    <constraint firstAttribute="height" constant="44" id="h95-xh-m8y"/>
     
    3434                                </items>
    3535                            </toolbar>
    36                             <view clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7Vg-6f-OBr" userLabel="URL Field Container">
     36                            <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7Vg-6f-OBr" userLabel="URL Field Container">
    3737                                <subviews>
    38                                     <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nX4-D6-AXV">
    39                                         <rect key="frame" x="0.0" y="0.0" width="0.0" height="45"/>
     38                                    <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nX4-D6-AXV">
    4039                                        <items/>
    4140                                    </toolbar>
    42                                     <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="L4i-oL-VFG">
    43                                         <rect key="frame" x="0.0" y="0.0" width="0.0" height="30"/>
     41                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="L4i-oL-VFG">
    4442                                        <nil key="textColor"/>
    4543                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
    4644                                        <textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardType="URL" returnKeyType="go" enablesReturnKeyAutomatically="YES"/>
    4745                                    </textField>
    48                                     <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1CE-0G-4aC">
     46                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1CE-0G-4aC">
    4947                                        <constraints>
    5048                                            <constraint firstAttribute="width" constant="45.999999999999886" id="Az8-yd-X45"/>
     
    5250                                        <state key="normal" title="Go"/>
    5351                                    </button>
    54                                     <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vYP-Mc-B8q">
    55                                         <rect key="frame" x="0.0" y="0.0" width="0.0" height="2"/>
    56                                     </progressView>
     52                                    <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vYP-Mc-B8q"/>
    5753                                </subviews>
    5854                                <constraints>
     
    7369                            </view>
    7470                        </subviews>
    75                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
     71                        <color key="backgroundColor" red="1" green="0.99997437000274658" blue="0.99999129772186279" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
    7672                        <constraints>
    7773                            <constraint firstItem="F7I-Hn-oUR" firstAttribute="top" secondItem="Llm-lL-Icb" secondAttribute="bottom" id="Dbb-TN-26g"/>
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowser/Info.plist

    r205311 r205353  
    2323        <key>UILaunchStoryboardName</key>
    2424        <string>LaunchScreen</string>
    25         <key>UIMainStoryboardFile</key>
    26         <string>Main</string>
    2725        <key>UIRequiredDeviceCapabilities</key>
    2826        <array>
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowser/main.m

    r205311 r205353  
    2424 */
    2525
    26 #import "AppDelegate.h"
    27 #import <UIKit/UIKit.h>
     26#import <MobileMiniBrowser/MobileMiniBrowser.h>
    2827
    2928int main(int argc, char * argv[])
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m

    r205351 r205353  
    2626#import "AppDelegate.h"
    2727
     28#import "WebViewController.h"
     29
    2830@interface AppDelegate ()
    29 
    3031@end
    3132
    3233@implementation AppDelegate
    3334
    34 
    3535- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    3636{
    37     // Override point for customization after application launch.
     37    UIStoryboard *frameworkMainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle bundleForClass:[AppDelegate class]]];
     38    WebViewController *viewController = [frameworkMainStoryboard instantiateInitialViewController];
     39    if (!viewController)
     40        return NO;
     41
     42    if (!self.window)
     43        self.window = [[UIWindow alloc] init];
     44    self.window.rootViewController = viewController;
     45    [self.window makeKeyAndVisible];
     46
    3847    return YES;
    3948}
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Base.lproj/Main.storyboard

    r205351 r205353  
    1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    2 <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Ohh-6U-lsQ">
     1<?xml version="1.0" encoding="UTF-8"?>
     2<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11191" systemVersion="16B2314" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Ohh-6U-lsQ">
    33    <dependencies>
    44        <deployment version="2304" identifier="iOS"/>
    5         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
     5        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11156"/>
     6        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    67    </dependencies>
    78    <scenes>
     
    1516                    </layoutGuides>
    1617                    <view key="view" contentMode="scaleToFill" id="1WJ-am-PnB">
    17                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
     18                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
    1819                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
    1920                        <subviews>
    20                             <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SYm-x3-D12">
    21                                 <rect key="frame" x="0.0" y="0.0" width="0.0" height="44"/>
     21                            <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SYm-x3-D12">
    2222                                <constraints>
    2323                                    <constraint firstAttribute="height" constant="44" id="0IC-RY-cRv"/>
     
    4949                                </items>
    5050                            </toolbar>
    51                             <view clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Wkd-K8-BC1" userLabel="URL Field Container">
     51                            <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wkd-K8-BC1" userLabel="URL Field Container">
    5252                                <subviews>
    53                                     <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SSg-5u-loI">
    54                                         <rect key="frame" x="0.0" y="0.0" width="0.0" height="46"/>
     53                                    <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SSg-5u-loI">
    5554                                        <items/>
    5655                                    </toolbar>
    57                                     <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="n4f-v4-gO4">
    58                                         <rect key="frame" x="0.0" y="0.0" width="0.0" height="30"/>
     56                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="n4f-v4-gO4">
    5957                                        <accessibility key="accessibilityConfiguration" identifier="idURLField" label="URL Field"/>
    6058                                        <nil key="textColor"/>
     
    6664                                        </connections>
    6765                                    </textField>
    68                                     <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qSw-Ym-IBE">
     66                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qSw-Ym-IBE">
    6967                                        <accessibility key="accessibilityConfiguration" identifier="idGoToURL" label="Go To URL"/>
    7068                                        <constraints>
     
    7674                                        </connections>
    7775                                    </button>
    78                                     <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" misplaced="YES" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="2bJ-bG-4SW">
    79                                         <rect key="frame" x="0.0" y="0.0" width="0.0" height="2"/>
    80                                     </progressView>
     76                                    <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="2bJ-bG-4SW"/>
    8177                                </subviews>
    8278                                <constraints>
     
    9692                                </constraints>
    9793                            </view>
    98                             <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="719-Zt-fvZ" userLabel="Web View Container">
    99                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
     94                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="719-Zt-fvZ" userLabel="Web View Container">
     95                                <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
    10096                                <accessibility key="accessibilityConfiguration" label="Web View Container"/>
    10197                            </view>
    10298                        </subviews>
    103                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
     99                        <color key="backgroundColor" red="1" green="0.99997437000274658" blue="0.99999129772186279" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
    104100                        <constraints>
    105101                            <constraint firstItem="Wkd-K8-BC1" firstAttribute="leading" secondItem="1WJ-am-PnB" secondAttribute="leading" id="2cZ-lB-Wel"/>
     
    136132                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
    137133                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
    138                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
     134                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
    139135                        <prototypes>
    140136                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="idTabViewCustomCell" selectionStyle="default" indentationWidth="10" id="Bxf-dM-uYf">
     
    142138                                <autoresizingMask key="autoresizingMask"/>
    143139                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Bxf-dM-uYf" id="lpb-yc-EJ5">
    144                                     <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
     140                                    <frame key="frameInset" width="375" height="44"/>
    145141                                    <autoresizingMask key="autoresizingMask"/>
    146142                                </tableViewCellContentView>
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/MobileMiniBrowser.h

    r205351 r205353  
    2424 */
    2525
    26 #import <UIKit/UIKit.h>
    27 
    28 @interface AppDelegate : UIResponder <UIApplicationDelegate>
    29 
    30 @property (strong, nonatomic) UIWindow *window;
    31 
    32 @end
    33 
     26#import <MobileMiniBrowser/AppDelegate.h>
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m

    r205351 r205353  
    3232#import <WebKit/WKWebViewConfiguration.h>
    3333
     34@implementation NSURL (BundleURLMethods)
     35+ (NSURL *)__bundleURLForFileURL:(NSURL *)url bundle:(NSBundle *)bundle
     36{
     37    if (![url.scheme isEqualToString:@"file"])
     38        return nil;
     39    NSString *resourcePath = [bundle.resourcePath stringByAppendingString:@"/"];
     40    if (![url.path hasPrefix:resourcePath])
     41        return nil;
     42    NSURLComponents *bundleComponents = [[NSURLComponents alloc] init];
     43    bundleComponents.scheme = @"bundle";
     44    bundleComponents.path = [url.path substringFromIndex:resourcePath.length];
     45    return [bundleComponents.URL copy];
     46}
     47
     48+ (NSURL *)__fileURLForBundleURL:(NSURL *)url bundle:(NSBundle *)bundle
     49{
     50    if (![url.scheme isEqualToString:@"bundle"])
     51        return nil;
     52    return [bundle.resourceURL URLByAppendingPathComponent:url.path];
     53}
     54@end
     55
    3456@interface WebViewController () <WKNavigationDelegate> {
    3557    WKWebView *_currentWebView;
     
    91113    if ([requestedDestination rangeOfString:@"^[\\p{Alphabetic}]+:" options:(NSRegularExpressionSearch | NSCaseInsensitiveSearch | NSAnchoredSearch)].location == NSNotFound)
    92114        requestedDestination = [@"http://" stringByAppendingString:requestedDestination];
    93     [self.currentWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:requestedDestination]]];
     115    NSURL* requestedURL = [NSURL URLWithString:requestedDestination];
     116    if ([requestedURL.scheme isEqualToString:@"bundle"]) {
     117        NSBundle *frameworkBundle = [NSBundle bundleForClass:[WebViewController class]];
     118        requestedURL = [NSURL __fileURLForBundleURL:requestedURL bundle:frameworkBundle];
     119        [self.currentWebView loadFileURL:requestedURL allowingReadAccessToURL:frameworkBundle.resourceURL];
     120    }
     121    [self.currentWebView loadRequest:[NSURLRequest requestWithURL:requestedURL]];
    94122}
    95123
    96124- (IBAction)showTabs:(id)sender
    97125{
    98     [self presentViewController:self.tabViewController animated:YES completion:^{ }];
     126    [self presentViewController:self.tabViewController animated:YES completion:nil];
    99127    self.tabViewController.popoverPresentationController.barButtonItem = self.tabButton;
    100128}
     
    174202#pragma mark Navigation Delegate
    175203
    176 - (void)webView:(WKWebView *)webView didFailNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error;
     204- (void)webView:(WKWebView *)webView didFailNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error
    177205{
    178206    [webView loadHTMLString:[error description] baseURL:nil];
     
    187215        [self.progressView setProgress:value animated:YES];
    188216    } else if (context == URLContext) {
    189         id newURLValue = [change valueForKey:NSKeyValueChangeNewKey];
    190         if ([newURLValue isKindOfClass:[NSURL class]])
     217        NSURL *newURLValue = [change valueForKey:NSKeyValueChangeNewKey];
     218        if ([newURLValue isKindOfClass:[NSURL class]]) {
     219            if ([newURLValue.scheme isEqualToString:@"file"])
     220                newURLValue = [NSURL __bundleURLForFileURL:newURLValue bundle:[NSBundle bundleForClass:[WebViewController class]]];
    191221            self.urlField.text = [newURLValue absoluteString];
    192         else if ([newURLValue isKindOfClass:[NSNull class]])
     222        } else if ([newURLValue isKindOfClass:[NSNull class]])
    193223            self.urlField.text = @"";
    194224    } else if (context == TitleContext)
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowserUITests/MobileMiniBrowserUITests.m

    r205311 r205353  
    6161    if (clearButton.exists)
    6262        [clearButton tap];
    63     [urlField typeText:@"http://test-safari.apple.com/"];
     63    [urlField typeText:@"bundle:/looping.html"];
    6464    [app.buttons[@"Go To URL"] tap];
    65 
    66     XCUIElement *captions = app.links[@"Captions"];
    67     [self expectationForPredicate:exists evaluatedWithObject:captions handler:nil];
    68     [self waitForExpectationsWithTimeout:5.0 handler:nil];
    69     [captions tap];
    70 
    71     XCUIElement *viewInPage = app.links[@"Video in page"];
    72     [self expectationForPredicate:exists evaluatedWithObject:viewInPage handler:nil];
    73     [self waitForExpectationsWithTimeout:5.0 handler:nil];
    74     [viewInPage tap];
    7565
    7666    XCUIElement *startPlayback = app.buttons[@"Start Playback"];
Note: See TracChangeset for help on using the changeset viewer.