Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix API test WebKit.WebsiteDataStoreCustomPathsWithoutPrewarming afte…
…r 193354

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

Reviewed by Geoffrey Garen.

* TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(runWebsiteDataStoreCustomPaths):


Canonical link: https://commits.webkit.org/207988@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
szewai committed Jan 16, 2019
1 parent bd2ec94 commit 70b9350
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,15 @@
2019-01-15 Sihui Liu <sihui_liu@apple.com>

Fix API test WebKit.WebsiteDataStoreCustomPathsWithoutPrewarming after 193354
https://bugs.webkit.org/show_bug.cgi?id=193451

Reviewed by Geoffrey Garen.

* TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(runWebsiteDataStoreCustomPaths):

2019-01-15 Jonathan Bedard <jbedard@apple.com>

webkitpy: Support boolean simctl isAvailable
Expand Down
Expand Up @@ -30,6 +30,7 @@

#import "PlatformUtilities.h"
#import "Utilities.h"
#import <WebKit/WKPreferencesRef.h>
#import <WebKit/WKUIDelegatePrivate.h>
#import <WebKit/WKWebViewPrivate.h>
#import <WebKit/_WKInputDelegate.h>
Expand Down Expand Up @@ -126,6 +127,9 @@ - (void)_webView:(WKWebView *)webView willSubmitFormValues:(NSDictionary *)value
TEST(WebKit, DuplicateCompletionHandlerCalls)
{
auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 800, 600)]);
auto preferences = (__bridge WKPreferencesRef)[[webView configuration] preferences];
WKPreferencesSetWebSQLDisabled(preferences, false);

auto delegate = adoptNS([[DuplicateCompletionHandlerCallsDelegate alloc] init]);
[webView setNavigationDelegate:delegate.get()];
[webView setUIDelegate:delegate.get()];
Expand Down
Expand Up @@ -28,6 +28,7 @@
#import "PlatformUtilities.h"
#import "Test.h"
#import "TestNavigationDelegate.h"
#import <WebKit/WKPreferencesRef.h>
#import <WebKit/WKProcessPoolPrivate.h>
#import <WebKit/WKUserContentControllerPrivate.h>
#import <WebKit/WKWebViewConfigurationPrivate.h>
Expand Down Expand Up @@ -129,6 +130,9 @@ static void runWebsiteDataStoreCustomPaths(ShouldEnableProcessPrewarming shouldE
RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
[webView setNavigationDelegate:handler.get()];

auto preferences = (__bridge WKPreferencesRef)[[webView configuration] preferences];
WKPreferencesSetWebSQLDisabled(preferences, false);

NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"WebsiteDataStoreCustomPaths" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
[webView loadRequest:request];

Expand Down

0 comments on commit 70b9350

Please sign in to comment.