Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: Source/core/dom/DocumentTest.cpp

Issue 412173002: Oilpan: fix reported unit test leaks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationTimelineTest.cpp ('k') | Source/modules/websockets/NewWebSocketChannelImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698