Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(745)

Unified Diff: gpu/command_buffer/service/program_manager_unittest.cc

Issue 10812002: Bug fixes for getTranslatedShader (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: last fixes Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | gpu/command_buffer/service/shader_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager_unittest.cc
diff --git a/gpu/command_buffer/service/program_manager_unittest.cc b/gpu/command_buffer/service/program_manager_unittest.cc
index e1cc44158d65e1a6cfc2bb7af0554f2da5d1b5bb..7a9c9f46af3a1fa0e6227dbda599e3d26578c1b3 100644
--- a/gpu/command_buffer/service/program_manager_unittest.cc
+++ b/gpu/command_buffer/service/program_manager_unittest.cc
@@ -1383,13 +1383,17 @@ TEST_F(ProgramManagerWithCacheTest, CorrectCompileOnSourceChangeNoCompile) {
SetExpectationsForNoCompile(new_vertex_shader);
manager_.DoCompileShader(new_vertex_shader, NULL, NULL);
+ EXPECT_EQ(ShaderManager::ShaderInfo::PENDING_DEFERRED_COMPILE,
+ new_vertex_shader->compilation_status());
new_vertex_shader->UpdateSource("different!");
EXPECT_EQ(original_source,
*new_vertex_shader->deferred_compilation_source());
- EXPECT_FALSE(new_vertex_shader->source_compiled());
- EXPECT_FALSE(fragment_shader_->source_compiled());
+ EXPECT_EQ(ShaderManager::ShaderInfo::PENDING_DEFERRED_COMPILE,
+ new_vertex_shader->compilation_status());
+ EXPECT_EQ(ShaderManager::ShaderInfo::PENDING_DEFERRED_COMPILE,
+ fragment_shader_->compilation_status());
SetExpectationsForNoCompile(fragment_shader_);
SetExpectationsForNotCachingProgram(program_info,
@@ -1441,8 +1445,10 @@ TEST_F(ProgramManagerWithCacheTest, CorrectCompileOnSourceChangeWithCompile) {
EXPECT_EQ(differentSource,
*new_vertex_shader->deferred_compilation_source());
- EXPECT_TRUE(new_vertex_shader->source_compiled());
- EXPECT_FALSE(fragment_shader_->source_compiled());
+ EXPECT_EQ(ShaderManager::ShaderInfo::COMPILED,
+ new_vertex_shader->compilation_status());
+ EXPECT_EQ(ShaderManager::ShaderInfo::PENDING_DEFERRED_COMPILE,
+ fragment_shader_->compilation_status());
// so we don't recompile because we were pending originally
SetExpectationsForNoCompile(new_vertex_shader);
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | gpu/command_buffer/service/shader_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698