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

Side by Side Diff: third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp

Issue 2940863005: Move loading methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Fixing build problems introduced by rebasing... Created 3 years, 6 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/wake_lock/ScreenWakeLock.h" 5 #include "modules/wake_lock/ScreenWakeLock.h"
6 6
7 #include "core/dom/DOMImplementation.h" 7 #include "core/dom/DOMImplementation.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/DocumentInit.h" 9 #include "core/dom/DocumentInit.h"
10 #include "core/frame/FrameTestHelpers.h" 10 #include "core/frame/FrameTestHelpers.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 void TearDown() override { 92 void TearDown() override {
93 Platform::Current() 93 Platform::Current()
94 ->GetURLLoaderMockFactory() 94 ->GetURLLoaderMockFactory()
95 ->UnregisterAllURLsAndClearMemoryCache(); 95 ->UnregisterAllURLsAndClearMemoryCache();
96 testing::RunPendingTasks(); 96 testing::RunPendingTasks();
97 } 97 }
98 98
99 void LoadFrame() { 99 void LoadFrame() {
100 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrame(), 100 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrameImpl(),
101 "http://example.com/foo.html"); 101 "http://example.com/foo.html");
102 web_view_helper_.WebView()->UpdateAllLifecyclePhases(); 102 web_view_helper_.WebView()->UpdateAllLifecyclePhases();
103 } 103 }
104 104
105 LocalFrame* GetFrame() { 105 LocalFrame* GetFrame() {
106 DCHECK(web_view_helper_.WebView()); 106 DCHECK(web_view_helper_.WebView());
107 DCHECK(web_view_helper_.WebView()->MainFrameImpl()); 107 DCHECK(web_view_helper_.WebView()->MainFrameImpl());
108 return web_view_helper_.WebView()->MainFrameImpl()->GetFrame(); 108 return web_view_helper_.WebView()->MainFrameImpl()->GetFrame();
109 } 109 }
110 110
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 SetKeepAwake(true); 208 SetKeepAwake(true);
209 LoadFrame(); 209 LoadFrame();
210 210
211 EXPECT_FALSE(ScreenKeepAwake()); 211 EXPECT_FALSE(ScreenKeepAwake());
212 EXPECT_FALSE(ClientKeepScreenAwake()); 212 EXPECT_FALSE(ClientKeepScreenAwake());
213 } 213 }
214 214
215 } // namespace 215 } // namespace
216 } // namespace blink 216 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698