Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2120)

Unified Diff: chrome/test/nacl/pnacl_header_test.h

Issue 471233003: Set RequestContextObject for PNaCl pexe fetches, to fix On-Demand update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small change Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/nacl/pnacl_header_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/nacl/pnacl_header_test.h
diff --git a/chrome/test/nacl/pnacl_header_test.h b/chrome/test/nacl/pnacl_header_test.h
index 9134925edd0874bff5f986ec7836dab25b9122db..6c75fdce00f27b4f5fac1906b8d7a3d40b065a04 100644
--- a/chrome/test/nacl/pnacl_header_test.h
+++ b/chrome/test/nacl/pnacl_header_test.h
@@ -8,6 +8,8 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/test/base/in_process_browser_test.h"
+#include "content/public/browser/resource_dispatcher_host_delegate.h"
+#include "content/public/common/resource_type.h"
namespace base {
class FilePath;
@@ -20,6 +22,30 @@ class HttpResponse;
}
}
+using content::ResourceDispatcherHostDelegate;
+
+class TestDispatcherHostDelegate : public ResourceDispatcherHostDelegate {
+ public:
+ explicit TestDispatcherHostDelegate()
+ : ResourceDispatcherHostDelegate(), found_pnacl_header_(false) {}
+
+ virtual ~TestDispatcherHostDelegate() {}
+
+ virtual void RequestBeginning(
+ net::URLRequest* request,
+ content::ResourceContext* resource_context,
+ content::AppCacheService* appcache_service,
+ content::ResourceType resource_type,
+ ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE;
+
+ bool found_pnacl_header() const { return found_pnacl_header_; }
+
+ private:
+ bool found_pnacl_header_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestDispatcherHostDelegate);
+};
+
class PnaclHeaderTest : public InProcessBrowserTest {
public:
PnaclHeaderTest();
@@ -40,6 +66,7 @@ class PnaclHeaderTest : public InProcessBrowserTest {
int noncors_loads_;
int cors_loads_;
+ TestDispatcherHostDelegate test_delegate_;
DISALLOW_COPY_AND_ASSIGN(PnaclHeaderTest);
};
« no previous file with comments | « no previous file | chrome/test/nacl/pnacl_header_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698