| 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);
|
|
|