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

Unified Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 995773002: Add testRunner.dumpNavigationPolicy() to be able to the the navigation policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 9 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/shell/renderer/test_runner/test_runner.cc
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index da674600ea976441620badaecfbedd3e97e6b433..d56795220cd3c76edf3ade0975ceed119dc5aeab 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -261,6 +261,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void SetUseMockTheme(bool use);
void WaitUntilExternalURLLoad();
void DumpDragImage();
+ void DumpNavigationPolicy();
void ShowWebInspector(gin::Arguments* args);
void CloseWebInspector();
bool IsChooserShown();
@@ -500,6 +501,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
.SetMethod("waitUntilExternalURLLoad",
&TestRunnerBindings::WaitUntilExternalURLLoad)
.SetMethod("dumpDragImage", &TestRunnerBindings::DumpDragImage)
+ .SetMethod("dumpNavigationPolicy",
+ &TestRunnerBindings::DumpNavigationPolicy)
.SetMethod("showWebInspector", &TestRunnerBindings::ShowWebInspector)
.SetMethod("closeWebInspector", &TestRunnerBindings::CloseWebInspector)
.SetMethod("isChooserShown", &TestRunnerBindings::IsChooserShown)
@@ -1237,6 +1240,11 @@ void TestRunnerBindings::DumpDragImage() {
runner_->DumpDragImage();
}
+void TestRunnerBindings::DumpNavigationPolicy() {
+ if (runner_)
+ runner_->DumpNavigationPolicy();
+}
+
void TestRunnerBindings::ShowWebInspector(gin::Arguments* args) {
if (runner_) {
std::string settings;
@@ -1669,6 +1677,7 @@ void TestRunner::Reset() {
dump_back_forward_list_ = false;
dump_selection_rect_ = false;
dump_drag_image_ = false;
+ dump_navigation_policy_ = false;
test_repaint_ = false;
sweep_horizontally_ = false;
is_printing_ = false;
@@ -1943,6 +1952,10 @@ bool TestRunner::shouldDumpDragImage() {
return dump_drag_image_;
}
+bool TestRunner::shouldDumpNavigationPolicy() const {
+ return dump_navigation_policy_;
+}
+
bool TestRunner::midiAccessorResult() {
return midi_accessor_result_;
}
@@ -2744,6 +2757,10 @@ void TestRunner::DumpDragImage() {
dump_drag_image_ = true;
}
+void TestRunner::DumpNavigationPolicy() {
+ dump_navigation_policy_ = true;
+}
+
void TestRunner::CloseWebInspector() {
delegate_->CloseDevTools();
}
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | content/shell/renderer/test_runner/web_test_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698