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

Side by Side Diff: content/browser/aura/image_transport_factory_browsertest.cc

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "base/run_loop.h" 5 #include "base/run_loop.h"
6 #include "content/browser/aura/image_transport_factory.h" 6 #include "content/browser/aura/image_transport_factory.h"
7 #include "content/public/browser/gpu_data_manager.h" 7 #include "content/public/browser/gpu_data_manager.h"
8 #include "content/test/content_browser_test.h" 8 #include "content/test/content_browser_test.h"
9 #include "gpu/GLES2/gl2extchromium.h" 9 #include "gpu/GLES2/gl2extchromium.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 29 matching lines...) Expand all
40 scoped_refptr<ui::Texture> texture = factory->CreateTransportClient(1.f); 40 scoped_refptr<ui::Texture> texture = factory->CreateTransportClient(1.f);
41 ASSERT_TRUE(texture.get()); 41 ASSERT_TRUE(texture.get());
42 42
43 MockImageTransportFactoryObserver observer; 43 MockImageTransportFactoryObserver observer;
44 factory->AddObserver(&observer); 44 factory->AddObserver(&observer);
45 45
46 base::RunLoop run_loop; 46 base::RunLoop run_loop;
47 EXPECT_CALL(observer, OnLostResources()) 47 EXPECT_CALL(observer, OnLostResources())
48 .WillOnce(testing::InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); 48 .WillOnce(testing::InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
49 49
50 WebKit::WebGraphicsContext3D* context = texture->HostContext3D(); 50 blink::WebGraphicsContext3D* context = texture->HostContext3D();
51 context->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, 51 context->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
52 GL_INNOCENT_CONTEXT_RESET_ARB); 52 GL_INNOCENT_CONTEXT_RESET_ARB);
53 53
54 run_loop.Run(); 54 run_loop.Run();
55 EXPECT_FALSE(texture->HostContext3D()); 55 EXPECT_FALSE(texture->HostContext3D());
56 EXPECT_EQ(0u, texture->PrepareTexture()); 56 EXPECT_EQ(0u, texture->PrepareTexture());
57 57
58 factory->RemoveObserver(&observer); 58 factory->RemoveObserver(&observer);
59 } 59 }
60 60
61 } // anonymous namespace 61 } // anonymous namespace
62 } // namespace content 62 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/aura/image_transport_factory.h ('k') | content/browser/aura/no_transport_image_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698