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

Side by Side Diff: cc/test/FakeGraphicsContext3DTest.cpp

Issue 10914268: Change cc files from namespace WebCore to cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/test/FakeCCLayerTreeHostClient.h ('k') | cc/test/FakeWebGraphicsContext3D.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "config.h" 5 #include "config.h"
6 6
7 #include "FakeWebGraphicsContext3D.h" 7 #include "FakeWebGraphicsContext3D.h"
8 #include <gmock/gmock.h> 8 #include <gmock/gmock.h>
9 #include <gtest/gtest.h> 9 #include <gtest/gtest.h>
10 #include <wtf/OwnPtr.h> 10 #include <wtf/OwnPtr.h>
11 #include <wtf/PassOwnPtr.h> 11 #include <wtf/PassOwnPtr.h>
12 12
13 using namespace cc;
13 using namespace WebCore; 14 using namespace WebCore;
14 using namespace WebKit; 15 using namespace WebKit;
15 16
16 class ContextThatCountsMakeCurrents : public FakeWebGraphicsContext3D { 17 class ContextThatCountsMakeCurrents : public FakeWebGraphicsContext3D {
17 public: 18 public:
18 ContextThatCountsMakeCurrents() : m_makeCurrentCount(0) { } 19 ContextThatCountsMakeCurrents() : m_makeCurrentCount(0) { }
19 virtual bool makeContextCurrent() 20 virtual bool makeContextCurrent()
20 { 21 {
21 m_makeCurrentCount++; 22 m_makeCurrentCount++;
22 return true; 23 return true;
23 } 24 }
24 int makeCurrentCount() { return m_makeCurrentCount; } 25 int makeCurrentCount() { return m_makeCurrentCount; }
25 private: 26 private:
26 int m_makeCurrentCount; 27 int m_makeCurrentCount;
27 }; 28 };
28 29
29 30
30 TEST(FakeGraphicsContext3DTest, ContextCreationShouldNotMakeCurrent) 31 TEST(FakeGraphicsContext3DTest, ContextCreationShouldNotMakeCurrent)
31 { 32 {
32 OwnPtr<ContextThatCountsMakeCurrents> context(adoptPtr(new ContextThatCounts MakeCurrents)); 33 OwnPtr<ContextThatCountsMakeCurrents> context(adoptPtr(new ContextThatCounts MakeCurrents));
33 EXPECT_TRUE(context); 34 EXPECT_TRUE(context);
34 EXPECT_EQ(0, context->makeCurrentCount()); 35 EXPECT_EQ(0, context->makeCurrentCount());
35 } 36 }
36
OLDNEW
« no previous file with comments | « cc/test/FakeCCLayerTreeHostClient.h ('k') | cc/test/FakeWebGraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698