Commit 50a638de authored by Jun Cai's avatar Jun Cai Committed by Commit Bot

NetworkService: Fix NewTabPageInterceptorTest.NoInterception by using https test server

This CL fixes the NewTabPageInterceptorTest.NoInterception browser test
for network service by using https embedded test server instead of
URLRequestMockHTTPJob::GetMockHttpsUrl().

Bug: 776589
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I4d1f911ec4db21a2f086c09d3d6a99e41ad75230
Reviewed-on: https://chromium-review.googlesource.com/802079Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521751}
parent db45aa6f
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h" #include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/url_request/url_request_mock_http_job.h" #include "net/test/url_request/url_request_mock_http_job.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -55,8 +56,10 @@ class NewTabPageInterceptorTest : public InProcessBrowserTest { ...@@ -55,8 +56,10 @@ class NewTabPageInterceptorTest : public InProcessBrowserTest {
}; };
IN_PROC_BROWSER_TEST_F(NewTabPageInterceptorTest, NoInterception) { IN_PROC_BROWSER_TEST_F(NewTabPageInterceptorTest, NoInterception) {
GURL new_tab_url = net::EmbeddedTestServer https_test_server(
net::URLRequestMockHTTPJob::GetMockHttpsUrl("instant_extended.html"); net::EmbeddedTestServer::TYPE_HTTPS);
ASSERT_TRUE(https_test_server.Start());
GURL new_tab_url = https_test_server.GetURL("/instant_extended.html");
ChangeDefaultSearchProvider("instant_extended.html"); ChangeDefaultSearchProvider("instant_extended.html");
ui_test_utils::NavigateToURL(browser(), new_tab_url); ui_test_utils::NavigateToURL(browser(), new_tab_url);
......
...@@ -689,7 +689,6 @@ ...@@ -689,7 +689,6 @@
-NewTabPageInterceptorTest.204Interception -NewTabPageInterceptorTest.204Interception
-NewTabPageInterceptorTest.404Interception -NewTabPageInterceptorTest.404Interception
-NewTabPageInterceptorTest.FailedRequestInterception -NewTabPageInterceptorTest.FailedRequestInterception
-NewTabPageInterceptorTest.NoInterception
# This requires that InterceptNetworkTransactions works # This requires that InterceptNetworkTransactions works
-ErrorPageNavigationCorrectionsFailTest.StaleCacheStatusFailedCorrections -ErrorPageNavigationCorrectionsFailTest.StaleCacheStatusFailedCorrections
......
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