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

Unified Diff: blimp/engine/browser_tests/blimp_browser_test.cc

Issue 2320923002: Add a full Blimp integration test. (Closed)
Patch Set: Fix build break with chrome embedder Created 4 years, 3 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: blimp/engine/browser_tests/blimp_browser_test.cc
diff --git a/blimp/engine/browser_tests/blimp_browser_test.cc b/blimp/engine/browser_tests/blimp_browser_test.cc
index 4da8f88c2a510310f0295279641449dce6508f63..67f72181deaf33342fa632bbe014cc815822f857 100644
--- a/blimp/engine/browser_tests/blimp_browser_test.cc
+++ b/blimp/engine/browser_tests/blimp_browser_test.cc
@@ -34,9 +34,9 @@ const char kClientAuthTokenFilePath[] = "blimp/test/data/test_client_token";
const char kClientAuthToken[] = "MyVoiceIsMyPassport";
} // namespace
-
BlimpBrowserTest::BlimpBrowserTest()
- : completion_event_(base::WaitableEvent::ResetPolicy::MANUAL,
+ : engine_port_(0),
+ completion_event_(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED) {
CreateTestServer(base::FilePath(FILE_PATH_LITERAL(kTestDataFilePath)));
}
@@ -51,6 +51,12 @@ void BlimpBrowserTest::RunUntilCompletion() {
completion_event_.Reset();
}
+void BlimpBrowserTest::AllowUIWaits() {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ allow_ui_waits_ =
+ base::MakeUnique<base::ThreadRestrictions::ScopedAllowWait>();
+}
+
void BlimpBrowserTest::SignalCompletion() {
completion_event_.Signal();
}
@@ -102,6 +108,7 @@ void BlimpBrowserTest::SetUpOnMainThread() {
}
void BlimpBrowserTest::TearDownOnMainThread() {
+ allow_ui_waits_.reset();
base::MessageLoop::current()->QuitWhenIdle();
}
« no previous file with comments | « blimp/engine/browser_tests/blimp_browser_test.h ('k') | blimp/engine/browser_tests/blimp_contents_view_readback_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698