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

Side by Side Diff: content/test/frame_load_waiter.cc

Issue 537023002: Change ScriptContextTest.GetEffectiveDocumentURL to use FrameLoadWaiter and re-enable the test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 6 years, 3 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
« no previous file with comments | « content/test/frame_load_waiter.h ('k') | extensions/renderer/script_context_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/test/frame_load_waiter.h"
6
7 #include "base/location.h"
8 #include "base/message_loop/message_loop.h"
9
10 namespace content {
11
12 FrameLoadWaiter::FrameLoadWaiter(RenderFrame* frame)
13 : RenderFrameObserver(frame) {
14 }
15
16 void FrameLoadWaiter::Wait() {
17 // Pump messages until Blink's threaded HTML parser finishes.
18 run_loop_.Run();
19 }
20
21 void FrameLoadWaiter::DidFinishLoad() {
22 // Post a task to quit instead of quitting directly, since the load completion
23 // may trigger other IPCs that tests are expecting.
24 base::MessageLoop::current()->PostTask(FROM_HERE, run_loop_.QuitClosure());
25 }
26
27 } // namespace content
OLDNEW
« no previous file with comments | « content/test/frame_load_waiter.h ('k') | extensions/renderer/script_context_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698