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

Side by Side Diff: sky/engine/core/dom/DocumentTest.cpp

Issue 678003003: Begin to remove heap/* (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/dom/ElementData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27 matching lines...) Expand all
38 #include <gtest/gtest.h> 38 #include <gtest/gtest.h>
39 39
40 using namespace blink; 40 using namespace blink;
41 41
42 namespace { 42 namespace {
43 43
44 class DocumentTest : public ::testing::Test { 44 class DocumentTest : public ::testing::Test {
45 protected: 45 protected:
46 virtual void SetUp() override; 46 virtual void SetUp() override;
47 47
48 #if ENABLE(OILPAN)
49 virtual void TearDown() override
50 {
51 Heap::collectAllGarbage();
52 }
53 #endif
54
55 Document& document() const { return m_dummyPageHolder->document(); } 48 Document& document() const { return m_dummyPageHolder->document(); }
56 Page& page() const { return m_dummyPageHolder->page(); } 49 Page& page() const { return m_dummyPageHolder->page(); }
57 50
58 private: 51 private:
59 OwnPtr<DummyPageHolder> m_dummyPageHolder; 52 OwnPtr<DummyPageHolder> m_dummyPageHolder;
60 }; 53 };
61 54
62 void DocumentTest::SetUp() 55 void DocumentTest::SetUp()
63 { 56 {
64 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); 57 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 ::testing::Mock::VerifyAndClearExpectations(observer2.get()); 126 ::testing::Mock::VerifyAndClearExpectations(observer2.get());
134 } 127 }
135 128
136 // observer2 destroyed 129 // observer2 destroyed
137 EXPECT_CALL(*observer1, didChangeVisibilityState(PageVisibilityStateHidden)) .Times(0); 130 EXPECT_CALL(*observer1, didChangeVisibilityState(PageVisibilityStateHidden)) .Times(0);
138 EXPECT_CALL(*observer1, didChangeVisibilityState(PageVisibilityStateVisible) ).Times(1); 131 EXPECT_CALL(*observer1, didChangeVisibilityState(PageVisibilityStateVisible) ).Times(1);
139 page().setVisibilityState(PageVisibilityStateVisible, false); 132 page().setVisibilityState(PageVisibilityStateVisible, false);
140 } 133 }
141 134
142 } // unnamed namespace 135 } // unnamed namespace
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/dom/ElementData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698