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

Unified Diff: extensions/renderer/script_context_browsertest.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/frame_load_waiter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context_browsertest.cc
diff --git a/extensions/renderer/script_context_browsertest.cc b/extensions/renderer/script_context_browsertest.cc
index cdbf1702ea6101fa8191a54c4c67bbca3062f8f5..aeb74e45495ad43f370df2ba29a5c9be312913c5 100644
--- a/extensions/renderer/script_context_browsertest.cc
+++ b/extensions/renderer/script_context_browsertest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "content/public/renderer/render_frame.h"
+#include "content/public/test/frame_load_waiter.h"
#include "content/public/test/render_view_test.h"
#include "extensions/renderer/script_context.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -21,8 +23,7 @@ class ScriptContextTest : public content::RenderViewTest {
}
};
-// http://crbug.com/391894
-TEST_F(ScriptContextTest, DISABLED_GetEffectiveDocumentURL) {
+TEST_F(ScriptContextTest, GetEffectiveDocumentURL) {
GURL top_url("http://example.com/");
GURL different_url("http://example.net/");
GURL blank_url("about:blank");
@@ -44,9 +45,7 @@ TEST_F(ScriptContextTest, DISABLED_GetEffectiveDocumentURL) {
ASSERT_TRUE(frame);
frame->loadHTMLString(frame_html, top_url);
- do {
- ProcessPendingMessages();
- } while (frame->isLoading());
+ content::FrameLoadWaiter(content::RenderFrame::FromWebFrame(frame)).Wait();
WebFrame* frame1 = frame->findChildByName("frame1");
ASSERT_TRUE(frame1);
@@ -63,9 +62,7 @@ TEST_F(ScriptContextTest, DISABLED_GetEffectiveDocumentURL) {
// Load a blank document in a frame from a different origin.
frame3->loadHTMLString(frame3_html, different_url);
- do {
- ProcessPendingMessages();
- } while (frame3->isLoading());
+ content::FrameLoadWaiter(content::RenderFrame::FromWebFrame(frame3)).Wait();
WebFrame* frame3_1 = frame->findChildByName("frame3");
ASSERT_TRUE(frame3_1);
« no previous file with comments | « content/test/frame_load_waiter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698