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

Side by Side Diff: components/html_viewer/ax_provider_impl_unittest.cc

Issue 1145973011: mojo: Fix Blink's shutdown sequence in AxProviderImplTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing shutdown call to html_viewer::Setup Created 5 years, 6 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
« no previous file with comments | « no previous file | components/html_viewer/html_viewer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/html_viewer/ax_provider_impl.h" 5 #include "components/html_viewer/ax_provider_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "components/html_viewer/blink_platform_impl.h" 9 #include "components/html_viewer/blink_platform_impl.h"
10 #include "components/scheduler/renderer/renderer_scheduler.h" 10 #include "components/scheduler/renderer/renderer_scheduler.h"
(...skipping 29 matching lines...) Expand all
40 40
41 class TestWebViewClient : public WebViewClient { 41 class TestWebViewClient : public WebViewClient {
42 public: 42 public:
43 bool allowsBrokenNullLayerTreeView() const override { return true; } 43 bool allowsBrokenNullLayerTreeView() const override { return true; }
44 virtual ~TestWebViewClient() {} 44 virtual ~TestWebViewClient() {}
45 }; 45 };
46 46
47 class AxProviderImplTest : public testing::Test { 47 class AxProviderImplTest : public testing::Test {
48 public: 48 public:
49 AxProviderImplTest() 49 AxProviderImplTest()
50 : renderer_scheduler_(scheduler::RendererScheduler::Create()) { 50 : message_loop_(new base::MessageLoopForUI()),
51 renderer_scheduler_(scheduler::RendererScheduler::Create()) {
51 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) 52 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
52 gin::V8Initializer::LoadV8Snapshot(); 53 gin::V8Initializer::LoadV8Snapshot();
53 #endif 54 #endif
54 blink::initialize( 55 blink::initialize(
55 new html_viewer::BlinkPlatformImpl(nullptr, renderer_scheduler_.get())); 56 new html_viewer::BlinkPlatformImpl(nullptr, renderer_scheduler_.get()));
56 } 57 }
57 58
58 ~AxProviderImplTest() override { blink::shutdown(); } 59 ~AxProviderImplTest() override {
60 renderer_scheduler_->Shutdown();
61 message_loop_.reset();
62 blink::shutdown();
63 }
59 64
60 private: 65 private:
61 base::MessageLoopForUI message_loop; 66 scoped_ptr<base::MessageLoopForUI> message_loop_;
62 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_; 67 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_;
63 }; 68 };
64 69
65 struct NodeCatcher { 70 struct NodeCatcher {
66 void OnNodes(Array<AxNodePtr> nodes) { this->nodes = nodes.Pass(); } 71 void OnNodes(Array<AxNodePtr> nodes) { this->nodes = nodes.Pass(); }
67 Array<AxNodePtr> nodes; 72 Array<AxNodePtr> nodes;
68 }; 73 };
69 74
70 AxNodePtr CreateNode(int id, 75 AxNodePtr CreateNode(int id,
71 int parent_id, 76 int parent_id,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 "", 188 "",
184 "")); 189 ""));
185 } 190 }
186 } 191 }
187 192
188 // TODO(aa): Test bounds. 193 // TODO(aa): Test bounds.
189 // TODO(aa): Test sibling ordering of foo/bar/baz. 194 // TODO(aa): Test sibling ordering of foo/bar/baz.
190 195
191 view->close(); 196 view->close();
192 } 197 }
OLDNEW
« no previous file with comments | « no previous file | components/html_viewer/html_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698