Remove PlatformFile from profile_browsertest
[chromium-blink-merge.git] / content / test / ppapi_unittest.h
blobeb4f3b9fe458b370daa190c098283518faa14254
1 // Copyright (c) 2011 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 #ifndef CONTENT_TEST_PPAPI_UNITTEST_H_
6 #define CONTENT_TEST_PPAPI_UNITTEST_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "testing/gtest/include/gtest/gtest.h"
13 namespace base {
14 class MessageLoop;
17 namespace content {
19 class PepperPluginInstanceImpl;
20 class PluginModule;
22 class PpapiUnittest : public testing::Test {
23 public:
24 PpapiUnittest();
25 virtual ~PpapiUnittest();
27 virtual void SetUp();
28 virtual void TearDown();
30 PluginModule* module() const { return module_.get(); }
31 PepperPluginInstanceImpl* instance() const { return instance_.get(); }
33 // Provides access to the interfaces implemented by the test. The default one
34 // implements PPP_INSTANCE.
35 virtual const void* GetMockInterface(const char* interface_name) const;
37 // Deletes the instance and module to simulate module shutdown.
38 void ShutdownModule();
40 // Sets the view size of the plugin instance.
41 void SetViewSize(int width, int height) const;
43 private:
44 // Note: module must be declared first since we want it to get destroyed last.
45 scoped_refptr<PluginModule> module_;
46 scoped_refptr<PepperPluginInstanceImpl> instance_;
48 scoped_ptr<base::MessageLoop> message_loop_;
50 DISALLOW_COPY_AND_ASSIGN(PpapiUnittest);
53 } // namespace content
55 #endif // CONTENT_TEST_PPAPI_UNITTEST_H_