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

Unified Diff: extensions/browser/guest_view/web_view/web_view_apitest.cc

Issue 2832153003: Move calling of shared browser test methods like SetUpOnMainThread/TearDownOnMainThread/RunTestOn... (Closed)
Patch Set: fixes Created 3 years, 8 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: extensions/browser/guest_view/web_view/web_view_apitest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_apitest.cc b/extensions/browser/guest_view/web_view/web_view_apitest.cc
index 745edfe7243efa94cd6d76785c820085c5799855..c3339b903530d7c0c37706da3f79b34785e05c02 100644
--- a/extensions/browser/guest_view/web_view/web_view_apitest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_apitest.cc
@@ -29,6 +29,7 @@
#include "extensions/common/extension.h"
#include "extensions/common/extension_paths.h"
#include "extensions/common/switches.h"
+#include "extensions/shell/browser/desktop_controller.h"
#include "extensions/shell/browser/shell_content_browser_client.h"
#include "extensions/shell/browser/shell_extension_system.h"
#include "extensions/shell/test/shell_test.h"
@@ -175,11 +176,6 @@ void WebViewAPITest::RunTest(const std::string& test_name,
ASSERT_TRUE(done_listener.WaitUntilSatisfied());
}
-void WebViewAPITest::RunTestOnMainThreadLoop() {
- AppShellTest::RunTestOnMainThreadLoop();
- GetGuestViewManager()->WaitForAllGuestsDeleted();
-}
-
void WebViewAPITest::SetUpCommandLine(base::CommandLine* command_line) {
AppShellTest::SetUpCommandLine(command_line);
command_line->AppendSwitchASCII(::switches::kJavaScriptFlags, "--expose-gc");
@@ -236,6 +232,8 @@ void WebViewAPITest::StopTestServer() {
}
void WebViewAPITest::TearDownOnMainThread() {
+ DesktopController::instance()->CloseAppWindows();
+ GetGuestViewManager()->WaitForAllGuestsDeleted();
TestGetConfigFunction::set_test_config_state(nullptr);
AppShellTest::TearDownOnMainThread();

Powered by Google App Engine
This is Rietveld 408576698