| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index 133890bf8e3b1d5ef443ef0b8c5d623a51f3c1c5..4efb874ee9d08256cbaada6d60f21cff80000e27 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -95,6 +95,7 @@
|
| #include "core/platform/Cursor.h"
|
| #include "core/platform/Language.h"
|
| #include "core/platform/graphics/IntRect.h"
|
| +#include "core/platform/graphics/gpu/SharedGraphicsContext3D.h"
|
| #include "core/rendering/RenderMenuList.h"
|
| #include "core/rendering/RenderObject.h"
|
| #include "core/rendering/RenderTreeAsText.h"
|
| @@ -1963,4 +1964,17 @@ bool Internals::isSelectPopupVisible(Node* node)
|
| return menuList->popupIsVisible();
|
| }
|
|
|
| +bool Internals::loseSharedGraphicsContext3D()
|
| +{
|
| + RefPtr<GraphicsContext3D> sharedContext = SharedGraphicsContext3D::get();
|
| + if (!sharedContext)
|
| + return false;
|
| + sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB);
|
| + // To prevent tests that call loseSharedGraphicsContext3D from being
|
| + // flaky, we call finish so that the context is guaranteed to be lost
|
| + // synchronously (i.e. before returning).
|
| + sharedContext->finish();
|
| + return true;
|
| +}
|
| +
|
| }
|
|
|