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:
parent
066092abb6
commit
c1b1348735
5 changed files with 39 additions and 4 deletions
|
@ -10,15 +10,12 @@
|
|||
#include "base/stl_util.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/resource_request_info.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
|
||||
using content::BrowserThread;
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace {
|
||||
|
||||
const char* ResourceTypeToString(content::ResourceType type) {
|
||||
switch (type) {
|
||||
case content::RESOURCE_TYPE_MAIN_FRAME:
|
||||
|
@ -39,6 +36,8 @@ const char* ResourceTypeToString(content::ResourceType type) {
|
|||
return "other";
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void RunSimpleListener(const AtomNetworkDelegate::SimpleListener& listener,
|
||||
scoped_ptr<base::DictionaryValue> details) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue