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

Unified Diff: services/navigation/navigation_unittest.cc

Issue 2901613002: Remove navigation_service_unittests, along with the service itself. (Closed)
Patch Set: Fix isolate files? Created 3 years, 7 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 | « services/navigation/navigation.cc ('k') | services/navigation/public/cpp/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/navigation/navigation_unittest.cc
diff --git a/services/navigation/navigation_unittest.cc b/services/navigation/navigation_unittest.cc
deleted file mode 100644
index 740cc6fecc38968ef30d1d3391c032b20b272216..0000000000000000000000000000000000000000
--- a/services/navigation/navigation_unittest.cc
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/run_loop.h"
-#include "mojo/public/cpp/bindings/binding.h"
-#include "services/navigation/public/interfaces/view.mojom.h"
-#include "services/service_manager/public/cpp/service.h"
-#include "services/service_manager/public/cpp/service_test.h"
-
-namespace navigation {
-
-class NavigationTest : public service_manager::test::ServiceTest,
- public mojom::ViewClient {
- public:
- NavigationTest()
- : service_manager::test::ServiceTest("navigation_unittests"),
- binding_(this) {}
- ~NavigationTest() override {}
-
- protected:
- void SetUp() override {
- service_manager::test::ServiceTest::SetUp();
- connector()->StartService("test_wm");
- }
-
- mojom::ViewClientPtr GetViewClient() {
- return binding_.CreateInterfacePtrAndBind();
- }
-
- void QuitOnLoadingStateChange(base::RunLoop* loop) {
- loop_ = loop;
- }
-
- private:
- // mojom::ViewClient:
- void OpenURL(mojom::OpenURLParamsPtr params) override {}
- void LoadingStateChanged(bool is_loading) override {
- // Should see loading start, then stop.
- if (++load_count_ == 2 && loop_)
- loop_->Quit();
- }
- void NavigationStateChanged(const GURL& url,
- const std::string& title,
- bool can_go_back,
- bool can_go_forward) override {}
- void LoadProgressChanged(double progress) override {}
- void UpdateHoverURL(const GURL& url) override {}
- void ViewCreated(mojom::ViewPtr,
- mojom::ViewClientRequest,
- bool,
- const gfx::Rect&,
- bool) override {}
- void Close() override {}
- void NavigationPending(mojom::NavigationEntryPtr entry) override {}
- void NavigationCommitted(
- mojom::NavigationCommittedDetailsPtr details,
- int current_index) override {}
- void NavigationEntryChanged(mojom::NavigationEntryPtr entry,
- int entry_index) override {}
- void NavigationListPruned(bool from_front, int count) override {}
-
- int load_count_ = 0;
- mojo::Binding<mojom::ViewClient> binding_;
- base::RunLoop* loop_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationTest);
-};
-
-// See crbug.com/619523
-TEST_F(NavigationTest, DISABLED_Navigate) {
- mojom::ViewFactoryPtr view_factory;
- connector()->BindInterface("navigation", &view_factory);
-
- mojom::ViewPtr view;
- view_factory->CreateView(GetViewClient(), MakeRequest(&view));
- view->NavigateTo(GURL("about:blank"));
-
- base::RunLoop loop;
- QuitOnLoadingStateChange(&loop);
- loop.Run();
-}
-
-} // namespace navigation
« no previous file with comments | « services/navigation/navigation.cc ('k') | services/navigation/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698