Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / extensions / api / declarative_content / declarative_content_condition_tracker_test.cc
blob26cad63600fb756b3546969e6c40e582f35df263
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/extensions/api/declarative_content/declarative_content_condition_tracker_test.h"
7 #include "base/run_loop.h"
8 #include "chrome/test/base/testing_profile.h"
9 #include "content/public/browser/render_view_host.h"
10 #include "content/public/browser/web_contents.h"
11 #include "content/public/test/mock_render_process_host.h"
12 #include "content/public/test/web_contents_tester.h"
14 namespace extensions {
16 DeclarativeContentConditionTrackerTest::DeclarativeContentConditionTrackerTest()
17 : profile_(new TestingProfile) {}
19 DeclarativeContentConditionTrackerTest::
20 ~DeclarativeContentConditionTrackerTest() {
21 // MockRenderProcessHosts are deleted from the message loop, and their
22 // deletion must complete before RenderViewHostTestEnabler's destructor is
23 // run.
24 base::RunLoop().RunUntilIdle();
27 scoped_ptr<content::WebContents>
28 DeclarativeContentConditionTrackerTest::MakeTab() {
29 return make_scoped_ptr(content::WebContentsTester::CreateTestWebContents(
30 profile_.get(),
31 nullptr));
34 content::MockRenderProcessHost*
35 DeclarativeContentConditionTrackerTest::GetMockRenderProcessHost(
36 content::WebContents* contents) {
37 return static_cast<content::MockRenderProcessHost*>(
38 contents->GetRenderViewHost()->GetProcess());
41 } // namespace extensions