title: Chromedriver Offline Network Conditions seems to not block Service Worker fetches
body: <p>I have a site with a Service Worker that caches some static resources on install. Some other resources are not cached, like data requests. So if you test the site using offline mode in Chrome, most of the page is properly displayed, but data is not there, and some errors appear in the console because of those failed requests. All right so far. But then I've created a test with Selenium and Chromedriver. I load that site, I visit the home page, Service Worker is properly installed, and then I try to simulate offline using:</p>
  
  <pre><code>chromeDriver.NetworkConditions = new ChromeNetworkConditions() { Latency = TimeSpan.FromSeconds(1000), DownloadThroughput = 1, UploadThroughput = 1, IsOffline = true };
  </code></pre>
  
  <p>That seems to be working fine, as if in the test I try to navigate to any page after that, it fails and shows the "no internet available" message. Also, as expected, my site loads fine due to the Service Worker, and their cached resources.</p>
  
  <p>But the weird thing is the following, the site is able to load everything, even the non-cached things like data. All the site fetches are being intercepted by the Service Worker, so it seems that Offline mode is not affecting to Service Worker fetches, that is able to keep fetching resources to the server in offline.</p>
  
  <p><em>(Note: Even though testing google chrome seems to be offline (it can't navigate to www.google.com, for instance), if I open Network or Application tabs I can't see that option as checked. If I manually check them all behaves as expected: non-cached resources can't be fetched by the Service Worker)</em></p>
  
  <p>Update 1: I've tried to directly interact with Chrome Dev Tools via Web Sockets (I've used this library: <a href="https://github.com/MasterDevs/ChromeDevTools" rel="nofollow noreferrer">https://github.com/MasterDevs/ChromeDevTools</a>) and result was the same, Service Worker requests were working fine in offline)</p>