| Index: components/error_page/renderer/net_error_helper_core_unittest.cc
|
| diff --git a/components/error_page/renderer/net_error_helper_core_unittest.cc b/components/error_page/renderer/net_error_helper_core_unittest.cc
|
| index b6a389ffbf684bdd41b9ca896a1dcc97de183ddc..829fef900ae063e2e7aee98ec5e3f3c814e6e222 100644
|
| --- a/components/error_page/renderer/net_error_helper_core_unittest.cc
|
| +++ b/components/error_page/renderer/net_error_helper_core_unittest.cc
|
| @@ -151,7 +151,7 @@ class NetErrorHelperCoreTest : public testing::Test,
|
| update_count_(0),
|
| error_html_update_count_(0),
|
| reload_count_(0),
|
| - load_stale_count_(0),
|
| + show_saved_count_(0),
|
| enable_page_helper_functions_count_(0),
|
| default_url_(GURL(kFailedUrl)),
|
| error_url_(GURL(content::kUnreachableWebDataURL)),
|
| @@ -188,12 +188,12 @@ class NetErrorHelperCoreTest : public testing::Test,
|
| return reload_count_;
|
| }
|
|
|
| - int load_stale_count() const {
|
| - return load_stale_count_;
|
| + int show_saved_count() const {
|
| + return show_saved_count_;
|
| }
|
|
|
| - const GURL& load_stale_url() const {
|
| - return load_stale_url_;
|
| + const GURL& show_saved_url() const {
|
| + return show_saved_url_;
|
| }
|
|
|
| const GURL& default_url() const {
|
| @@ -298,11 +298,11 @@ class NetErrorHelperCoreTest : public testing::Test,
|
| bool is_failed_post,
|
| scoped_ptr<ErrorPageParams> params,
|
| bool* reload_button_shown,
|
| - bool* load_stale_button_shown,
|
| + bool* show_saved_copy_button_shown,
|
| std::string* html) const override {
|
| last_error_page_params_.reset(params.release());
|
| *reload_button_shown = false;
|
| - *load_stale_button_shown = false;
|
| + *show_saved_copy_button_shown = false;
|
| *html = ErrorToString(error, is_failed_post);
|
| }
|
|
|
| @@ -355,8 +355,8 @@ class NetErrorHelperCoreTest : public testing::Test,
|
| void ReloadPage() override { reload_count_++; }
|
|
|
| void LoadPageFromCache(const GURL& error_url) override {
|
| - load_stale_count_++;
|
| - load_stale_url_ = error_url;
|
| + show_saved_count_++;
|
| + show_saved_url_ = error_url;
|
| }
|
|
|
| void SendTrackingRequest(const GURL& tracking_url,
|
| @@ -402,8 +402,8 @@ class NetErrorHelperCoreTest : public testing::Test,
|
| mutable scoped_ptr<ErrorPageParams> last_error_page_params_;
|
|
|
| int reload_count_;
|
| - int load_stale_count_;
|
| - GURL load_stale_url_;
|
| + int show_saved_count_;
|
| + GURL show_saved_url_;
|
|
|
| int enable_page_helper_functions_count_;
|
|
|
| @@ -2444,12 +2444,12 @@ TEST_F(NetErrorHelperCoreTest, ExplicitReloadSucceeds) {
|
| EXPECT_EQ(1, reload_count());
|
| }
|
|
|
| -TEST_F(NetErrorHelperCoreTest, ExplicitLoadStaleSucceeds) {
|
| +TEST_F(NetErrorHelperCoreTest, ExplicitShowSavedSucceeds) {
|
| DoErrorLoad(net::ERR_CONNECTION_RESET);
|
| - EXPECT_EQ(0, load_stale_count());
|
| - core()->ExecuteButtonPress(NetErrorHelperCore::LOAD_STALE_BUTTON);
|
| - EXPECT_EQ(1, load_stale_count());
|
| - EXPECT_EQ(GURL(kFailedUrl), load_stale_url());
|
| + EXPECT_EQ(0, show_saved_count());
|
| + core()->ExecuteButtonPress(NetErrorHelperCore::SHOW_SAVED_COPY_BUTTON);
|
| + EXPECT_EQ(1, show_saved_count());
|
| + EXPECT_EQ(GURL(kFailedUrl), show_saved_url());
|
| }
|
|
|
| } // namespace
|
|
|