| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // These tests are run twice: | 5 // These tests are run twice: |
| 6 // Once in a gpu test with an in-process WebGraphicsContext3D. | 6 // Once in a gpu test with an in-process WebGraphicsContext3D. |
| 7 // Once in a browsertest with a gpu-process WebGraphicsContext3D. | 7 // Once in a browsertest with a gpu-process WebGraphicsContext3D. |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 gpu::SyncToken sync_token; | 62 gpu::SyncToken sync_token; |
| 63 TestSignalSyncToken(sync_token); | 63 TestSignalSyncToken(sync_token); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 CONTEXT_TEST_F(SignalTest, InvalidSignalSyncTokenTest) { | 66 CONTEXT_TEST_F(SignalTest, InvalidSignalSyncTokenTest) { |
| 67 if (!context_) | 67 if (!context_) |
| 68 return; | 68 return; |
| 69 | 69 |
| 70 // Signalling something that doesn't exist should run the callback | 70 // Signalling something that doesn't exist should run the callback |
| 71 // immediately. | 71 // immediately. |
| 72 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, | 72 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, |
| 73 0, | 73 gpu::CommandBufferId::FromUnsafeValue(1297824234), |
| 74 1297824234, | |
| 75 9123743439); | 74 9123743439); |
| 76 TestSignalSyncToken(sync_token); | 75 TestSignalSyncToken(sync_token); |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 CONTEXT_TEST_F(SignalTest, BasicSignalQueryTest) { | 78 CONTEXT_TEST_F(SignalTest, BasicSignalQueryTest) { |
| 80 if (!context_) | 79 if (!context_) |
| 81 return; | 80 return; |
| 82 | 81 |
| 83 unsigned query = context_->createQueryEXT(); | 82 unsigned query = context_->createQueryEXT(); |
| 84 context_->beginQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM, query); | 83 context_->beginQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM, query); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 105 // immediately. | 104 // immediately. |
| 106 TestSignalQuery(928729087); | 105 TestSignalQuery(928729087); |
| 107 TestSignalQuery(928729086); | 106 TestSignalQuery(928729086); |
| 108 TestSignalQuery(928729085); | 107 TestSignalQuery(928729085); |
| 109 TestSignalQuery(928729083); | 108 TestSignalQuery(928729083); |
| 110 TestSignalQuery(928729082); | 109 TestSignalQuery(928729082); |
| 111 TestSignalQuery(928729081); | 110 TestSignalQuery(928729081); |
| 112 }; | 111 }; |
| 113 | 112 |
| 114 }; | 113 }; |
| OLD | NEW |