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

Side by Side Diff: chrome/browser/errorpage_browsertest.cc

Issue 422933002: Shift the error page "More" button over to text. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'c to r287451 to get past removal of chrome/browser/resources/ssl/blocking.html and thus the pr… Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/common/localized_error.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool result = false; 73 bool result = false;
74 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( 74 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
75 browser->tab_strip_model()->GetActiveWebContents(), command, &result)); 75 browser->tab_strip_model()->GetActiveWebContents(), command, &result));
76 return result; 76 return result;
77 } 77 }
78 78
79 // Expands the more box on the currently displayed error page. 79 // Expands the more box on the currently displayed error page.
80 void ToggleHelpBox(Browser* browser) { 80 void ToggleHelpBox(Browser* browser) {
81 EXPECT_TRUE(content::ExecuteScript( 81 EXPECT_TRUE(content::ExecuteScript(
82 browser->tab_strip_model()->GetActiveWebContents(), 82 browser->tab_strip_model()->GetActiveWebContents(),
83 "document.getElementById('more-less-button').click();")); 83 "document.getElementById('details-button').click();"));
84 } 84 }
85 85
86 // Returns true if |browser| is displaying the text representation of 86 // Returns true if |browser| is displaying the text representation of
87 // |error_code| on the current page. 87 // |error_code| on the current page.
88 bool WARN_UNUSED_RESULT IsDisplayingNetError(Browser* browser, 88 bool WARN_UNUSED_RESULT IsDisplayingNetError(Browser* browser,
89 net::Error error_code) { 89 net::Error error_code) {
90 // Get the error as a string, and remove the leading "net::", which is not 90 // Get the error as a string, and remove the leading "net::", which is not
91 // included on error pages. 91 // included on error pages.
92 std::string error_string(net::ErrorToString(error_code)); 92 std::string error_string(net::ErrorToString(error_code));
93 DCHECK(StartsWithASCII(error_string, "net::", true)); 93 DCHECK(StartsWithASCII(error_string, "net::", true));
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 browser(), 1099 browser(),
1100 URLRequestFailedJob::GetMockHttpUrlForHostname(net::ERR_UNSAFE_PORT, 1100 URLRequestFailedJob::GetMockHttpUrlForHostname(net::ERR_UNSAFE_PORT,
1101 kHostname), 1101 kHostname),
1102 1); 1102 1);
1103 1103
1104 ToggleHelpBox(browser()); 1104 ToggleHelpBox(browser());
1105 EXPECT_TRUE(IsDisplayingText(browser(), kHostnameJSUnicode)); 1105 EXPECT_TRUE(IsDisplayingText(browser(), kHostnameJSUnicode));
1106 } 1106 }
1107 1107
1108 } // namespace 1108 } // namespace
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/common/localized_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698