| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index b8189bf9a9fbbdf03d97e56b402804831fa9afa6..6e5b1f0424b2c49b9cfd79656efbefa6753af543 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -100,6 +100,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"
|
| @@ -2054,4 +2055,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;
|
| +}
|
| +
|
| }
|
|
|