summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/wtf/RefPtrTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/Source/wtf/RefPtrTest.cpp')
-rw-r--r--third_party/WebKit/Source/wtf/RefPtrTest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/wtf/RefPtrTest.cpp b/third_party/WebKit/Source/wtf/RefPtrTest.cpp
index 7f37fc3..a21b4f7 100644
--- a/third_party/WebKit/Source/wtf/RefPtrTest.cpp
+++ b/third_party/WebKit/Source/wtf/RefPtrTest.cpp
@@ -5,6 +5,7 @@
#include "wtf/RefPtr.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "wtf/RefCounted.h"
#include "wtf/text/StringImpl.h"
namespace WTF {
@@ -28,4 +29,15 @@ TEST(RefPtrTest, MoveAssignmentOperator)
EXPECT_TRUE(!a);
}
+class RefCountedClass : public RefCounted<RefCountedClass> {
+};
+
+TEST(RefPtrTest, ConstObject)
+{
+ // This test is only to ensure we force the compilation of a const RefCounted
+ // object to ensure the generated code compiles.
+ RefPtr<const RefCountedClass> ptrToConst = adoptRef(new RefCountedClass());
+}
+
+
} // namespace WTF