Index: cc/test/test_web_graphics_context_3d.cc |
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc |
index 8f690b735ecd3c760e5fb984097739a8af3bbdd6..bf7387a3dc866691a2b6ecd227b7a28da8d27aea 100644 |
--- a/cc/test/test_web_graphics_context_3d.cc |
+++ b/cc/test/test_web_graphics_context_3d.cc |
@@ -646,6 +646,10 @@ GLuint64 TestWebGraphicsContext3D::insertFenceSync() { |
void TestWebGraphicsContext3D::genSyncToken(GLuint64 fence_sync, |
GLbyte* sync_token) { |
+ // Don't return a valid sync token if context is lost. This matches behavior |
+ // of CommandBufferProxyImpl. |
+ if (context_lost_) |
+ return; |
gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0, |
gpu::CommandBufferId(), fence_sync); |
sync_token_data.SetVerifyFlush(); |