[Mac] Swipe tests depend on user preferences
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2015 00:20:41 +0000 (00:20 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2015 00:20:41 +0000 (00:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=151403

Reviewed by Tim Horton.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm: (WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/mac/main.mm: (setDefaultsToConsistentValuesForTesting):
Override these preferences to match the default for a new OS X installation.

* DumpRenderTree/mac/DumpRenderTree.mm: (setDefaultsToConsistentValuesForTesting):
Swipe tests are not enabled in WK1, but let's override the default anyway.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192598 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm
Tools/WebKitTestRunner/mac/main.mm

index 723108b..a8ff94c 100644 (file)
@@ -1,3 +1,17 @@
+2015-11-18  Alexey Proskuryakov  <ap@apple.com>
+
+        [Mac] Swipe tests depend on user preferences
+        https://bugs.webkit.org/show_bug.cgi?id=151403
+
+        Reviewed by Tim Horton.
+
+        * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm: (WTR::InjectedBundle::platformInitialize):
+        * WebKitTestRunner/mac/main.mm: (setDefaultsToConsistentValuesForTesting):
+        Override these preferences to match the default for a new OS X installation.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm: (setDefaultsToConsistentValuesForTesting):
+        Swipe tests are not enabled in WK1, but let's override the default anyway.
+
 2015-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Update xserver version in jhbuild
index 163c6cb..0a4ef59 100644 (file)
@@ -1037,6 +1037,8 @@ static void setDefaultsToConsistentValuesForTesting()
         @"AppleSystemFontOSSubversion": @(10),
 #endif
         @"NSWindowDisplayWithRunLoopObserver": @YES, // Temporary workaround, see <rdar://problem/20351297>.
+        @"AppleEnableSwipeNavigateWithScrolls": @YES,
+        @"com.apple.swipescrolldirection": @1,
     };
 
     [[NSUserDefaults standardUserDefaults] setValuesForKeysWithDictionary:dict];
index c3b4a69..d812b25 100644 (file)
@@ -74,6 +74,8 @@ void InjectedBundle::platformInitialize(WKTypeRef)
 #if __MAC_OS_X_VERSION_MIN_REQUIRED > 101000
         @"AppleSystemFontOSSubversion": @(10),
 #endif
+        @"AppleEnableSwipeNavigateWithScrolls": @YES,
+        @"com.apple.swipescrolldirection": @1,
     };
 
     [[NSUserDefaults standardUserDefaults] setVolatileDomain:dict forName:NSArgumentDomain];
index 0811a8c..5a8a764 100644 (file)
@@ -36,7 +36,9 @@ static void setDefaultsToConsistentValuesForTesting()
         // FIXME: This is likely insufficient, as tests change (and don't reset) these settings via Internals.
         @"WebAutomaticQuoteSubstitutionEnabled": @NO,
         @"WebAutomaticDashSubstitutionEnabled": @NO,
-        @"NSFakeForceTouchDevice" : @YES
+        @"NSFakeForceTouchDevice" : @YES,
+        @"AppleEnableSwipeNavigateWithScrolls": @YES,
+        @"com.apple.swipescrolldirection": @1,
     };
 
     [[NSUserDefaults standardUserDefaults] setValuesForKeysWithDictionary:dict];