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

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

Issue 709203002: Remove more oilpan. (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/DocumentStyleSheetCollection.h ('k') | sky/engine/core/dom/ElementData.h » ('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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 private: 50 private:
51 OwnPtr<DummyPageHolder> m_dummyPageHolder; 51 OwnPtr<DummyPageHolder> m_dummyPageHolder;
52 }; 52 };
53 53
54 void DocumentTest::SetUp() 54 void DocumentTest::SetUp()
55 { 55 {
56 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); 56 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
57 } 57 }
58 58
59 class MockDocumentVisibilityObserver 59 class MockDocumentVisibilityObserver : public DocumentVisibilityObserver {
60 : public DummyBase<MockDocumentVisibilityObserver>
61 , public DocumentVisibilityObserver {
62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockDocumentVisibilityObserver);
63 public: 60 public:
64 static PassOwnPtr<MockDocumentVisibilityObserver> create(Document& document) 61 static PassOwnPtr<MockDocumentVisibilityObserver> create(Document& document)
65 { 62 {
66 return adoptPtr(new MockDocumentVisibilityObserver(document)); 63 return adoptPtr(new MockDocumentVisibilityObserver(document));
67 } 64 }
68 65
69 virtual void trace(Visitor*) { } 66 virtual void trace(Visitor*) { }
70 67
71 MOCK_METHOD1(didChangeVisibilityState, void(PageVisibilityState)); 68 MOCK_METHOD1(didChangeVisibilityState, void(PageVisibilityState));
72 69
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ::testing::Mock::VerifyAndClearExpectations(observer2.get()); 122 ::testing::Mock::VerifyAndClearExpectations(observer2.get());
126 } 123 }
127 124
128 // observer2 destroyed 125 // observer2 destroyed
129 EXPECT_CALL(*observer1, didChangeVisibilityState(PageVisibilityStateHidden)) .Times(0); 126 EXPECT_CALL(*observer1, didChangeVisibilityState(PageVisibilityStateHidden)) .Times(0);
130 EXPECT_CALL(*observer1, didChangeVisibilityState(PageVisibilityStateVisible) ).Times(1); 127 EXPECT_CALL(*observer1, didChangeVisibilityState(PageVisibilityStateVisible) ).Times(1);
131 page().setVisibilityState(PageVisibilityStateVisible, false); 128 page().setVisibilityState(PageVisibilityStateVisible, false);
132 } 129 }
133 130
134 } // unnamed namespace 131 } // unnamed namespace
OLDNEW
« no previous file with comments | « sky/engine/core/dom/DocumentStyleSheetCollection.h ('k') | sky/engine/core/dom/ElementData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698