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

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

Issue 2536723007: Removed android scrolling fake mouse moves and device_supports_mouse (Closed)
Patch Set: Made checks mirror what previous logic Created 4 years 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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 m_webView->settings()->setJavaScriptEnabled(enableJavascript); 222 m_webView->settings()->setJavaScriptEnabled(enableJavascript);
223 m_webView->settings()->setPluginsEnabled(true); 223 m_webView->settings()->setPluginsEnabled(true);
224 // Enable (mocked) network loads of image URLs, as this simplifies 224 // Enable (mocked) network loads of image URLs, as this simplifies
225 // the completion of resource loads upon test shutdown & helps avoid 225 // the completion of resource loads upon test shutdown & helps avoid
226 // dormant loads trigger Resource leaks for image loads. 226 // dormant loads trigger Resource leaks for image loads.
227 // 227 //
228 // Consequently, all external image resources must be mocked. 228 // Consequently, all external image resources must be mocked.
229 m_webView->settings()->setLoadsImagesAutomatically(true); 229 m_webView->settings()->setLoadsImagesAutomatically(true);
230 if (updateSettingsFunc) 230 if (updateSettingsFunc)
231 updateSettingsFunc(m_webView->settings()); 231 updateSettingsFunc(m_webView->settings());
232 else
233 m_webView->settings()->setDeviceSupportsMouse(false);
234 if (m_settingOverrider) 232 if (m_settingOverrider)
235 m_settingOverrider->overrideSettings(m_webView->settings()); 233 m_settingOverrider->overrideSettings(m_webView->settings());
236 m_webView->setDeviceScaleFactor( 234 m_webView->setDeviceScaleFactor(
237 webViewClient->screenInfo().deviceScaleFactor); 235 webViewClient->screenInfo().deviceScaleFactor);
238 m_webView->setDefaultPageScaleLimits(1, 4); 236 m_webView->setDefaultPageScaleLimits(1, 4);
239 WebLocalFrame* frame = WebLocalFrameImpl::create(WebTreeScopeType::Document, 237 WebLocalFrame* frame = WebLocalFrameImpl::create(WebTreeScopeType::Document,
240 webFrameClient, opener); 238 webFrameClient, opener);
241 m_webView->setMainFrame(frame); 239 m_webView->setMainFrame(frame);
242 // TODO(dcheng): The main frame widget currently has a special case. 240 // TODO(dcheng): The main frame widget currently has a special case.
243 // Eliminate this once WebView is no longer a WebWidget. 241 // Eliminate this once WebView is no longer a WebWidget.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 m_testWebViewClient->scheduleAnimation(); 339 m_testWebViewClient->scheduleAnimation();
342 } 340 }
343 341
344 void TestWebViewWidgetClient::didMeaningfulLayout( 342 void TestWebViewWidgetClient::didMeaningfulLayout(
345 WebMeaningfulLayout layoutType) { 343 WebMeaningfulLayout layoutType) {
346 m_testWebViewClient->didMeaningfulLayout(layoutType); 344 m_testWebViewClient->didMeaningfulLayout(layoutType);
347 } 345 }
348 346
349 } // namespace FrameTestHelpers 347 } // namespace FrameTestHelpers
350 } // namespace blink 348 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698