<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement keyboard event sending for iOS in WebKitTestRunner"
   href="https://bugs.webkit.org/show_bug.cgi?id=149676#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement keyboard event sending for iOS in WebKitTestRunner"
   href="https://bugs.webkit.org/show_bug.cgi?id=149676">bug 149676</a>
              from <span class="vcard"><a class="email" href="mailto:wenson_hsieh&#64;apple.com" title="Wenson Hsieh &lt;wenson_hsieh&#64;apple.com&gt;"> <span class="fn">Wenson Hsieh</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=262196&amp;action=diff" name="attach_262196" title="Patch">attachment 262196</a> <a href="attachment.cgi?id=262196&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=262196&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=262196&amp;action=review</a>

Thanks for taking a look! I'll address the comments and get the bots to build (looks like I need to link against the HID usage tables). I'll have a new patch up soon.

<span class="quote">&gt;&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.h:54
&gt;&gt; +- (void)keyDown:(NSString*)character completionBlock:(void (^)(void))completionBlock;
&gt; 
&gt; space before the star.</span >

Got it, I'll change this.

<span class="quote">&gt;&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:443
&gt;&gt; +    if ([key length] != 1)
&gt; 
&gt; dot?</span >

Got it. I'll use dot for accessing properties from now on.

<span class="quote">&gt;&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:481
&gt;&gt; +    if ([key length] == 1) {
&gt; 
&gt; dot.</span >

Will fix!

<span class="quote">&gt;&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:495
&gt;&gt; +        case '`':
&gt; 
&gt; Is there really nothing in the system that can do this for us (even if it's SPI?).</span >

I found nothing that could convert the non-alphanums (!&#64;#$%, etc.) to their respective usage keys :(

<span class="quote">&gt;&gt; Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:98
&gt;&gt; +    TestRunnerWKWebView* webView = TestController::singleton().mainWebView()-&gt;platformView();
&gt; 
&gt; star's on the wrong side</span >

Will fix!

<span class="quote">&gt;&gt; Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:100
&gt;&gt; +    NSString* characterAsNSString = [[NSString stringWithCString:toSTD(toWK(character)).c_str()] autorelease];
&gt; 
&gt; I'm sure there's a better way to get a NSString from a WKString. Going through std::string is crazy. At the very least, use WKStringGetUTF8CString instead of std::string::c_str(), no?
&gt; 
&gt; Also, star.</span >

I'll look for a cleaner way to do this.

Also, will fix the star.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>