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

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: Naming change 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
« 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 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 1256
1257 Node* targetNode; 1257 Node* targetNode;
1258 IntRect zoomableArea; 1258 IntRect zoomableArea;
1259 bool foundNode = document->frame()->eventHandler().bestZoomableAreaForTouchP oint(point, radius, zoomableArea, targetNode); 1259 bool foundNode = document->frame()->eventHandler().bestZoomableAreaForTouchP oint(point, radius, zoomableArea, targetNode);
1260 if (foundNode) 1260 if (foundNode)
1261 return ClientRect::create(zoomableArea); 1261 return ClientRect::create(zoomableArea);
1262 1262
1263 return 0; 1263 return 0;
1264 } 1264 }
1265 1265
1266 void Internals::setActiveIntervalTimerInManualMode(Document* document, bool manu alMode, ExceptionState& exceptionState)
1267 {
1268 if (!document || !document->frame())
1269 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr or);
1270
1271 document->frame()->eventHandler().activeIntervalTimerForTesting()->setManual ModeForTesting(manualMode);
1272 }
1273
1274 void Internals::fireActiveIntervalTimer(Document* document, ExceptionState& exce ptionState)
1275 {
1276 if (!document || !document->frame())
1277 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr or);
1278
1279 document->frame()->eventHandler().activeIntervalTimerForTesting()->manualFir eForTesting();
1280 }
1266 1281
1267 int Internals::lastSpellCheckRequestSequence(Document* document, ExceptionState& exceptionState) 1282 int Internals::lastSpellCheckRequestSequence(Document* document, ExceptionState& exceptionState)
1268 { 1283 {
1269 SpellCheckRequester* requester = spellCheckRequester(document); 1284 SpellCheckRequester* requester = spellCheckRequester(document);
1270 1285
1271 if (!requester) { 1286 if (!requester) {
1272 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr or); 1287 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr or);
1273 return -1; 1288 return -1;
1274 } 1289 }
1275 1290
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 if (view->compositor()) 2369 if (view->compositor())
2355 view->compositor()->updateCompositingLayers(); 2370 view->compositor()->updateCompositingLayers();
2356 } 2371 }
2357 2372
2358 void Internals::setZoomFactor(float factor) 2373 void Internals::setZoomFactor(float factor)
2359 { 2374 {
2360 frame()->setPageZoomFactor(factor); 2375 frame()->setPageZoomFactor(factor);
2361 } 2376 }
2362 2377
2363 } 2378 }
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