OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014, Google Inc. All rights reserved. | 2 * Copyright (c) 2014, 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 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/dom/Document.h" | 32 #include "core/dom/Document.h" |
33 | 33 |
34 #include "core/html/HTMLHeadElement.h" | 34 #include "core/html/HTMLHeadElement.h" |
35 #include "core/html/HTMLLinkElement.h" | 35 #include "core/html/HTMLLinkElement.h" |
36 #include "core/testing/DummyPageHolder.h" | 36 #include "core/testing/DummyPageHolder.h" |
| 37 #include "platform/heap/Handle.h" |
37 #include <gmock/gmock.h> | 38 #include <gmock/gmock.h> |
38 #include <gtest/gtest.h> | 39 #include <gtest/gtest.h> |
39 | 40 |
40 using namespace blink; | 41 using namespace blink; |
41 | 42 |
42 namespace { | 43 namespace { |
43 | 44 |
44 class DocumentTest : public ::testing::Test { | 45 class DocumentTest : public ::testing::Test { |
45 protected: | 46 protected: |
46 virtual void SetUp() OVERRIDE; | 47 virtual void SetUp() OVERRIDE; |
47 | 48 |
| 49 #if ENABLE(OILPAN) |
| 50 virtual void TearDown() OVERRIDE |
| 51 { |
| 52 Heap::collectAllGarbage(); |
| 53 } |
| 54 #endif |
| 55 |
48 Document& document() const { return m_dummyPageHolder->document(); } | 56 Document& document() const { return m_dummyPageHolder->document(); } |
49 Page& page() const { return m_dummyPageHolder->page(); } | 57 Page& page() const { return m_dummyPageHolder->page(); } |
50 | 58 |
51 private: | 59 private: |
52 OwnPtr<DummyPageHolder> m_dummyPageHolder; | 60 OwnPtr<DummyPageHolder> m_dummyPageHolder; |
53 }; | 61 }; |
54 | 62 |
55 void DocumentTest::SetUp() | 63 void DocumentTest::SetUp() |
56 { | 64 { |
57 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); | 65 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 EXPECT_EQ(link, document().linkManifest()); | 206 EXPECT_EQ(link, document().linkManifest()); |
199 link->setAttribute(blink::HTMLNames::typeAttr, "image/gif"); | 207 link->setAttribute(blink::HTMLNames::typeAttr, "image/gif"); |
200 EXPECT_EQ(link, document().linkManifest()); | 208 EXPECT_EQ(link, document().linkManifest()); |
201 link->setAttribute(blink::HTMLNames::sizesAttr, "16x16"); | 209 link->setAttribute(blink::HTMLNames::sizesAttr, "16x16"); |
202 EXPECT_EQ(link, document().linkManifest()); | 210 EXPECT_EQ(link, document().linkManifest()); |
203 link->setAttribute(blink::HTMLNames::mediaAttr, "print"); | 211 link->setAttribute(blink::HTMLNames::mediaAttr, "print"); |
204 EXPECT_EQ(link, document().linkManifest()); | 212 EXPECT_EQ(link, document().linkManifest()); |
205 } | 213 } |
206 | 214 |
207 } // unnamed namespace | 215 } // unnamed namespace |
OLD | NEW |