Changeset 268443 in webkit


Ignore:
Timestamp:
Oct 13, 2020 8:20:43 PM (4 years ago)
Author:
rniwa@webkit.org
Message:

IPC testing JS API should expose a reply and describe the list of arguments for each message
https://bugs.webkit.org/show_bug.cgi?id=217565

Fixed the tests.

  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp

    r268384 r268443  
    887887    WebProcessPool::didReceiveInvalidMessage(messageName);
    888888
     889#if ENABLE(IPC_TESTING_API)
     890    if (processPool().defaultPageGroup().preferences().store().getBoolValueForKey(WebPreferencesKey::ipcTestingAPIEnabledKey()))
     891        return;
     892#endif
     893
    889894    // Terminate the WebContent process.
    890895    terminate();
  • trunk/Tools/ChangeLog

    r268440 r268443  
     12020-10-13  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        IPC testing JS API should expose a reply and describe the list of arguments for each message
     4        https://bugs.webkit.org/show_bug.cgi?id=217565
     5
     6        Fixed the tests.
     7
     8        * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
     9
    1102020-10-13  Jonathan Bedard  <jbedard@apple.com>
    211
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm

    r268431 r268443  
    9898    done = false;
    9999    [webView synchronouslyLoadHTMLString:@"<!DOCTYPE html><script>IPC.sendSyncMessage('UI', IPC.webPageProxyID, IPC.messages.WebPageProxy_RunJavaScriptAlert.name, 100,"
    100         "[{type: 'uint64_t', value: IPC.frameIdentifier}, {type: 'FrameInfoData'}, {'type': 'String', 'value': 'hi'}]);</script>"];
     100        "[{type: 'uint64_t', value: IPC.frameID}, {type: 'FrameInfoData'}, {'type': 'String', 'value': 'hi'}]);</script>"];
    101101    TestWebKitAPI::Util::run(&done);
    102102
     
    121121    promptResult = @"foo";
    122122    [webView synchronouslyLoadHTMLString:@"<!DOCTYPE html><script>result = IPC.sendSyncMessage('UI', IPC.webPageProxyID, IPC.messages.WebPageProxy_RunJavaScriptPrompt.name, 100,"
    123         "[{type: 'uint64_t', value: IPC.frameIdentifier}, {type: 'FrameInfoData'}, {'type': 'String', 'value': 'hi'}, {'type': 'String', 'value': 'bar'}]);</script>"];
     123        "[{type: 'uint64_t', value: IPC.frameID}, {type: 'FrameInfoData'}, {'type': 'String', 'value': 'hi'}, {'type': 'String', 'value': 'bar'}]);</script>"];
    124124    TestWebKitAPI::Util::run(&done);
    125125
     
    146146    promptResult = @"foo";
    147147    [webView synchronouslyLoadHTMLString:@"<!DOCTYPE html><script>IPC.sendMessage(\"Networking\", 0, IPC.messages.NetworkConnectionToWebProcess_HasStorageAccess.name,"
    148         "[{type: 'RegistrableDomain', value: 'https://ipctestingapi.com'}, {type: 'RegistrableDomain', value: 'https://webkit.org'}, {type: 'uint64_t', value: IPC.frameIdentifier},"
    149         "{type: 'uint64_t', value: IPC.pageIdentifier}]).then((result) => alert(JSON.stringify(result.arguments)));</script>"];
     148        "[{type: 'RegistrableDomain', value: 'https://ipctestingapi.com'}, {type: 'RegistrableDomain', value: 'https://webkit.org'}, {type: 'uint64_t', value: IPC.frameID},"
     149        "{type: 'uint64_t', value: IPC.pageID}]).then((result) => alert(JSON.stringify(result.arguments)));</script>"];
    150150    TestWebKitAPI::Util::run(&done);
    151151
Note: See TracChangeset for help on using the changeset viewer.