OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 #include "core/platform/graphics/GraphicsContext3D.h" | 35 #include "core/platform/graphics/GraphicsContext3D.h" |
36 #include "core/platform/testing/FakeWebGraphicsContext3D.h" | 36 #include "core/platform/testing/FakeWebGraphicsContext3D.h" |
37 #include "public/platform/Platform.h" | 37 #include "public/platform/Platform.h" |
38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
39 | 39 |
40 #include <gmock/gmock.h> | 40 #include <gmock/gmock.h> |
41 #include <gtest/gtest.h> | 41 #include <gtest/gtest.h> |
42 | 42 |
43 using namespace WebCore; | 43 using namespace WebCore; |
44 using namespace WebKit; | 44 using namespace blink; |
45 using testing::Test; | 45 using testing::Test; |
46 using testing::_; | 46 using testing::_; |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
50 class FakeContextEvictionManager : public ContextEvictionManager { | 50 class FakeContextEvictionManager : public ContextEvictionManager { |
51 public: | 51 public: |
52 void forciblyLoseOldestContext(const String& reason) { } | 52 void forciblyLoseOldestContext(const String& reason) { } |
53 IntSize oldestContextSize() { return IntSize(); } | 53 IntSize oldestContextSize() { return IntSize(); } |
54 }; | 54 }; |
(...skipping 14 matching lines...) Expand all Loading... |
69 }; | 69 }; |
70 | 70 |
71 namespace { | 71 namespace { |
72 | 72 |
73 TEST_F(DrawingBufferTest, verifyNoNewBuffersAfterContextLostWithMailboxes) | 73 TEST_F(DrawingBufferTest, verifyNoNewBuffersAfterContextLostWithMailboxes) |
74 { | 74 { |
75 // Tell the buffer its contents changed and context was lost. | 75 // Tell the buffer its contents changed and context was lost. |
76 m_drawingBuffer->markContentsChanged(); | 76 m_drawingBuffer->markContentsChanged(); |
77 m_drawingBuffer->releaseResources(); | 77 m_drawingBuffer->releaseResources(); |
78 | 78 |
79 WebKit::WebExternalTextureMailbox mailbox; | 79 blink::WebExternalTextureMailbox mailbox; |
80 EXPECT_FALSE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); | 80 EXPECT_FALSE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); |
81 } | 81 } |
82 | 82 |
83 } // namespace | 83 } // namespace |
OLD | NEW |