Add resourceType arg to webContents did-get-response-details event.

Fixes #5074 and follows @zcbenz's recommendation to expose ResourceTypeToString from atom_network_delegate publicly.
Also adds testing for other arguments to the `did-get-response-details` events, since there were no existing tests for them.
This commit is contained in:
Rob Brackett 2016-04-08 11:19:36 -07:00
parent 066092abb6
commit c1b1348735
5 changed files with 39 additions and 4 deletions

View file

@ -14,6 +14,7 @@
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/native_window.h"
#include "atom/browser/net/atom_network_delegate.h"
#include "atom/browser/web_contents_permission_helper.h"
#include "atom/browser/web_contents_preferences.h"
#include "atom/browser/web_view_guest_delegate.h"
@ -587,7 +588,8 @@ void WebContents::DidGetResourceResponseStart(
details.http_response_code,
details.method,
details.referrer,
details.headers.get());
details.headers.get(),
ResourceTypeToString(details.resource_type));
}
void WebContents::DidGetRedirectForResourceRequest(