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

Side by Side Diff: chrome/test/base/in_process_browser_test_browsertest.cc

Issue 637933002: Replace FINAL and OVERRIDE with their C++11 counterparts in chrome/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string.h> 5 #include <string.h>
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
(...skipping 23 matching lines...) Expand all
34 public: 34 public:
35 explicit LoadFailObserver(content::WebContents* contents) 35 explicit LoadFailObserver(content::WebContents* contents)
36 : content::WebContentsObserver(contents), 36 : content::WebContentsObserver(contents),
37 failed_load_(false), 37 failed_load_(false),
38 error_code_(net::OK) { } 38 error_code_(net::OK) { }
39 39
40 virtual void DidFailProvisionalLoad( 40 virtual void DidFailProvisionalLoad(
41 content::RenderFrameHost* render_frame_host, 41 content::RenderFrameHost* render_frame_host,
42 const GURL& validated_url, 42 const GURL& validated_url,
43 int error_code, 43 int error_code,
44 const base::string16& error_description) OVERRIDE { 44 const base::string16& error_description) override {
45 failed_load_ = true; 45 failed_load_ = true;
46 error_code_ = static_cast<net::Error>(error_code); 46 error_code_ = static_cast<net::Error>(error_code);
47 validated_url_ = validated_url; 47 validated_url_ = validated_url;
48 } 48 }
49 49
50 bool failed_load() const { return failed_load_; } 50 bool failed_load() const { return failed_load_; }
51 net::Error error_code() const { return error_code_; } 51 net::Error error_code() const { return error_code_; }
52 const GURL& validated_url() const { return validated_url_; } 52 const GURL& validated_url() const { return validated_url_; }
53 53
54 private: 54 private:
(...skipping 19 matching lines...) Expand all
74 GURL url(kURLs[i]); 74 GURL url(kURLs[i]);
75 LoadFailObserver observer(contents); 75 LoadFailObserver observer(contents);
76 ui_test_utils::NavigateToURL(browser(), url); 76 ui_test_utils::NavigateToURL(browser(), url);
77 EXPECT_TRUE(observer.failed_load()); 77 EXPECT_TRUE(observer.failed_load());
78 EXPECT_EQ(net::ERR_NOT_IMPLEMENTED, observer.error_code()); 78 EXPECT_EQ(net::ERR_NOT_IMPLEMENTED, observer.error_code());
79 EXPECT_EQ(url, observer.validated_url()); 79 EXPECT_EQ(url, observer.validated_url());
80 } 80 }
81 } 81 }
82 82
83 } // namespace 83 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | chrome/test/base/interactive_ui_tests_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698