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

Unified Diff: content/test/frame_load_waiter.h

Issue 251903006: Attempt 2 to enable async data: URL loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix translation tests 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
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/test/frame_load_waiter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/frame_load_waiter.h
diff --git a/content/test/frame_load_waiter.h b/content/test/frame_load_waiter.h
new file mode 100644
index 0000000000000000000000000000000000000000..81b0baaa0862eceed1d2b2d14f1589fc4ac1a648
--- /dev/null
+++ b/content/test/frame_load_waiter.h
@@ -0,0 +1,32 @@
+// 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.
+
+#ifndef CONTENT_TEST_FRAME_LOAD_WAITER_H_
+#define CONTENT_TEST_FRAME_LOAD_WAITER_H_
+
+#include "base/macros.h"
+#include "base/run_loop.h"
+#include "content/public/renderer/render_frame_observer.h"
+
+namespace content {
+
+// Helper class to spin the run loop when waiting for a frame load to complete.
+// Blink uses a threaded HTML parser, so it's no longer sufficient to just spin
+// the run loop once to process all pending messages.
+class FrameLoadWaiter : public RenderFrameObserver {
+ public:
+ explicit FrameLoadWaiter(RenderFrame* frame);
+ void Wait();
+
+ private:
+ virtual void DidFinishLoad() OVERRIDE;
+
+ base::RunLoop run_loop_;
+
+ DISALLOW_COPY_AND_ASSIGN(FrameLoadWaiter);
+};
+
+} // namespace content
+
+#endif // CONTENT_TEST_FRAME_LOAD_WAITER_H_
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/test/frame_load_waiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698