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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_test_common.h

Issue 604443003: Adds more webview tests to app_shell_browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
Fady Samuel 2014/09/24 20:50:12 Please add an include guard: https://code.google.c
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/public/test/test_utils.h"
6 #include "extensions/browser/guest_view/guest_view_manager.h"
7 #include "extensions/browser/guest_view/guest_view_manager_factory.h"
8
9 namespace extensions {
10
11 class TestGuestViewManager : public GuestViewManager {
12 public:
13 explicit TestGuestViewManager(content::BrowserContext* context);
14 virtual ~TestGuestViewManager();
15
16 content::WebContents* WaitForGuestCreated();
17 void WaitForGuestDeleted();
18
19 private:
20 // GuestViewManager override:
21 virtual void AddGuest(int guest_instance_id,
22 content::WebContents* guest_web_contents) OVERRIDE;
23 virtual void RemoveGuest(int guest_instance_id) OVERRIDE;
24
25 bool seen_guest_removed_;
26 content::WebContents* web_contents_;
27 scoped_refptr<content::MessageLoopRunner> created_message_loop_runner_;
28 scoped_refptr<content::MessageLoopRunner> deleted_message_loop_runner_;
29
30 DISALLOW_COPY_AND_ASSIGN(TestGuestViewManager);
31 };
32
33 // Test factory for creating test instances of GuestViewManager.
34 class TestGuestViewManagerFactory : public GuestViewManagerFactory {
35 public:
36 TestGuestViewManagerFactory();
37 virtual ~TestGuestViewManagerFactory();
38
39 virtual GuestViewManager* CreateGuestViewManager(
40 content::BrowserContext* context) OVERRIDE;
41
42 TestGuestViewManager* GetManager(content::BrowserContext* context);
43
44 private:
45 TestGuestViewManager* test_guest_view_manager_;
46
47 DISALLOW_COPY_AND_ASSIGN(TestGuestViewManagerFactory);
48 };
49
50 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698