Fix flaky crashes in a couple of PSON API tests
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 21:27:46 +0000 (21:27 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 21:27:46 +0000 (21:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197239

Reviewed by Tim Horton.

Do not adopt the NSURLRequest returned by [NSURLRequest requestWithURL:].

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm

index ef96823..a5f487c 100644 (file)
@@ -1,3 +1,14 @@
+2019-04-24  Chris Dumez  <cdumez@apple.com>
+
+        Fix flaky crashes in a couple of PSON API tests
+        https://bugs.webkit.org/show_bug.cgi?id=197239
+
+        Reviewed by Tim Horton.
+
+        Do not adopt the NSURLRequest returned by [NSURLRequest requestWithURL:].
+
+        * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
+
 2019-04-24  Simon Fraser  <simon.fraser@apple.com>
 
         Make it possible to control the renderTreeAsText output by setting options on testRunner
index cb77b3e..a476fdb 100644 (file)
@@ -5914,8 +5914,8 @@ TEST(ProcessSwap, GetUserMediaCaptureState)
     auto uiDelegate = adoptNS([[GetUserMediaUIDelegate alloc] init]);
     [webView setUIDelegate: uiDelegate.get()];
 
-    auto request = adoptNS([NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/getUserMedia.html"]]);
-    [webView loadRequest:request.get()];
+    auto request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/getUserMedia.html"]];
+    [webView loadRequest:request];
 
     TestWebKitAPI::Util::run(&done);
     done = false;
@@ -5924,8 +5924,8 @@ TEST(ProcessSwap, GetUserMediaCaptureState)
 
     auto pid1 = [webView _webProcessIdentifier];
 
-    request = adoptNS([NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.org/test.html"]]);
-    [webView loadRequest:request.get()];
+    request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.org/test.html"]];
+    [webView loadRequest:request];
 
     TestWebKitAPI::Util::run(&done);
     done = false;
@@ -5980,8 +5980,8 @@ TEST(ProcessSwap, PageOverlayLayerPersistence)
     auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]);
     [webView setNavigationDelegate:navigationDelegate.get()];
 
-    auto request = adoptNS([NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/page-overlay"]]);
-    [webView loadRequest:request.get()];
+    auto request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/page-overlay"]];
+    [webView loadRequest:request];
 
     TestWebKitAPI::Util::run(&done);
     done = false;
@@ -5994,8 +5994,8 @@ TEST(ProcessSwap, PageOverlayLayerPersistence)
     EXPECT_TRUE(hasOverlay([webView layer]));
 #endif
 
-    request = adoptNS([NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/page-overlay"]]);
-    [webView loadRequest:request.get()];
+    request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/page-overlay"]];
+    [webView loadRequest:request];
 
     TestWebKitAPI::Util::run(&done);
     done = false;