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

Side by Side Diff: third_party/WebKit/Source/web/tests/ImeOnFocusTest.cpp

Issue 1845323002: Remove WebUnitTestSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "core/dom/Document.h" 5 #include "core/dom/Document.h"
6 #include "core/dom/Element.h" 6 #include "core/dom/Element.h"
7 #include "core/dom/Node.h" 7 #include "core/dom/Node.h"
8 #include "core/html/HTMLElement.h" 8 #include "core/html/HTMLElement.h"
9 #include "platform/testing/URLTestHelpers.h" 9 #include "platform/testing/URLTestHelpers.h"
10 #include "platform/testing/UnitTestHelpers.h" 10 #include "platform/testing/UnitTestHelpers.h"
11 #include "public/platform/Platform.h" 11 #include "public/platform/Platform.h"
12 #include "public/platform/WebUnitTestSupport.h" 12 #include "public/platform/WebURLLoaderMockFactory.h"
13 #include "public/web/WebCache.h"
13 #include "public/web/WebDocument.h" 14 #include "public/web/WebDocument.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 #include "web/WebLocalFrameImpl.h" 16 #include "web/WebLocalFrameImpl.h"
16 #include "web/tests/FrameTestHelpers.h" 17 #include "web/tests/FrameTestHelpers.h"
17 18
18 using blink::FrameTestHelpers::loadFrame; 19 using blink::FrameTestHelpers::loadFrame;
19 using blink::testing::runPendingTasks; 20 using blink::testing::runPendingTasks;
20 using blink::URLTestHelpers::registerMockedURLFromBaseURL; 21 using blink::URLTestHelpers::registerMockedURLFromBaseURL;
21 22
22 namespace blink { 23 namespace blink {
(...skipping 28 matching lines...) Expand all
51 52
52 class ImeOnFocusTest : public ::testing::Test { 53 class ImeOnFocusTest : public ::testing::Test {
53 public: 54 public:
54 ImeOnFocusTest() 55 ImeOnFocusTest()
55 : m_baseURL("http://www.test.com/") 56 : m_baseURL("http://www.test.com/")
56 { 57 {
57 } 58 }
58 59
59 void TearDown() override 60 void TearDown() override
60 { 61 {
61 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); 62 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
63 WebCache::clear();
62 } 64 }
63 65
64 protected: 66 protected:
65 void sendGestureTap(WebView*, IntPoint); 67 void sendGestureTap(WebView*, IntPoint);
66 void focus(const AtomicString& element); 68 void focus(const AtomicString& element);
67 void runImeOnFocusTest(std::string fileName, int, IntPoint tapPoint = IntPoi nt(-1, -1), const AtomicString& focusElement = nullAtom, std::string frame = "") ; 69 void runImeOnFocusTest(std::string fileName, int, IntPoint tapPoint = IntPoi nt(-1, -1), const AtomicString& focusElement = nullAtom, std::string frame = "") ;
68 70
69 std::string m_baseURL; 71 std::string m_baseURL;
70 FrameTestHelpers::WebViewHelper m_webViewHelper; 72 FrameTestHelpers::WebViewHelper m_webViewHelper;
71 Persistent<Document> m_document; 73 Persistent<Document> m_document;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 { 149 {
148 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, IntPo int(50, 50), "input"); 150 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, IntPo int(50, 50), "input");
149 } 151 }
150 152
151 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) 153 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture)
152 { 154 {
153 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, IntPoi nt(50, 50), "input", "frame.html"); 155 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, IntPoi nt(50, 50), "input", "frame.html");
154 } 156 }
155 157
156 } // namespace blink 158 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698