Index: chrome/browser/extensions/web_view_browsertest.cc |
diff --git a/chrome/browser/extensions/web_view_browsertest.cc b/chrome/browser/extensions/web_view_browsertest.cc |
index bfe49c3c4b49d9af4ff769617e8e036b146a5f07..e94f770eac15d69f3eb7a0f019e91237f5054530 100644 |
--- a/chrome/browser/extensions/web_view_browsertest.cc |
+++ b/chrome/browser/extensions/web_view_browsertest.cc |
@@ -20,6 +20,7 @@ |
#include "content/public/browser/web_contents_delegate.h" |
#include "content/public/test/browser_test_utils.h" |
#include "content/public/test/fake_speech_recognition_manager.h" |
+#include "net/test/embedded_test_server/embedded_test_server.h" |
#include "ui/compositor/compositor_setup.h" |
#include "ui/gl/gl_switches.h" |
@@ -204,26 +205,26 @@ class WebViewTest : public extensions::PlatformAppBrowserTest { |
navigate_to_url = navigate_to_url.ReplaceComponents(replace_host); |
- GURL tag_url1 = test_server()->GetURL( |
- "files/extensions/platform_apps/web_view/isolation/cookie.html"); |
+ GURL tag_url1 = embedded_test_server()->GetURL( |
+ "/extensions/platform_apps/web_view/isolation/cookie.html"); |
tag_url1 = tag_url1.ReplaceComponents(replace_host); |
- GURL tag_url2 = test_server()->GetURL( |
- "files/extensions/platform_apps/web_view/isolation/cookie2.html"); |
+ GURL tag_url2 = embedded_test_server()->GetURL( |
+ "/extensions/platform_apps/web_view/isolation/cookie2.html"); |
tag_url2 = tag_url2.ReplaceComponents(replace_host); |
- GURL tag_url3 = test_server()->GetURL( |
- "files/extensions/platform_apps/web_view/isolation/storage1.html"); |
+ GURL tag_url3 = embedded_test_server()->GetURL( |
+ "/extensions/platform_apps/web_view/isolation/storage1.html"); |
tag_url3 = tag_url3.ReplaceComponents(replace_host); |
- GURL tag_url4 = test_server()->GetURL( |
- "files/extensions/platform_apps/web_view/isolation/storage2.html"); |
+ GURL tag_url4 = embedded_test_server()->GetURL( |
+ "/extensions/platform_apps/web_view/isolation/storage2.html"); |
tag_url4 = tag_url4.ReplaceComponents(replace_host); |
- GURL tag_url5 = test_server()->GetURL( |
- "files/extensions/platform_apps/web_view/isolation/storage1.html#p1"); |
+ GURL tag_url5 = embedded_test_server()->GetURL( |
+ "/extensions/platform_apps/web_view/isolation/storage1.html#p1"); |
tag_url5 = tag_url5.ReplaceComponents(replace_host); |
- GURL tag_url6 = test_server()->GetURL( |
- "files/extensions/platform_apps/web_view/isolation/storage1.html#p2"); |
+ GURL tag_url6 = embedded_test_server()->GetURL( |
+ "/extensions/platform_apps/web_view/isolation/storage1.html#p2"); |
tag_url6 = tag_url6.ReplaceComponents(replace_host); |
- GURL tag_url7 = test_server()->GetURL( |
- "files/extensions/platform_apps/web_view/isolation/storage1.html#p3"); |
+ GURL tag_url7 = embedded_test_server()->GetURL( |
+ "/extensions/platform_apps/web_view/isolation/storage1.html#p3"); |
tag_url7 = tag_url7.ReplaceComponents(replace_host); |
ui_test_utils::NavigateToURLWithDisposition( |
@@ -379,7 +380,7 @@ class WebViewTest : public extensions::PlatformAppBrowserTest { |
std::string host_str("localhost"); // Must stay in scope with replace_host. |
replace_host.SetHostStr(host_str); |
- GURL guest_url = test_server()->GetURL(guest_path); |
+ GURL guest_url = embedded_test_server()->GetURL(guest_path); |
guest_url = guest_url.ReplaceComponents(replace_host); |
ui_test_utils::UrlLoadObserver guest_observer( |
@@ -455,7 +456,7 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, NoPrerenderer) { |
ASSERT_TRUE(StartTestServer()); |
content::WebContents* guest_web_contents = |
LoadGuest( |
- "files/extensions/platform_apps/web_view/noprerenderer/guest.html", |
+ "/extensions/platform_apps/web_view/noprerenderer/guest.html", |
"web_view/noprerenderer"); |
ASSERT_TRUE(guest_web_contents != NULL); |
@@ -485,8 +486,8 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, CookieIsolation) { |
std::string host_str("localhost"); // Must stay in scope with replace_host. |
replace_host.SetHostStr(host_str); |
- GURL set_cookie_url = test_server()->GetURL( |
- "files/extensions/platform_apps/isolation/set_cookie.html"); |
+ GURL set_cookie_url = embedded_test_server()->GetURL( |
+ "/extensions/platform_apps/isolation/set_cookie.html"); |
set_cookie_url = set_cookie_url.ReplaceComponents(replace_host); |
// The first two partitions will be used to set cookies and ensure they are |
@@ -693,7 +694,7 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_StoragePersistence) { |
// enforced. |
IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_DOMStorageIsolation) { |
ASSERT_TRUE(StartTestServer()); |
- GURL regular_url = test_server()->GetURL("files/title1.html"); |
+ GURL regular_url = embedded_test_server()->GetURL("/title1.html"); |
std::string output; |
std::string get_local_storage("window.domAutomationController.send(" |
@@ -787,7 +788,7 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_DOMStorageIsolation) { |
// which the test checks to ensure proper storage isolation is enforced. |
IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_IndexedDBIsolation) { |
ASSERT_TRUE(StartTestServer()); |
- GURL regular_url = test_server()->GetURL("files/title1.html"); |
+ GURL regular_url = embedded_test_server()->GetURL("/title1.html"); |
content::WebContents* default_tag_contents1; |
content::WebContents* default_tag_contents2; |
@@ -950,7 +951,7 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, ScreenCoordinates) { |
IN_PROC_BROWSER_TEST_F(WebViewTest, SpeechRecognition) { |
ASSERT_TRUE(StartTestServer()); |
content::WebContents* guest_web_contents = LoadGuest( |
- "files/extensions/platform_apps/web_view/speech/guest.html", |
+ "/extensions/platform_apps/web_view/speech/guest.html", |
"web_view/speech"); |
ASSERT_TRUE(guest_web_contents); |
@@ -1044,7 +1045,7 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, ConsoleMessage) { |
IN_PROC_BROWSER_TEST_F(WebViewTest, DownloadPermission) { |
ASSERT_TRUE(StartTestServer()); // For serving guest pages. |
content::WebContents* guest_web_contents = |
- LoadGuest("files/extensions/platform_apps/web_view/download/guest.html", |
+ LoadGuest("/extensions/platform_apps/web_view/download/guest.html", |
"web_view/download"); |
ASSERT_TRUE(guest_web_contents); |