summaryrefslogtreecommitdiffstats
path: root/chrome/test/base
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/base')
-rw-r--r--chrome/test/base/chrome_process_util.cc2
-rw-r--r--chrome/test/base/chrome_test_launcher.cc2
-rw-r--r--chrome/test/base/chrome_test_suite.cc2
-rw-r--r--chrome/test/base/module_system_test.cc6
-rw-r--r--chrome/test/base/testing_profile.cc8
-rw-r--r--chrome/test/base/ui_controls_aurax11.cc40
-rw-r--r--chrome/test/base/ui_test_utils.cc2
-rw-r--r--chrome/test/base/view_event_test_base.cc4
-rw-r--r--chrome/test/base/web_ui_browsertest.cc5
9 files changed, 38 insertions, 33 deletions
diff --git a/chrome/test/base/chrome_process_util.cc b/chrome/test/base/chrome_process_util.cc
index a954f3b..7575f2b 100644
--- a/chrome/test/base/chrome_process_util.cc
+++ b/chrome/test/base/chrome_process_util.cc
@@ -43,7 +43,7 @@ class ChildProcessFilter : public base::ProcessFilter {
explicit ChildProcessFilter(const std::vector<base::ProcessId>& parent_pids)
: parent_pids_(parent_pids.begin(), parent_pids.end()) {}
- virtual bool Includes(const base::ProcessEntry& entry) const {
+ virtual bool Includes(const base::ProcessEntry& entry) const OVERRIDE {
return parent_pids_.find(entry.parent_pid()) != parent_pids_.end();
}
diff --git a/chrome/test/base/chrome_test_launcher.cc b/chrome/test/base/chrome_test_launcher.cc
index 2f6897f..bfa84c9 100644
--- a/chrome/test/base/chrome_test_launcher.cc
+++ b/chrome/test/base/chrome_test_launcher.cc
@@ -85,7 +85,7 @@ class ChromeTestLauncherDelegate : public content::TestLauncherDelegate {
#endif
}
- virtual void PostRunMessageLoop() {
+ virtual void PostRunMessageLoop() OVERRIDE {
#if !defined(USE_AURA) && defined(TOOLKIT_VIEWS)
if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
DCHECK_EQ(handlers_.empty(), false);
diff --git a/chrome/test/base/chrome_test_suite.cc b/chrome/test/base/chrome_test_suite.cc
index 73e861a..a54e30e 100644
--- a/chrome/test/base/chrome_test_suite.cc
+++ b/chrome/test/base/chrome_test_suite.cc
@@ -90,7 +90,7 @@ class LocalHostResolverProc : public net::HostResolverProc {
net::AddressFamily address_family,
net::HostResolverFlags host_resolver_flags,
net::AddressList* addrlist,
- int* os_error) {
+ int* os_error) OVERRIDE {
const char* kLocalHostNames[] = {"localhost", "127.0.0.1", "::1"};
bool local = false;
diff --git a/chrome/test/base/module_system_test.cc b/chrome/test/base/module_system_test.cc
index 78464d9..9eef4da 100644
--- a/chrome/test/base/module_system_test.cc
+++ b/chrome/test/base/module_system_test.cc
@@ -57,13 +57,13 @@ class StringSourceMap : public ModuleSystem::SourceMap {
StringSourceMap() {}
virtual ~StringSourceMap() {}
- v8::Handle<v8::Value> GetSource(const std::string& name) OVERRIDE {
+ virtual v8::Handle<v8::Value> GetSource(const std::string& name) OVERRIDE {
if (source_map_.count(name) == 0)
return v8::Undefined();
return v8::String::New(source_map_[name].c_str());
}
- bool Contains(const std::string& name) OVERRIDE {
+ virtual bool Contains(const std::string& name) OVERRIDE {
return source_map_.count(name);
}
@@ -78,7 +78,7 @@ class StringSourceMap : public ModuleSystem::SourceMap {
class FailsOnException : public ModuleSystem::ExceptionHandler {
public:
- virtual void HandleUncaughtException() {
+ virtual void HandleUncaughtException() OVERRIDE {
FAIL();
}
};
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index e9800b7..52c1dae0 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -92,16 +92,16 @@ class QuittingHistoryDBTask : public HistoryDBTask {
QuittingHistoryDBTask() {}
virtual bool RunOnDBThread(history::HistoryBackend* backend,
- history::HistoryDatabase* db) {
+ history::HistoryDatabase* db) OVERRIDE {
return true;
}
- virtual void DoneRunOnMainThread() {
+ virtual void DoneRunOnMainThread() OVERRIDE {
MessageLoop::current()->Quit();
}
private:
- ~QuittingHistoryDBTask() {}
+ virtual ~QuittingHistoryDBTask() {}
DISALLOW_COPY_AND_ASSIGN(QuittingHistoryDBTask);
};
@@ -121,7 +121,7 @@ class TestExtensionURLRequestContext : public net::URLRequestContext {
class TestExtensionURLRequestContextGetter
: public net::URLRequestContextGetter {
public:
- virtual net::URLRequestContext* GetURLRequestContext() {
+ virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE {
if (!context_.get())
context_.reset(new TestExtensionURLRequestContext());
return context_.get();
diff --git a/chrome/test/base/ui_controls_aurax11.cc b/chrome/test/base/ui_controls_aurax11.cc
index 1f2b52a..c643650 100644
--- a/chrome/test/base/ui_controls_aurax11.cc
+++ b/chrome/test/base/ui_controls_aurax11.cc
@@ -87,18 +87,19 @@ class UIControlsX11 : public UIControlsAura {
bool control,
bool shift,
bool alt,
- bool command) {
+ bool command) OVERRIDE {
DCHECK(!command); // No command key on Aura
return SendKeyPressNotifyWhenDone(
window, key, control, shift, alt, command, base::Closure());
}
- virtual bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
- ui::KeyboardCode key,
- bool control,
- bool shift,
- bool alt,
- bool command,
- const base::Closure& closure) {
+ virtual bool SendKeyPressNotifyWhenDone(
+ gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& closure) OVERRIDE {
DCHECK(!command); // No command key on Aura
XEvent xevent = {0};
xevent.xkey.type = KeyPress;
@@ -128,12 +129,13 @@ class UIControlsX11 : public UIControlsAura {
}
// Simulate a mouse move. (x,y) are absolute screen coordinates.
- virtual bool SendMouseMove(long x, long y) {
+ virtual bool SendMouseMove(long x, long y) OVERRIDE {
return SendMouseMoveNotifyWhenDone(x, y, base::Closure());
}
- virtual bool SendMouseMoveNotifyWhenDone(long x,
- long y,
- const base::Closure& closure) {
+ virtual bool SendMouseMoveNotifyWhenDone(
+ long x,
+ long y,
+ const base::Closure& closure) OVERRIDE {
XEvent xevent = {0};
XMotionEvent* xmotion = &xevent.xmotion;
xmotion->type = MotionNotify;
@@ -149,12 +151,13 @@ class UIControlsX11 : public UIControlsAura {
RunClosureAfterAllPendingUIEvents(closure);
return true;
}
- virtual bool SendMouseEvents(MouseButton type, int state) {
+ virtual bool SendMouseEvents(MouseButton type, int state) OVERRIDE {
return SendMouseEventsNotifyWhenDone(type, state, base::Closure());
}
- virtual bool SendMouseEventsNotifyWhenDone(MouseButton type,
- int state,
- const base::Closure& closure) {
+ virtual bool SendMouseEventsNotifyWhenDone(
+ MouseButton type,
+ int state,
+ const base::Closure& closure) OVERRIDE {
XEvent xevent = {0};
XButtonEvent* xbutton = &xevent.xbutton;
DCHECK_NE(g_current_x, -1000);
@@ -190,10 +193,11 @@ class UIControlsX11 : public UIControlsAura {
RunClosureAfterAllPendingUIEvents(closure);
return true;
}
- virtual bool SendMouseClick(MouseButton type) {
+ virtual bool SendMouseClick(MouseButton type) OVERRIDE {
return SendMouseEvents(type, UP | DOWN);
}
- virtual void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
+ virtual void RunClosureAfterAllPendingUIEvents(
+ const base::Closure& closure) OVERRIDE {
if (closure.is_null())
return;
static XEvent* marker_event = NULL;
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index 79de29a..af6ede2 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -113,7 +113,7 @@ class FindInPageNotificationObserver : public content::NotificationObserver {
gfx::Rect selection_rect() const { return selection_rect_; }
virtual void Observe(int type, const content::NotificationSource& source,
- const content::NotificationDetails& details) {
+ const content::NotificationDetails& details) OVERRIDE {
if (type == chrome::NOTIFICATION_FIND_RESULT_AVAILABLE) {
content::Details<FindNotificationDetails> find_details(details);
if (find_details->request_id() == current_find_request_id_) {
diff --git a/chrome/test/base/view_event_test_base.cc b/chrome/test/base/view_event_test_base.cc
index 0ca6e07..b7ad99a 100644
--- a/chrome/test/base/view_event_test_base.cc
+++ b/chrome/test/base/view_event_test_base.cc
@@ -42,13 +42,13 @@ class TestView : public views::View {
PreferredSizeChanged();
}
- gfx::Size GetPreferredSize() {
+ virtual gfx::Size GetPreferredSize() OVERRIDE {
if (!preferred_size_.IsEmpty())
return preferred_size_;
return View::GetPreferredSize();
}
- virtual void Layout() {
+ virtual void Layout() OVERRIDE {
View* child_view = child_at(0);
child_view->SetBounds(0, 0, width(), height());
}
diff --git a/chrome/test/base/web_ui_browsertest.cc b/chrome/test/base/web_ui_browsertest.cc
index 5936006..5773dba 100644
--- a/chrome/test/base/web_ui_browsertest.cc
+++ b/chrome/test/base/web_ui_browsertest.cc
@@ -288,7 +288,7 @@ class MockWebUIDataSource : public content::URLDataSource {
callback.Run(response);
}
- std::string GetMimeType(const std::string& path) const OVERRIDE {
+ virtual std::string GetMimeType(const std::string& path) const OVERRIDE {
return "text/html";
}
@@ -303,7 +303,8 @@ class MockWebUIProvider
MockWebUIProvider() {}
// Returns a new WebUI
- WebUIController* NewWebUI(content::WebUI* web_ui, const GURL& url) OVERRIDE {
+ virtual WebUIController* NewWebUI(content::WebUI* web_ui,
+ const GURL& url) OVERRIDE {
WebUIController* controller = new content::WebUIController(web_ui);
Profile* profile = Profile::FromWebUI(web_ui);
content::URLDataSource::Add(profile, new MockWebUIDataSource());