[go: nahoru, domu]

Always run after-startup-tasks in the scope of the unit test that posted them.

Bug: 732018, 753403
Change-Id: I318e82f3aa2969d6e338a33905ec7cd256d32d9c
Reviewed-on: https://chromium-review.googlesource.com/538898
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493468}
diff --git a/content/browser/after_startup_task_utils.h b/content/browser/after_startup_task_utils.h
new file mode 100644
index 0000000..7debbad
--- /dev/null
+++ b/content/browser/after_startup_task_utils.h
@@ -0,0 +1,21 @@
+// Copyright 2017 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_BROWSER_AFTER_STARTUP_TASK_UTILS_H_
+#define CONTENT_BROWSER_AFTER_STARTUP_TASK_UTILS_H_
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+// An indirection to
+// ContentBrowserClient::SetBrowserStartupIsCompleteForTesting() as that can
+// only be called from the content implementation and including content/test in
+// the content implementation is a whole other can of worms. TODO(gab): Clean
+// this up when AfterStartupTasks go away in favor of TaskScheduler.
+void CONTENT_EXPORT SetBrowserStartupIsCompleteForTesting();
+
+}  // namespace content
+
+#endif  // CONTENT_BROWSER_AFTER_STARTUP_TASK_UTILS_H_