Skip to content

Commit

Permalink
Assertion failure in createWebViewWithRequest when running imported/w…
Browse files Browse the repository at this point in the history
…3c/web-platform-tests/shadow-dom/crashtests/move-to-new-tree-1343016.html

https://bugs.webkit.org/show_bug.cgi?id=255665

Reviewed by Chris Dumez.

The assertion failure is caused by the test using "test-wait" attribute on the document element
to make the test keep running instead of calling waitUntilDone(). Fixed the bug by relaxing
the assertion to allow this method of waiting.

* Tools/DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:createWebViewWithRequest:]):

Canonical link: https://commits.webkit.org/263156@main
  • Loading branch information
rniwa committed Apr 20, 2023
1 parent ca6ca7d commit 02cdac5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tools/DumpRenderTree/mac/UIDelegate.mm
Expand Up @@ -34,6 +34,7 @@
#import "EventSendingController.h"
#import "MockWebNotificationProvider.h"
#import "TestRunner.h"
#import "WPTFunctions.h"

#import <WebKit/WebApplicationCache.h>
#import <WebKit/WebFramePrivate.h>
Expand Down Expand Up @@ -176,7 +177,7 @@ - (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)
return nil;

// Make sure that waitUntilDone has been called.
ASSERT(gTestRunner->waitToDump());
ASSERT(gTestRunner->waitToDump() || WTR::hasTestWaitAttribute(mainFrame.globalContext));

auto webView = createWebViewAndOffscreenWindow();
[webView setPreferences:[sender preferences]];
Expand Down

0 comments on commit 02cdac5

Please sign in to comment.