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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1571833002: Add popup layout tests with device scale factor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/virtual/scalefactor200withzoom/fast/hidpi/static/README.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 static RuntimeEnabledFeatures::Backup* sFeaturesBackup = nullptr; 202 static RuntimeEnabledFeatures::Backup* sFeaturesBackup = nullptr;
203 203
204 void Internals::resetToConsistentState(Page* page) 204 void Internals::resetToConsistentState(Page* page)
205 { 205 {
206 ASSERT(page); 206 ASSERT(page);
207 207
208 if (!sFeaturesBackup) 208 if (!sFeaturesBackup)
209 sFeaturesBackup = new RuntimeEnabledFeatures::Backup; 209 sFeaturesBackup = new RuntimeEnabledFeatures::Backup;
210 sFeaturesBackup->restore(); 210 sFeaturesBackup->restore();
211 page->setDeviceScaleFactor(1);
212 page->setIsCursorVisible(true); 211 page->setIsCursorVisible(true);
213 page->setPageScaleFactor(1); 212 page->setPageScaleFactor(1);
214 page->deprecatedLocalMainFrame()->view()->layoutViewportScrollableArea()->se tScrollPosition(IntPoint(0, 0), ProgrammaticScroll); 213 page->deprecatedLocalMainFrame()->view()->layoutViewportScrollableArea()->se tScrollPosition(IntPoint(0, 0), ProgrammaticScroll);
215 overrideUserPreferredLanguages(Vector<AtomicString>()); 214 overrideUserPreferredLanguages(Vector<AtomicString>());
216 if (!page->deprecatedLocalMainFrame()->spellChecker().isContinuousSpellCheck ingEnabled()) 215 if (!page->deprecatedLocalMainFrame()->spellChecker().isContinuousSpellCheck ingEnabled())
217 page->deprecatedLocalMainFrame()->spellChecker().toggleContinuousSpellCh ecking(); 216 page->deprecatedLocalMainFrame()->spellChecker().toggleContinuousSpellCh ecking();
218 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled()) 217 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled())
219 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled(); 218 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled();
220 219
221 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator( )) 220 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator( ))
(...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2557 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat e)); 2556 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat e));
2558 } 2557 }
2559 2558
2560 // TODO(liberato): remove once autoplay gesture override experiment concludes. 2559 // TODO(liberato): remove once autoplay gesture override experiment concludes.
2561 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) 2560 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element)
2562 { 2561 {
2563 element->triggerAutoplayViewportCheckForTesting(); 2562 element->triggerAutoplayViewportCheckForTesting();
2564 } 2563 }
2565 2564
2566 } // namespace blink 2565 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/virtual/scalefactor200withzoom/fast/hidpi/static/README.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698