Commit c316bfa2 authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Commit Bot

Comment out some disabled test code that uses ResourceDispatcherHost which is about to go away.

This test has been disabled for over two years, and it's not clear to me that this part of it is actually needed since other parts of the test already inspect what the test server sees.

NOPRESUBMIT=true

Bug: 711289
Change-Id: Icf55d393af875e9242240bf90564d90b86046753
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1716137Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680220}
parent 5e244999
......@@ -14,7 +14,6 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/nacl/nacl_browsertest_util.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/web_contents.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
......@@ -25,6 +24,7 @@ using net::test_server::BasicHttpResponse;
using net::test_server::HttpRequest;
using net::test_server::HttpResponse;
/*
void TestDispatcherHostDelegate::RequestBeginning(
net::URLRequest* request,
content::ResourceContext* resource_context,
......@@ -42,6 +42,7 @@ void TestDispatcherHostDelegate::RequestBeginning(
}
}
}
*/
PnaclHeaderTest::PnaclHeaderTest() : noncors_loads_(0), cors_loads_(0) {}
......@@ -61,7 +62,7 @@ void PnaclHeaderTest::StartServer() {
void PnaclHeaderTest::RunLoadTest(const std::string& url,
int expected_noncors,
int expected_cors) {
content::ResourceDispatcherHost::Get()->SetDelegate(&test_delegate_);
// content::ResourceDispatcherHost::Get()->SetDelegate(&test_delegate_);
StartServer();
LoadTestMessageHandler handler;
content::JavascriptTestObserver observer(
......@@ -88,7 +89,7 @@ void PnaclHeaderTest::RunLoadTest(const std::string& url,
EXPECT_EQ(expected_noncors, noncors_loads_);
EXPECT_EQ(expected_cors, cors_loads_);
content::ResourceDispatcherHost::Get()->SetDelegate(NULL);
// content::ResourceDispatcherHost::Get()->SetDelegate(NULL);
}
std::unique_ptr<HttpResponse> PnaclHeaderTest::WatchForPexeFetch(
......@@ -113,7 +114,7 @@ std::unique_ptr<HttpResponse> PnaclHeaderTest::WatchForPexeFetch(
auto it = request.headers.find("Accept");
EXPECT_NE(std::string::npos, it->second.find("application/x-pnacl"));
EXPECT_NE(std::string::npos, it->second.find("*/*"));
EXPECT_TRUE(test_delegate_.found_pnacl_header());
// EXPECT_TRUE(test_delegate_.found_pnacl_header());
// Also make sure that other headers like CORS-related headers
// are preserved when injecting the special Accept header.
......
......@@ -11,7 +11,6 @@
#include "base/compiler_specific.h"
#include "base/macros.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 net {
......@@ -21,6 +20,10 @@ class HttpResponse;
}
}
/*
TODO(https://crbug.com/711289): port to work with network service if this
check matters.
using content::ResourceDispatcherHostDelegate;
class TestDispatcherHostDelegate : public ResourceDispatcherHostDelegate {
......@@ -44,6 +47,7 @@ class TestDispatcherHostDelegate : public ResourceDispatcherHostDelegate {
DISALLOW_COPY_AND_ASSIGN(TestDispatcherHostDelegate);
};
*/
class PnaclHeaderTest : public InProcessBrowserTest {
public:
......@@ -65,7 +69,7 @@ class PnaclHeaderTest : public InProcessBrowserTest {
int noncors_loads_;
int cors_loads_;
TestDispatcherHostDelegate test_delegate_;
// TestDispatcherHostDelegate test_delegate_;
DISALLOW_COPY_AND_ASSIGN(PnaclHeaderTest);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment