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

Unified Diff: chrome/browser/net/errorpage_browsertest.cc

Issue 2913733002: Add a browser test for access control for file: scheme (Closed)
Patch Set: just rebase Created 3 years, 6 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 | « chrome/browser/net/chrome_network_delegate_browsertest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/errorpage_browsertest.cc
diff --git a/chrome/browser/net/errorpage_browsertest.cc b/chrome/browser/net/errorpage_browsertest.cc
index 69b34a9197f11cc864510ff8e72ddcd47f922242..f896e0e7971ef256092bf770d98bf4086e011b6e 100644
--- a/chrome/browser/net/errorpage_browsertest.cc
+++ b/chrome/browser/net/errorpage_browsertest.cc
@@ -89,9 +89,10 @@ using net::URLRequestTestJob;
namespace {
-// Returns true if |text| is displayed on the page |browser| is currently
-// displaying. Uses "innerText", so will miss hidden text, and whitespace
-// space handling may be weird.
+// Searches for first node containing |text|, and if it finds one, searches
+// through all ancestors seeing if any of them is of class "hidden". Since it
+// relies on the hidden class used by network error pages, not suitable for
+// general use.
bool WARN_UNUSED_RESULT IsDisplayingText(Browser* browser,
const std::string& text) {
// clang-format off
« no previous file with comments | « chrome/browser/net/chrome_network_delegate_browsertest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698