Index: chrome/browser/errorpage_browsertest.cc |
diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc |
index 1d676a9731234f0124dc3fd8b197d6a35c376203..d9f759618dab8eacc763ce4220fda7a9b5454c79 100644 |
--- a/chrome/browser/errorpage_browsertest.cc |
+++ b/chrome/browser/errorpage_browsertest.cc |
@@ -87,13 +87,7 @@ void ToggleHelpBox(Browser* browser) { |
// |error_code| on the current page. |
bool WARN_UNUSED_RESULT IsDisplayingNetError(Browser* browser, |
net::Error error_code) { |
- // Get the error as a string, and remove the leading "net::", which is not |
- // included on error pages. |
- std::string error_string(net::ErrorToString(error_code)); |
- DCHECK(StartsWithASCII(error_string, "net::", true)); |
- error_string.erase(0, 5); |
- |
- return IsDisplayingText(browser, error_string); |
+ return IsDisplayingText(browser, net::ErrorToShortString(error_code)); |
} |
// Checks that the local error page is being displayed, without remotely |