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

Side by Side Diff: mojo/services/view_manager/view_manager_unittest.cc

Issue 668483002: Change mojo URLs from mojo://mojo_foo to mojo://foo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 : connection_(NULL), 502 : connection_(NULL),
503 connection2_(NULL), 503 connection2_(NULL),
504 connection3_(NULL) {} 504 connection3_(NULL) {}
505 505
506 virtual void SetUp() override { 506 virtual void SetUp() override {
507 ASSERT_TRUE(ViewManagerProxy::IsInInitialState()); 507 ASSERT_TRUE(ViewManagerProxy::IsInInitialState());
508 test_helper_.Init(); 508 test_helper_.Init();
509 std::vector<std::string> native_viewport_args; 509 std::vector<std::string> native_viewport_args;
510 native_viewport_args.push_back(kUseTestConfig); 510 native_viewport_args.push_back(kUseTestConfig);
511 test_helper_.application_manager()->SetArgsForURL( 511 test_helper_.application_manager()->SetArgsForURL(
512 native_viewport_args, GURL("mojo:mojo_native_viewport_service")); 512 native_viewport_args, GURL("mojo:native_viewport_service"));
513 printf("Setting args\n"); 513 printf("Setting args\n");
514 514
515 #if defined(OS_WIN) 515 #if defined(OS_WIN)
516 // As we unload the wndproc of window classes we need to be sure to 516 // As we unload the wndproc of window classes we need to be sure to
517 // unregister them. 517 // unregister them.
518 gfx::WindowImpl::UnregisterClassesAtExit(); 518 gfx::WindowImpl::UnregisterClassesAtExit();
519 #endif 519 #endif
520 520
521 test_helper_.SetLoaderForURL( 521 test_helper_.SetLoaderForURL(
522 scoped_ptr<ApplicationLoader>(new EmbedApplicationLoader()), 522 scoped_ptr<ApplicationLoader>(new EmbedApplicationLoader()),
523 GURL(kTestServiceURL)); 523 GURL(kTestServiceURL));
524 524
525 test_helper_.SetLoaderForURL( 525 test_helper_.SetLoaderForURL(
526 scoped_ptr<ApplicationLoader>(new EmbedApplicationLoader()), 526 scoped_ptr<ApplicationLoader>(new EmbedApplicationLoader()),
527 GURL(kTestServiceURL2)); 527 GURL(kTestServiceURL2));
528 528
529 test_helper_.application_manager()->ConnectToService( 529 test_helper_.application_manager()->ConnectToService(
530 GURL("mojo:mojo_view_manager"), &view_manager_init_); 530 GURL("mojo:view_manager"), &view_manager_init_);
531 ASSERT_TRUE(InitEmbed(view_manager_init_.get(), kTestServiceURL, 1)); 531 ASSERT_TRUE(InitEmbed(view_manager_init_.get(), kTestServiceURL, 1));
532 532
533 connection_ = ViewManagerProxy::WaitForInstance(); 533 connection_ = ViewManagerProxy::WaitForInstance();
534 ASSERT_TRUE(connection_ != NULL); 534 ASSERT_TRUE(connection_ != NULL);
535 connection_->DoRunLoopUntilChangesCount(1); 535 connection_->DoRunLoopUntilChangesCount(1);
536 } 536 }
537 537
538 virtual void TearDown() override { 538 virtual void TearDown() override {
539 if (connection3_) 539 if (connection3_)
540 connection3_->Destroy(); 540 connection3_->Destroy();
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 1476
1477 // TODO(sky): add coverage of test that destroys connections and ensures other 1477 // TODO(sky): add coverage of test that destroys connections and ensures other
1478 // connections get deletion notification. 1478 // connections get deletion notification.
1479 1479
1480 // TODO(sky): need to better track changes to initial connection. For example, 1480 // TODO(sky): need to better track changes to initial connection. For example,
1481 // that SetBounsdViews/AddView and the like don't result in messages to the 1481 // that SetBounsdViews/AddView and the like don't result in messages to the
1482 // originating connection. 1482 // originating connection.
1483 1483
1484 } // namespace service 1484 } // namespace service
1485 } // namespace mojo 1485 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698