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 30 matching lines...) Expand all Loading... |
41 #include "wtf/RefPtr.h" | 41 #include "wtf/RefPtr.h" |
42 #include "wtf/testing/WTFTestHelpers.h" | 42 #include "wtf/testing/WTFTestHelpers.h" |
43 #include <gtest/gtest.h> | 43 #include <gtest/gtest.h> |
44 | 44 |
45 using namespace blink; | 45 using namespace blink; |
46 | 46 |
47 namespace { | 47 namespace { |
48 | 48 |
49 class DocumentMarkerControllerTest : public ::testing::Test { | 49 class DocumentMarkerControllerTest : public ::testing::Test { |
50 protected: | 50 protected: |
51 virtual void SetUp() OVERRIDE; | 51 virtual void SetUp() override; |
52 | 52 |
53 Document& document() const { return *m_document; } | 53 Document& document() const { return *m_document; } |
54 DocumentMarkerController& markerController() const { return m_document->mark
ers(); } | 54 DocumentMarkerController& markerController() const { return m_document->mark
ers(); } |
55 | 55 |
56 PassRefPtrWillBeRawPtr<Text> createTextNode(const char*); | 56 PassRefPtrWillBeRawPtr<Text> createTextNode(const char*); |
57 void markNodeContents(PassRefPtrWillBeRawPtr<Node>); | 57 void markNodeContents(PassRefPtrWillBeRawPtr<Node>); |
58 void setBodyInnerHTML(const char*); | 58 void setBodyInnerHTML(const char*); |
59 | 59 |
60 private: | 60 private: |
61 OwnPtr<DummyPageHolder> m_dummyPageHolder; | 61 OwnPtr<DummyPageHolder> m_dummyPageHolder; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 markNodeContents(parent); | 194 markNodeContents(parent); |
195 EXPECT_EQ(1u, markerController().markers().size()); | 195 EXPECT_EQ(1u, markerController().markers().size()); |
196 setBodyInnerHTML(""); | 196 setBodyInnerHTML(""); |
197 } | 197 } |
198 // No more reference to marked node. | 198 // No more reference to marked node. |
199 Heap::collectAllGarbage(); | 199 Heap::collectAllGarbage(); |
200 EXPECT_EQ(0u, markerController().markers().size()); | 200 EXPECT_EQ(0u, markerController().markers().size()); |
201 } | 201 } |
202 | 202 |
203 } | 203 } |
OLD | NEW |