[chromium] Need a way to test lost compositor context recovery
[WebKit-https.git] / Tools / DumpRenderTree / chromium / LayoutTestController.cpp
index 409f853..ad23aab 100644 (file)
@@ -118,6 +118,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("hasSpellingMarker", &LayoutTestController::hasSpellingMarker);
     bindMethod("isCommandEnabled", &LayoutTestController::isCommandEnabled);
     bindMethod("layerTreeAsText", &LayoutTestController::layerTreeAsText);
+    bindMethod("loseCompositorContext", &LayoutTestController::loseCompositorContext);
     bindMethod("markerTextForListItem", &LayoutTestController::markerTextForListItem);
     bindMethod("notifyDone", &LayoutTestController::notifyDone);
     bindMethod("numberOfActiveAnimations", &LayoutTestController::numberOfActiveAnimations);
@@ -1721,6 +1722,11 @@ void LayoutTestController::layerTreeAsText(const CppArgumentList& args, CppVaria
     result->set(m_shell->webView()->mainFrame()->layerTreeAsText(m_showDebugLayerTree).utf8());
 }
 
+void LayoutTestController::loseCompositorContext(const CppArgumentList&, CppVariant*)
+{
+    m_shell->webView()->loseCompositorContext();
+}
+
 void LayoutTestController::markerTextForListItem(const CppArgumentList& args, CppVariant* result)
 {
     WebElement element;