diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
commit | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch) | |
tree | 52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/WebKit/chromium/tests/FakeGraphicsContext3DTest.cpp | |
parent | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff) | |
download | qtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz |
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/WebKit/chromium/tests/FakeGraphicsContext3DTest.cpp')
-rw-r--r-- | Source/WebKit/chromium/tests/FakeGraphicsContext3DTest.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Source/WebKit/chromium/tests/FakeGraphicsContext3DTest.cpp b/Source/WebKit/chromium/tests/FakeGraphicsContext3DTest.cpp index c2311a843..2b76b80ad 100644 --- a/Source/WebKit/chromium/tests/FakeGraphicsContext3DTest.cpp +++ b/Source/WebKit/chromium/tests/FakeGraphicsContext3DTest.cpp @@ -101,13 +101,13 @@ private: }; -TEST(FakeGraphicsContext3DTest, ContextForThisThreadShouldMakeCurrent) +TEST(FakeGraphicsContext3DTest, ContextForThisThreadShouldNotMakeCurrent) { GraphicsContext3D::Attributes attrs; RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new ContextThatCountsMakeCurrents()), attrs, 0, GraphicsContext3D::RenderDirectlyToHostWindow, GraphicsContext3DPrivate::ForUseOnThisThread); EXPECT_TRUE(context); ContextThatCountsMakeCurrents& mockContext = *static_cast<ContextThatCountsMakeCurrents*>(GraphicsContext3DPrivate::extractWebGraphicsContext3D(context.get())); - EXPECT_EQ(1, mockContext.makeCurrentCount()); + EXPECT_EQ(0, mockContext.makeCurrentCount()); } TEST(FakeGraphicsContext3DTest, ContextForAnotherThreadShouldNotMakeCurrent) @@ -119,15 +119,3 @@ TEST(FakeGraphicsContext3DTest, ContextForAnotherThreadShouldNotMakeCurrent) EXPECT_EQ(0, mockContext.makeCurrentCount()); } -class ContextWithMakeCurrentThatFails : public FakeWebGraphicsContext3D { -public: - ContextWithMakeCurrentThatFails() { } - virtual bool makeContextCurrent() { return false; } -}; - -TEST(FakeGraphicsContext3DTest, ContextForThisThreadFailsWhenMakeCurrentFails) -{ - GraphicsContext3D::Attributes attrs; - RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new ContextWithMakeCurrentThatFails()), attrs, 0, GraphicsContext3D::RenderDirectlyToHostWindow, GraphicsContext3DPrivate::ForUseOnThisThread); - EXPECT_FALSE(context); -} |