blob: 7ee22d8119c3a786c463dbb975de2b86d68763cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// Copyright (c) 2012 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.
#ifndef PPAPI_TESTS_TEST_FLASH_FULLSCREEN_H_
#define PPAPI_TESTS_TEST_FLASH_FULLSCREEN_H_
#include <string>
#include "ppapi/cpp/private/flash_fullscreen.h"
#include "ppapi/cpp/size.h"
#include "ppapi/tests/test_case.h"
#include "ppapi/tests/test_utils.h"
namespace pp {
class Rect;
} // namespace pp
class TestFlashFullscreen : public TestCase {
public:
explicit TestFlashFullscreen(TestingInstance* instance);
// TestCase implementation.
virtual bool Init();
virtual void RunTests(const std::string& filter);
virtual void DidChangeView(const pp::View& view);
bool HandleInputEvent(const pp::InputEvent& event) override;
private:
std::string TestGetScreenSize();
std::string TestNormalToFullscreenToNormal();
void SimulateUserGesture();
bool GotError();
std::string Error();
void FailFullscreenTest(const std::string& error);
std::string error_;
pp::FlashFullscreen screen_mode_;
pp::Size screen_size_;
pp::Rect normal_position_;
bool fullscreen_pending_;
bool normal_pending_;
NestedEvent fullscreen_event_;
NestedEvent normal_event_;
};
#endif // PPAPI_TESTS_TEST_FLASH_FULLSCREEN_H_
|