| Index: Source/core/testing/Internals.cpp
 | 
| ===================================================================
 | 
| --- Source/core/testing/Internals.cpp	(revision 159992)
 | 
| +++ Source/core/testing/Internals.cpp	(working copy)
 | 
| @@ -1858,6 +1858,12 @@
 | 
|          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 @@
 | 
|      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);
 | 
|  }
 | 
| +
 | 
| +}
 | 
| 
 |