| Index: Source/core/testing/Internals.cpp
 | 
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
 | 
| index 6ee18f61e55afe37d3068e3a3602f06574072e3f..27c1393738151cdcab69fdd49717704d769b803b 100644
 | 
| --- a/Source/core/testing/Internals.cpp
 | 
| +++ b/Source/core/testing/Internals.cpp
 | 
| @@ -1858,6 +1858,12 @@ String Internals::mainThreadScrollingReasons(Document* document, ExceptionState&
 | 
|          return String();
 | 
|      }
 | 
|  
 | 
| +    // Force a re-layout and a compositing update.
 | 
| +    document->updateLayout();
 | 
| +    RenderView* view = document->renderView();
 | 
| +    if (view->compositor())
 | 
| +        view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDeferredWork);
 | 
| +
 | 
|      Page* page = document->page();
 | 
|      if (!page)
 | 
|          return String();
 | 
| @@ -2291,4 +2297,18 @@ bool Internals::loseSharedGraphicsContext3D()
 | 
|      return true;
 | 
|  }
 | 
|  
 | 
| +void Internals::forceCompositingUpdate(Document* document, ExceptionState& es)
 | 
| +{
 | 
| +    if (!document || !document->renderView()) {
 | 
| +        es.throwUninformativeAndGenericDOMException(InvalidAccessError);
 | 
| +        return;
 | 
| +    }
 | 
| +
 | 
| +    document->updateLayout();
 | 
| +
 | 
| +    RenderView* view = document->renderView();
 | 
| +    if (view->compositor())
 | 
| +        view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDeferredWork);
 | 
| +}
 | 
| +
 | 
|  }
 | 
| 
 |