Title: [208818] trunk/Tools
- Revision
- 208818
- Author
- [email protected]
- Date
- 2016-11-16 15:17:26 -0800 (Wed, 16 Nov 2016)
Log Message
Hard to write reliable UIScriptController scrollingTreeAsText tests
https://bugs.webkit.org/show_bug.cgi?id=164764
Reviewed by Wenson Hsieh.
Fix one cause of flakiness by resetting the WKWebView's UIScrollView scale
and scroll position between tests.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (208817 => 208818)
--- trunk/Tools/ChangeLog 2016-11-16 23:06:47 UTC (rev 208817)
+++ trunk/Tools/ChangeLog 2016-11-16 23:17:26 UTC (rev 208818)
@@ -1,5 +1,18 @@
2016-11-16 Simon Fraser <[email protected]>
+ Hard to write reliable UIScriptController scrollingTreeAsText tests
+ https://bugs.webkit.org/show_bug.cgi?id=164764
+
+ Reviewed by Wenson Hsieh.
+
+ Fix one cause of flakiness by resetting the WKWebView's UIScrollView scale
+ and scroll position between tests.
+
+ * WebKitTestRunner/ios/TestControllerIOS.mm:
+ (WTR::TestController::platformResetStateToConsistentValues):
+
+2016-11-16 Simon Fraser <[email protected]>
+
UIScriptController: script with no async tasks fails if an earlier script registered a callback
https://bugs.webkit.org/show_bug.cgi?id=164762
Modified: trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm (208817 => 208818)
--- trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm 2016-11-16 23:06:47 UTC (rev 208817)
+++ trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm 2016-11-16 23:17:26 UTC (rev 208818)
@@ -28,6 +28,7 @@
#import "PlatformWebView.h"
#import "TestInvocation.h"
+#import "TestRunnerWKWebView.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <WebKit/WKPreferencesRefPrivate.h>
@@ -83,6 +84,12 @@
void TestController::platformResetStateToConsistentValues()
{
cocoaResetStateToConsistentValues();
+
+ if (PlatformWebView* webView = mainWebView()) {
+ UIScrollView *scrollView = webView->platformView().scrollView;
+ [scrollView setZoomScale:1 animated:NO];
+ [scrollView setContentOffset:CGPointZero];
+ }
}
void TestController::platformConfigureViewForTest(const TestInvocation& test)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes