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

Unified Diff: blimp/engine/mojo/font_fetcher_mojo_impl_unittest.cc

Issue 2534033002: Blimp: improve FontFetcher mojo ipc unittest (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/mojo/font_fetcher_mojo_impl_unittest.cc
diff --git a/blimp/engine/mojo/font_fetcher_mojo_impl_unittest.cc b/blimp/engine/mojo/font_fetcher_mojo_impl_unittest.cc
index 2b790670c7b20f329a67cd6d0887d7da9f3199b2..9db66b5b3fd85577f7c32e261dbc8034d4899099 100644
--- a/blimp/engine/mojo/font_fetcher_mojo_impl_unittest.cc
+++ b/blimp/engine/mojo/font_fetcher_mojo_impl_unittest.cc
@@ -55,18 +55,20 @@ class FontFetcherMojoImplUnittest : public testing::Test {
: font_fetcher_mojo_impl_(new FakeFontDataFetcher()) {}
~FontFetcherMojoImplUnittest() override {}
+ protected:
+ base::MessageLoop message_loop_;
FontFetcherMojoImpl font_fetcher_mojo_impl_;
};
-// TODO(mlliu): add tests later to do a full IPC test, calling the FontFetcher
-// API via the corresponding Mojo client interface.
TEST_F(FontFetcherMojoImplUnittest, VerifyWriteToDataPipe) {
+ mojom::FontFetcherPtr mojo_ptr;
+ font_fetcher_mojo_impl_.BindRequest(GetProxy(&mojo_ptr));
+
// Expect that dummy font data is written correctly to a Mojo DataPipe.
- font_fetcher_mojo_impl_.GetFontStream(kFakeHash,
- base::Bind(&VerifyDataWriteCorrectly));
+ mojo_ptr->GetFontStream(kFakeHash, base::Bind(&VerifyDataWriteCorrectly));
// Expect empty handle if the font stream is empty.
- font_fetcher_mojo_impl_.GetFontStream("", base::Bind(&VerifyEmptyDataWrite));
+ mojo_ptr->GetFontStream("", base::Bind(&VerifyEmptyDataWrite));
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698