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

Unified Diff: content/test/layouttest_support.cc

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. Created 3 years, 6 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/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 64cbf8745dd3fc6c946f4e9a849a6ee48621afb4..3d11b827bf04fa690dd5ee01c859cbca2b1e74b8 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -5,6 +5,9 @@
#include "content/public/test/layouttest_support.h"
#include <stddef.h>
+
+#include <algorithm>
+#include <unordered_map>
#include <utility>
#include "base/callback.h"
@@ -260,7 +263,10 @@ void FetchManifest(blink::WebView* view, const GURL& url,
// A raw pointer is used instead of a scoped_ptr as base::Passes passes
// ownership and thus nulls the scoped_ptr. On MSVS this happens before
// the call to Start, resulting in a crash.
- fetcher->Start(view->MainFrame(), false,
+ CHECK(view->MainFrame()->IsWebLocalFrame())
+ << "This function cannot be called if the main frame is not a "
+ "local frame.";
+ fetcher->Start(view->MainFrame()->ToWebLocalFrame(), false,
base::Bind(&FetchManifestDoneCallback,
base::Passed(&autodeleter), callback));
}
@@ -551,7 +557,7 @@ std::string DumpHistoryItem(HistoryEntry::HistoryNode* node,
const blink::WebHistoryItem& item = node->item();
if (is_current_index) {
result.append("curr->");
- result.append(indent - 6, ' '); // 6 == "curr->".length()
+ result.append(indent - 6, ' '); // 6 == "curr->".length()
} else {
result.append(indent, ' ');
}
« no previous file with comments | « content/shell/test_runner/text_input_controller.cc ('k') | extensions/renderer/api/automation/automation_api_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698