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

Unified Diff: content/public/test/frame_load_waiter.cc

Issue 251903006: Attempt 2 to enable async data: URL loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better fix for BrowserPlugin tests from lazyboy@ Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/frame_load_waiter.cc
diff --git a/content/public/test/frame_load_waiter.cc b/content/public/test/frame_load_waiter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..df1e1896e12095ef8cda898f00d9d562b4b9b340
--- /dev/null
+++ b/content/public/test/frame_load_waiter.cc
@@ -0,0 +1,23 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/test/frame_load_waiter.h"
+
+#include "base/message_loop/message_loop.h"
+
+namespace content {
+
+FrameLoadWaiter::FrameLoadWaiter(RenderView* view) : RenderViewObserver(view) {
+}
+
+void FrameLoadWaiter::Wait() {
+ // Pump messages until Blink's threaded HTML parser finishes.
+ run_loop_.Run();
+}
+
+void FrameLoadWaiter::DidFinishLoad(blink::WebLocalFrame* frame) {
+ run_loop_.Quit();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698