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

Unified Diff: content/shell/renderer/test_runner/web_test_proxy.cc

Issue 529403002: Layout Tests should support '*.test' URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_shell Created 6 years, 3 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 | « content/shell/app/shell_main_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/web_test_proxy.cc
diff --git a/content/shell/renderer/test_runner/web_test_proxy.cc b/content/shell/renderer/test_runner/web_test_proxy.cc
index 18086de32ee8f1eb6b975bb02ad542c083b682a3..c8470af49eb138ab4b35849f1db0928ee75357f5 100644
--- a/content/shell/renderer/test_runner/web_test_proxy.cc
+++ b/content/shell/renderer/test_runner/web_test_proxy.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/logging.h"
+#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "content/public/common/content_switches.h"
#include "content/shell/renderer/test_runner/TestPlugin.h"
@@ -155,6 +156,10 @@ bool IsLocalHost(const std::string& host) {
return host == "127.0.0.1" || host == "localhost";
}
+bool IsTestHost(const std::string& host) {
+ return EndsWith(host, ".test", false);
+}
+
bool HostIsUsedBySomeTestsToGenerateError(const std::string& host) {
return host == "255.255.255.255";
}
@@ -1082,7 +1087,7 @@ void WebTestProxyBase::WillSendRequest(
std::string host = url.host();
if (!host.empty() && (url.SchemeIs("http") || url.SchemeIs("https"))) {
- if (!IsLocalHost(host) && !HostIsUsedBySomeTestsToGenerateError(host) &&
+ if (!IsLocalHost(host) && !IsTestHost(host) && !HostIsUsedBySomeTestsToGenerateError(host) &&
((!main_document_url.SchemeIs("http") &&
!main_document_url.SchemeIs("https")) ||
IsLocalHost(main_document_url.host())) &&
« no previous file with comments | « content/shell/app/shell_main_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698