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

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

Issue 22377008: Web Animations: Plug in PauseAnimationsForTesting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@numberOfActiveAnimations
Patch Set: Included core/animation/DocumentTimline.h in Internals.cpp to fix compile error. Created 7 years, 4 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 | « no previous file | 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 23 matching lines...) Expand all
34 #include "InternalSettings.h" 34 #include "InternalSettings.h"
35 #include "LayerRect.h" 35 #include "LayerRect.h"
36 #include "LayerRectList.h" 36 #include "LayerRectList.h"
37 #include "MallocStatistics.h" 37 #include "MallocStatistics.h"
38 #include "MockPagePopupDriver.h" 38 #include "MockPagePopupDriver.h"
39 #include "RuntimeEnabledFeatures.h" 39 #include "RuntimeEnabledFeatures.h"
40 #include "TypeConversions.h" 40 #include "TypeConversions.h"
41 #include "bindings/v8/ExceptionState.h" 41 #include "bindings/v8/ExceptionState.h"
42 #include "bindings/v8/SerializedScriptValue.h" 42 #include "bindings/v8/SerializedScriptValue.h"
43 #include "bindings/v8/V8ThrowException.h" 43 #include "bindings/v8/V8ThrowException.h"
44 #include "core/animation/DocumentTimeline.h"
44 #include "core/css/StyleSheetContents.h" 45 #include "core/css/StyleSheetContents.h"
45 #include "core/css/resolver/StyleResolver.h" 46 #include "core/css/resolver/StyleResolver.h"
46 #include "core/css/resolver/ViewportStyleResolver.h" 47 #include "core/css/resolver/ViewportStyleResolver.h"
47 #include "core/dom/ClientRect.h" 48 #include "core/dom/ClientRect.h"
48 #include "core/dom/ClientRectList.h" 49 #include "core/dom/ClientRectList.h"
49 #include "core/dom/DOMStringList.h" 50 #include "core/dom/DOMStringList.h"
50 #include "core/dom/Document.h" 51 #include "core/dom/Document.h"
51 #include "core/dom/DocumentMarker.h" 52 #include "core/dom/DocumentMarker.h"
52 #include "core/dom/DocumentMarkerController.h" 53 #include "core/dom/DocumentMarkerController.h"
53 #include "core/dom/Element.h" 54 #include "core/dom/Element.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 454 }
454 } 455 }
455 456
456 void Internals::pauseAnimations(double pauseTime, ExceptionState& es) 457 void Internals::pauseAnimations(double pauseTime, ExceptionState& es)
457 { 458 {
458 if (pauseTime < 0) { 459 if (pauseTime < 0) {
459 es.throwDOMException(InvalidAccessError); 460 es.throwDOMException(InvalidAccessError);
460 return; 461 return;
461 } 462 }
462 463
463 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled()) 464 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled())
465 frame()->document()->timeline()->pauseAnimationsForTesting(pauseTime);
466 else
464 frame()->animation()->pauseAnimationsForTesting(pauseTime); 467 frame()->animation()->pauseAnimationsForTesting(pauseTime);
465 } 468 }
466 469
467 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionState& es) co nst 470 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionState& es) co nst
468 { 471 {
469 if (root && root->isShadowRoot()) 472 if (root && root->isShadowRoot())
470 return toShadowRoot(root)->containsShadowElements(); 473 return toShadowRoot(root)->containsShadowElements();
471 474
472 es.throwDOMException(InvalidAccessError); 475 es.throwDOMException(InvalidAccessError);
473 return 0; 476 return 0;
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 return false; 2073 return false;
2071 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); 2074 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB);
2072 // To prevent tests that call loseSharedGraphicsContext3D from being 2075 // To prevent tests that call loseSharedGraphicsContext3D from being
2073 // flaky, we call finish so that the context is guaranteed to be lost 2076 // flaky, we call finish so that the context is guaranteed to be lost
2074 // synchronously (i.e. before returning). 2077 // synchronously (i.e. before returning).
2075 sharedContext->finish(); 2078 sharedContext->finish();
2076 return true; 2079 return true;
2077 } 2080 }
2078 2081
2079 } 2082 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698