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

Unified Diff: Source/platform/scroll/ScrollableAreaTest.cpp

Issue 1184673003: Fix unit test style in Source/platform/, part 2. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/scroll/ScrollableAreaTest.cpp
diff --git a/Source/platform/scroll/ScrollableAreaTest.cpp b/Source/platform/scroll/ScrollableAreaTest.cpp
index d5b52199b8d34da57cda11081868f063f39cad91..848ff8e7ca4d92b475302f196c214ba1a8f46f70 100644
--- a/Source/platform/scroll/ScrollableAreaTest.cpp
+++ b/Source/platform/scroll/ScrollableAreaTest.cpp
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "config.h"
-
#include "platform/scroll/ScrollableArea.h"
#include "platform/TestingPlatformSupport.h"
@@ -13,9 +12,7 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-using namespace blink;
-
-namespace {
+namespace blink {
class MockScrollableArea : public ScrollableArea {
public:
@@ -36,15 +33,15 @@ public:
MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool());
MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect());
- virtual bool userInputScrollable(ScrollbarOrientation) const override { return true; }
- virtual bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; }
- virtual void setScrollOffset(const IntPoint& offset, ScrollType) override { m_scrollPosition = offset.shrunkTo(m_maximumScrollPosition); }
- virtual IntPoint scrollPosition() const override { return m_scrollPosition; }
- virtual IntPoint maximumScrollPosition() const override { return m_maximumScrollPosition; }
- virtual int visibleHeight() const override { return 768; }
- virtual int visibleWidth() const override { return 1024; }
- virtual bool scrollAnimatorEnabled() const override { return false; }
- virtual int pageStep(ScrollbarOrientation) const override { return 0; }
+ bool userInputScrollable(ScrollbarOrientation) const override { return true; }
+ bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; }
+ void setScrollOffset(const IntPoint& offset, ScrollType) override { m_scrollPosition = offset.shrunkTo(m_maximumScrollPosition); }
+ IntPoint scrollPosition() const override { return m_scrollPosition; }
+ IntPoint maximumScrollPosition() const override { return m_maximumScrollPosition; }
+ int visibleHeight() const override { return 768; }
+ int visibleWidth() const override { return 1024; }
+ bool scrollAnimatorEnabled() const override { return false; }
+ int pageStep(ScrollbarOrientation) const override { return 0; }
private:
IntPoint m_scrollPosition;
@@ -121,4 +118,4 @@ TEST_F(ScrollableAreaTest, ScrollAnimatorCurrentPositionShouldBeSync)
EXPECT_EQ(100.0, scrollableArea.scrollAnimator()->currentPosition().y());
}
-} // unnamed namespace
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698