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

Unified Diff: content/browser/webui/web_ui_browsertest.cc

Issue 2870203002: Implement chrome://view-http-cache with network service. (Closed)
Patch Set: fix memory leak Created 3 years, 7 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
Index: content/browser/webui/web_ui_browsertest.cc
diff --git a/content/browser/webui/web_ui_browsertest.cc b/content/browser/webui/web_ui_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a89a9e9a0b3f6b4a8c33a855c20a866a74f5285b
--- /dev/null
+++ b/content/browser/webui/web_ui_browsertest.cc
@@ -0,0 +1,30 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/common/url_constants.h"
+#include "content/public/test/browser_test_utils.h"
+#include "content/public/test/content_browser_test.h"
+#include "content/public/test/content_browser_test_utils.h"
+#include "content/shell/browser/shell.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace content {
+
+using WebUIBrowserTest = ContentBrowserTest;
+
+IN_PROC_BROWSER_TEST_F(WebUIBrowserTest, ViewCache) {
+ ASSERT_TRUE(embedded_test_server()->Start());
+ NavigateToURL(shell(), embedded_test_server()->GetURL("/simple_page.html"));
+ int result = -1;
+ NavigateToURL(shell(), GURL(kChromeUINetworkViewCacheURL));
+ std::string script(
+ "document.documentElement.innerHTML.indexOf('simple_page.html')");
+ ASSERT_TRUE(ExecuteScriptAndExtractInt(
+ shell()->web_contents(), "domAutomationController.send(" + script + ")",
+ &result));
+ ASSERT_NE(-1, result);
+}
+
+} // namespace content
« no previous file with comments | « content/browser/net/view_http_cache_job_factory.cc ('k') | content/browser/webui/web_ui_url_loader_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698