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

Unified Diff: Source/web/tests/ImeOnFocusTest.cpp

Issue 1174283002: Fix unit test style in Source/web/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove static 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
« no previous file with comments | « Source/web/tests/FrameLoaderClientImplTest.cpp ('k') | Source/web/tests/KeyboardTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/ImeOnFocusTest.cpp
diff --git a/Source/web/tests/ImeOnFocusTest.cpp b/Source/web/tests/ImeOnFocusTest.cpp
index 57aad794871c1bb4c66eea15b5c3152fe2b6a31d..4380755e63975ed52a9d4bfb543dea0279dad6a3 100644
--- a/Source/web/tests/ImeOnFocusTest.cpp
+++ b/Source/web/tests/ImeOnFocusTest.cpp
@@ -15,15 +15,13 @@
#include "public/web/WebDocument.h"
#include "web/WebLocalFrameImpl.h"
#include "web/tests/FrameTestHelpers.h"
-
#include <gtest/gtest.h>
-using namespace blink;
using blink::FrameTestHelpers::loadFrame;
using blink::testing::runPendingTasks;
-using URLTestHelpers::registerMockedURLFromBaseURL;
+using blink::URLTestHelpers::registerMockedURLFromBaseURL;
-namespace {
+namespace blink {
class ImeRequestTrackingWebViewClient : public FrameTestHelpers::TestWebViewClient {
public:
@@ -33,7 +31,7 @@ public:
}
// WebWidgetClient methods
- virtual void showImeIfNeeded() override
+ void showImeIfNeeded() override
{
++m_imeRequestCount;
}
@@ -60,15 +58,15 @@ public:
{
}
- virtual void TearDown()
+ void TearDown() override
{
Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
}
protected:
void sendGestureTap(WebView*, IntPoint);
- void focus(const WTF::AtomicString& element);
- void runImeOnFocusTest(std::string fileName, int, IntPoint tapPoint = IntPoint(-1, -1), const WTF::AtomicString& focusElement = WTF::nullAtom, std::string frame = "");
+ void focus(const AtomicString& element);
+ void runImeOnFocusTest(std::string fileName, int, IntPoint tapPoint = IntPoint(-1, -1), const AtomicString& focusElement = nullAtom, std::string frame = "");
std::string m_baseURL;
FrameTestHelpers::WebViewHelper m_webViewHelper;
@@ -91,12 +89,12 @@ void ImeOnFocusTest::sendGestureTap(WebView* webView, IntPoint clientPoint)
runPendingTasks();
}
-void ImeOnFocusTest::focus(const WTF::AtomicString& element)
+void ImeOnFocusTest::focus(const AtomicString& element)
{
m_document->body()->getElementById(element)->focus();
}
-void ImeOnFocusTest::runImeOnFocusTest(std::string fileName, int expectedImeRequestCount, IntPoint tapPoint, const WTF::AtomicString& focusElement, std::string frame)
+void ImeOnFocusTest::runImeOnFocusTest(std::string fileName, int expectedImeRequestCount, IntPoint tapPoint, const AtomicString& focusElement, std::string frame)
{
ImeRequestTrackingWebViewClient client;
registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL), WebString::fromUTF8(fileName));
@@ -155,4 +153,4 @@ TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture)
runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, IntPoint(50, 50), "input", "frame.html");
}
-}
+} // namespace blink
« no previous file with comments | « Source/web/tests/FrameLoaderClientImplTest.cpp ('k') | Source/web/tests/KeyboardTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698