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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebViewTest.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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "platform/graphics/GraphicsContext.h" 62 #include "platform/graphics/GraphicsContext.h"
63 #include "platform/graphics/paint/SkPictureBuilder.h" 63 #include "platform/graphics/paint/SkPictureBuilder.h"
64 #include "platform/testing/URLTestHelpers.h" 64 #include "platform/testing/URLTestHelpers.h"
65 #include "platform/testing/UnitTestHelpers.h" 65 #include "platform/testing/UnitTestHelpers.h"
66 #include "public/platform/Platform.h" 66 #include "public/platform/Platform.h"
67 #include "public/platform/WebClipboard.h" 67 #include "public/platform/WebClipboard.h"
68 #include "public/platform/WebDisplayMode.h" 68 #include "public/platform/WebDisplayMode.h"
69 #include "public/platform/WebDragData.h" 69 #include "public/platform/WebDragData.h"
70 #include "public/platform/WebSize.h" 70 #include "public/platform/WebSize.h"
71 #include "public/platform/WebThread.h" 71 #include "public/platform/WebThread.h"
72 #include "public/platform/WebUnitTestSupport.h" 72 #include "public/platform/WebURLLoaderMockFactory.h"
73 #include "public/web/WebAutofillClient.h" 73 #include "public/web/WebAutofillClient.h"
74 #include "public/web/WebCache.h"
74 #include "public/web/WebContentDetectionResult.h" 75 #include "public/web/WebContentDetectionResult.h"
75 #include "public/web/WebDateTimeChooserCompletion.h" 76 #include "public/web/WebDateTimeChooserCompletion.h"
76 #include "public/web/WebDeviceEmulationParams.h" 77 #include "public/web/WebDeviceEmulationParams.h"
77 #include "public/web/WebDocument.h" 78 #include "public/web/WebDocument.h"
78 #include "public/web/WebDragOperation.h" 79 #include "public/web/WebDragOperation.h"
79 #include "public/web/WebElement.h" 80 #include "public/web/WebElement.h"
80 #include "public/web/WebFrame.h" 81 #include "public/web/WebFrame.h"
81 #include "public/web/WebFrameClient.h" 82 #include "public/web/WebFrameClient.h"
82 #include "public/web/WebFrameContentDumper.h" 83 #include "public/web/WebFrameContentDumper.h"
83 #include "public/web/WebHitTestResult.h" 84 #include "public/web/WebHitTestResult.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 223
223 class WebViewTest : public ::testing::Test { 224 class WebViewTest : public ::testing::Test {
224 public: 225 public:
225 WebViewTest() 226 WebViewTest()
226 : m_baseURL("http://www.test.com/") 227 : m_baseURL("http://www.test.com/")
227 { 228 {
228 } 229 }
229 230
230 void TearDown() override 231 void TearDown() override
231 { 232 {
232 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); 233 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
234 WebCache::clear();
233 } 235 }
234 236
235 protected: 237 protected:
236 void registerMockedHttpURLLoad(const std::string& fileName) 238 void registerMockedHttpURLLoad(const std::string& fileName)
237 { 239 {
238 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL.c_str()), WebString::fromUTF8(fileName.c_str())); 240 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL.c_str()), WebString::fromUTF8(fileName.c_str()));
239 } 241 }
240 242
241 void testAutoResize(const WebSize& minAutoResize, const WebSize& maxAutoResi ze, 243 void testAutoResize(const WebSize& minAutoResize, const WebSize& maxAutoResi ze,
242 const std::string& pageWidth, const std::string& pageHei ght, 244 const std::string& pageWidth, const std::string& pageHei ght,
(...skipping 3050 matching lines...) Expand 10 before | Expand all | Expand 10 after
3293 frame->setAutofillClient(&client); 3295 frame->setAutofillClient(&client);
3294 webView->setInitialFocus(false); 3296 webView->setInitialFocus(false);
3295 3297
3296 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel lo").c_str()))); 3298 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel lo").c_str())));
3297 EXPECT_EQ(1, client.textChangesFromUserGesture()); 3299 EXPECT_EQ(1, client.textChangesFromUserGesture());
3298 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); 3300 EXPECT_FALSE(UserGestureIndicator::processingUserGesture());
3299 frame->setAutofillClient(0); 3301 frame->setAutofillClient(0);
3300 } 3302 }
3301 3303
3302 } // namespace blink 3304 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebSelectorTest.cpp ('k') | third_party/WebKit/Source/web/tests/sim/SimNetwork.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698