<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Add function webkit_dom_element_get_bounding_client_rect"
   href="https://bugs.webkit.org/show_bug.cgi?id=163892">bug 163892</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>cgarcia&#64;igalia.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Add function webkit_dom_element_get_bounding_client_rect"
   href="https://bugs.webkit.org/show_bug.cgi?id=163892#c19">Comment # 19</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Add function webkit_dom_element_get_bounding_client_rect"
   href="https://bugs.webkit.org/show_bug.cgi?id=163892">bug 163892</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=163892#c18">comment #18</a>)
<span class="quote">&gt; My opinion is that DOM API doesn't need tests, since none of the rest of the
&gt; API has tests. But Carlos's opinion wins.</span >

It's not a matter of opinion, it's that this is not true. We have DOM API tests, I added the concept of &quot;web process tests&quot; precisely to test DOM API. We currently have:

TestDOMNode.cpp
TestDOMNodeFilter.cpp
TestDOMXPathNSResolver.cpp

I agree that we don't need very complex tests, because the actual functionality is in WebCore and already tested by layout tests using the JS API.

<span class="quote">&gt; Look in
&gt; Tools/TestWebKitAPI/Tests/WebKitGTK+ for e.g. the web extension test as an
&gt; example.</span >

Look at the examples I mentioned above. You need to add two files TestDOMFoo.cpp and DOMFooTest.cpp. The former is the test file that runs in the UI process, it adds the tests cases that normally just load some html and then tun the web process test simply calling WebViewTest::runWebProcessTest(). The latter is the test itself that runs in the web process. You have to add a class derived from WebProcessTest with a method for very tests case and override runTest that dispatches the test cases. To register the tests we use a lib constructor that uses the macro REGISTER_TEST.</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>