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

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

Issue 23819053: Rename usesOverlayScrollbars of settings to mockScrollbarsUseOverlay (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: mockScrollbarsUses... -> mockScrollbarsUse... Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 void Internals::resetToConsistentState(Page* page) 189 void Internals::resetToConsistentState(Page* page)
190 { 190 {
191 ASSERT(page); 191 ASSERT(page);
192 192
193 page->setDeviceScaleFactor(1); 193 page->setDeviceScaleFactor(1);
194 page->setPageScaleFactor(1, IntPoint(0, 0)); 194 page->setPageScaleFactor(1, IntPoint(0, 0));
195 page->setPagination(Pagination()); 195 page->setPagination(Pagination());
196 TextRun::setAllowsRoundingHacks(false); 196 TextRun::setAllowsRoundingHacks(false);
197 WebCore::overrideUserPreferredLanguages(Vector<String>()); 197 WebCore::overrideUserPreferredLanguages(Vector<String>());
198 WebCore::Settings::setUsesOverlayScrollbars(false);
199 delete s_pagePopupDriver; 198 delete s_pagePopupDriver;
200 s_pagePopupDriver = 0; 199 s_pagePopupDriver = 0;
201 page->chrome().client().resetPagePopupDriver(); 200 page->chrome().client().resetPagePopupDriver();
202 if (!page->mainFrame()->editor().isContinuousSpellCheckingEnabled()) 201 if (!page->mainFrame()->editor().isContinuousSpellCheckingEnabled())
203 page->mainFrame()->editor().toggleContinuousSpellChecking(); 202 page->mainFrame()->editor().toggleContinuousSpellChecking();
204 if (page->mainFrame()->editor().isOverwriteModeEnabled()) 203 if (page->mainFrame()->editor().isOverwriteModeEnabled())
205 page->mainFrame()->editor().toggleOverwriteModeEnabled(); 204 page->mainFrame()->editor().toggleOverwriteModeEnabled();
206 } 205 }
207 206
208 Internals::Internals(Document* document) 207 Internals::Internals(Document* document)
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after
2133 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt h()); 2132 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt h());
2134 return buffer.release(); 2133 return buffer.release();
2135 } 2134 }
2136 2135
2137 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<ArrayB uffer> buffer) const 2136 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<ArrayB uffer> buffer) const
2138 { 2137 {
2139 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength() / sizeof(UChar)); 2138 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength() / sizeof(UChar));
2140 return SerializedScriptValue::createFromWire(value); 2139 return SerializedScriptValue::createFromWire(value);
2141 } 2140 }
2142 2141
2143 void Internals::setUsesOverlayScrollbars(bool enabled)
2144 {
2145 WebCore::Settings::setUsesOverlayScrollbars(enabled);
2146 }
2147
2148 void Internals::forceReload(bool endToEnd) 2142 void Internals::forceReload(bool endToEnd)
2149 { 2143 {
2150 frame()->loader()->reload(endToEnd ? EndToEndReload : NormalReload); 2144 frame()->loader()->reload(endToEnd ? EndToEndReload : NormalReload);
2151 } 2145 }
2152 2146
2153 PassRefPtr<ClientRect> Internals::selectionBounds(ExceptionState& es) 2147 PassRefPtr<ClientRect> Internals::selectionBounds(ExceptionState& es)
2154 { 2148 {
2155 Document* document = contextDocument(); 2149 Document* document = contextDocument();
2156 if (!document || !document->frame()) { 2150 if (!document || !document->frame()) {
2157 es.throwDOMException(InvalidAccessError); 2151 es.throwDOMException(InvalidAccessError);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 return false; 2205 return false;
2212 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); 2206 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB);
2213 // To prevent tests that call loseSharedGraphicsContext3D from being 2207 // To prevent tests that call loseSharedGraphicsContext3D from being
2214 // flaky, we call finish so that the context is guaranteed to be lost 2208 // flaky, we call finish so that the context is guaranteed to be lost
2215 // synchronously (i.e. before returning). 2209 // synchronously (i.e. before returning).
2216 sharedContext->finish(); 2210 sharedContext->finish();
2217 return true; 2211 return true;
2218 } 2212 }
2219 2213
2220 } 2214 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698