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

Unified Diff: components/mus/view_tree_apptest.cc

Issue 1344573002: Mandoline: Rename components/view_manager to components/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 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
« no previous file with comments | « components/mus/view_manager_client_apptest.cc ('k') | components/mus/view_tree_host_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/view_tree_apptest.cc
diff --git a/components/view_manager/view_tree_apptest.cc b/components/mus/view_tree_apptest.cc
similarity index 98%
rename from components/view_manager/view_tree_apptest.cc
rename to components/mus/view_tree_apptest.cc
index 2af1e4ecf5d84a01bc1269b16ec18eb98dce1d62..22b01d78591016cfcc17be1f68076e8cd1c53765 100644
--- a/components/view_manager/view_tree_apptest.cc
+++ b/components/mus/view_tree_apptest.cc
@@ -6,10 +6,10 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
-#include "components/view_manager/ids.h"
-#include "components/view_manager/public/interfaces/view_tree.mojom.h"
-#include "components/view_manager/public/interfaces/view_tree_host.mojom.h"
-#include "components/view_manager/test_change_tracker.h"
+#include "components/mus/ids.h"
+#include "components/mus/public/interfaces/view_tree.mojom.h"
+#include "components/mus/public/interfaces/view_tree_host.mojom.h"
+#include "components/mus/test_change_tracker.h"
#include "mojo/application/public/cpp/application_delegate.h"
#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/application/public/cpp/application_test_base.h"
@@ -147,9 +147,7 @@ bool ReorderView(ViewTree* vm,
return result;
}
-void GetViewTree(ViewTree* vm,
- Id view_id,
- std::vector<TestView>* views) {
+void GetViewTree(ViewTree* vm, Id view_id, std::vector<TestView>* views) {
base::RunLoop run_loop;
vm->GetViewTree(view_id,
base::Bind(&ViewTreeResultCallback, &run_loop, views));
@@ -164,12 +162,7 @@ bool DeleteView(ViewTree* vm, Id view_id) {
return result;
}
-bool SetViewBounds(ViewTree* vm,
- Id view_id,
- int x,
- int y,
- int w,
- int h) {
+bool SetViewBounds(ViewTree* vm, Id view_id, int x, int y, int w, int h) {
base::RunLoop run_loop;
bool result = false;
RectPtr rect(mojo::Rect::New());
@@ -331,7 +324,7 @@ class ViewTreeClientImpl : public mojo::ViewTreeClient,
// times. As this doesn't matter, and shouldn't impact test exepctations,
// it is ignored.
if (view_id == root_view_id_)
- return;
+ return;
tracker()->OnViewBoundsChanged(view_id, old_bounds.Pass(),
new_bounds.Pass());
}
@@ -431,9 +424,9 @@ class ViewTreeClientFactory : public mojo::InterfaceFactory<ViewTreeClient> {
class ViewTreeAppTest : public mojo::test::ApplicationTestBase,
public ApplicationDelegate {
public:
- ViewTreeAppTest()
+ ViewTreeAppTest()
: connection_id_1_(0), connection_id_2_(0), root_view_id_(0) {}
- ~ViewTreeAppTest() override {}
+ ~ViewTreeAppTest() override {}
protected:
// Returns the changes from the various connections.
@@ -500,8 +493,7 @@ class ViewTreeAppTest : public mojo::test::ApplicationTestBase,
ADD_FAILURE() << "Embed() failed";
return nullptr;
}
- scoped_ptr<ViewTreeClientImpl> client =
- client_factory_->WaitForInstance();
+ scoped_ptr<ViewTreeClientImpl> client = client_factory_->WaitForInstance();
if (!client.get()) {
ADD_FAILURE() << "WaitForInstance failed";
return nullptr;
@@ -530,8 +522,7 @@ class ViewTreeAppTest : public mojo::test::ApplicationTestBase,
vm_client1_.reset(new ViewTreeClientImpl(application_impl()));
vm_client1_->Bind(GetProxy(&tree_client_ptr));
- factory->CreateViewTreeHost(GetProxy(&host_),
- mojo::ViewTreeHostClientPtr(),
+ factory->CreateViewTreeHost(GetProxy(&host_), mojo::ViewTreeHostClientPtr(),
tree_client_ptr.Pass());
// Next we should get an embed call on the "window manager" client.
@@ -1611,8 +1602,8 @@ TEST_F(ViewTreeAppTest, EmbedFailsFromOtherConnection) {
// 2 should not be able to embed in view_3_3 as view_3_3 was not created by
// 2.
- EXPECT_FALSE(EmbedUrl(application_impl(), vm2(), application_impl()->url(),
- view_3_3));
+ EXPECT_FALSE(
+ EmbedUrl(application_impl(), vm2(), application_impl()->url(), view_3_3));
}
// Verifies Embed() from window manager on another connections view works.
@@ -1658,8 +1649,8 @@ TEST_F(ViewTreeAppTest, CantEmbedFromConnectionRoot) {
// view_1_2 is vm3's root, so even though v3 is an embed root it should not
// be able to Embed into itself.
- ASSERT_FALSE(EmbedUrl(application_impl(), vm3(), application_impl()->url(),
- view_1_2));
+ ASSERT_FALSE(
+ EmbedUrl(application_impl(), vm3(), application_impl()->url(), view_1_2));
}
// TODO(sky): need to better track changes to initial connection. For example,
« no previous file with comments | « components/mus/view_manager_client_apptest.cc ('k') | components/mus/view_tree_host_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698