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

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

Issue 112023010: Make EventHandler::ActiveIntervalTimer mockable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename methods and handle pending fires Created 6 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 | Annotate | Revision Log
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 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 1227
1228 Node* targetNode; 1228 Node* targetNode;
1229 IntRect zoomableArea; 1229 IntRect zoomableArea;
1230 bool foundNode = document->frame()->eventHandler().bestZoomableAreaForTouchP oint(point, radius, zoomableArea, targetNode); 1230 bool foundNode = document->frame()->eventHandler().bestZoomableAreaForTouchP oint(point, radius, zoomableArea, targetNode);
1231 if (foundNode) 1231 if (foundNode)
1232 return ClientRect::create(zoomableArea); 1232 return ClientRect::create(zoomableArea);
1233 1233
1234 return 0; 1234 return 0;
1235 } 1235 }
1236 1236
1237 void Internals::suspendActiveIntervalTimer(Document* document, ExceptionState& e xceptionState)
1238 {
1239 if (!document || !document->frame())
1240 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr or);
1241
1242 document->frame()->eventHandler().getActiveIntervalTimerForTesting()->enterM anualModeForTesting();
1243 }
1244
1245 void Internals::resumeActiveIntervalTimer(Document* document, ExceptionState& ex ceptionState)
1246 {
1247 if (!document || !document->frame())
1248 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr or);
1249
1250 document->frame()->eventHandler().getActiveIntervalTimerForTesting()->leaveM anualModeForTesting();
1251 }
1252
1253 void Internals::fireActiveIntervalTimer(Document* document, ExceptionState& exce ptionState)
1254 {
1255 if (!document || !document->frame())
1256 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr or);
1257
1258 document->frame()->eventHandler().getActiveIntervalTimerForTesting()->manual FireForTesting();
1259 }
1237 1260
1238 int Internals::lastSpellCheckRequestSequence(Document* document, ExceptionState& exceptionState) 1261 int Internals::lastSpellCheckRequestSequence(Document* document, ExceptionState& exceptionState)
1239 { 1262 {
1240 SpellCheckRequester* requester = spellCheckRequester(document); 1263 SpellCheckRequester* requester = spellCheckRequester(document);
1241 1264
1242 if (!requester) { 1265 if (!requester) {
1243 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr or); 1266 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr or);
1244 return -1; 1267 return -1;
1245 } 1268 }
1246 1269
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 if (view->compositor()) 2343 if (view->compositor())
2321 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe ferredWork); 2344 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe ferredWork);
2322 } 2345 }
2323 2346
2324 void Internals::setZoomFactor(float factor) 2347 void Internals::setZoomFactor(float factor)
2325 { 2348 {
2326 frame()->setPageZoomFactor(factor); 2349 frame()->setPageZoomFactor(factor);
2327 } 2350 }
2328 2351
2329 } 2352 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698