Title: [239356] trunk/Tools
Revision
239356
Author
achristen...@apple.com
Date
2018-12-18 15:02:16 -0800 (Tue, 18 Dec 2018)

Log Message

Fix API test introduced in r239339 on iOS.
https://bugs.webkit.org/show_bug.cgi?id=192675

* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(TEST):
The iOS implementation of the safe browsing warning is a little different.
It does some element creation when it is added to the window so it knows how big it is.
To test these elements, we need to simulate adding it to the window.
A similar technique is done in other iOS API tests, such as SafeBrowsing.ShowWarningSPI.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (239355 => 239356)


--- trunk/Tools/ChangeLog	2018-12-18 22:24:33 UTC (rev 239355)
+++ trunk/Tools/ChangeLog	2018-12-18 23:02:16 UTC (rev 239356)
@@ -1,3 +1,15 @@
+2018-12-18  Alex Christensen  <achristen...@webkit.org>
+
+        Fix API test introduced in r239339 on iOS.
+        https://bugs.webkit.org/show_bug.cgi?id=192675
+
+        * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
+        (TEST):
+        The iOS implementation of the safe browsing warning is a little different.
+        It does some element creation when it is added to the window so it knows how big it is.
+        To test these elements, we need to simulate adding it to the window.
+        A similar technique is done in other iOS API tests, such as SafeBrowsing.ShowWarningSPI.
+
 2018-12-18  Jonathan Bedard  <jbed...@apple.com>
 
         webkitpy: Ignore device type for test when using --force

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm (239355 => 239356)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm	2018-12-18 22:24:33 UTC (rev 239355)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm	2018-12-18 23:02:16 UTC (rev 239356)
@@ -318,6 +318,9 @@
         [webView loadHTMLString:@"<script>alert('loaded')</script>" baseURL:simpleURL.get()];
         while (![webView _safeBrowsingWarning])
             TestWebKitAPI::Util::spinRunLoop();
+#if !PLATFORM(MAC)
+        [[webView _safeBrowsingWarning] didMoveToWindow];
+#endif
         visitUnsafeSite([webView _safeBrowsingWarning]);
         TestWebKitAPI::Util::run(&done);
         EXPECT_FALSE(!![webView _safeBrowsingWarning]);
@@ -326,6 +329,9 @@
         [webView evaluateJavaScript:[NSString stringWithFormat:@"window.location='%@'", simple2URL.get()] completionHandler:nil];
         while (![webView _safeBrowsingWarning])
             TestWebKitAPI::Util::spinRunLoop();
+#if !PLATFORM(MAC)
+        [[webView _safeBrowsingWarning] didMoveToWindow];
+#endif
         return webView;
     };
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to