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

Side by Side Diff: ppapi/tests/test_fullscreen.h

Issue 7826017: Add PPB_Fullscreen;0.5. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/tests/test_flash_fullscreen.cc ('k') | ppapi/tests/test_fullscreen.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 (c) 2011 The Chromium Authors. All rights reserved. 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 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 #ifndef PAPPI_TESTS_TEST_FULLSCREEN_H_ 5 #ifndef PAPPI_TESTS_TEST_FULLSCREEN_H_
6 #define PAPPI_TESTS_TEST_FULLSCREEN_H_ 6 #define PAPPI_TESTS_TEST_FULLSCREEN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ppapi/cpp/dev/fullscreen_dev.h" 10 #include "ppapi/cpp/dev/fullscreen_dev.h"
11 #include "ppapi/cpp/graphics_2d.h"
12 #include "ppapi/cpp/rect.h"
11 #include "ppapi/cpp/size.h" 13 #include "ppapi/cpp/size.h"
12 #include "ppapi/tests/test_case.h" 14 #include "ppapi/tests/test_case.h"
13 #include "ppapi/tests/test_utils.h" 15 #include "ppapi/tests/test_utils.h"
14 16
15 namespace pp { 17 namespace pp {
16 class Rect; 18 class InputEvent;
17 } // namespace pp 19 } // namespace pp
18 20
19 class TestFullscreen : public TestCase { 21 class TestFullscreen : public TestCase {
20 public: 22 public:
21 explicit TestFullscreen(TestingInstance* instance); 23 explicit TestFullscreen(TestingInstance* instance);
22 24
23 // TestCase implementation. 25 // TestCase implementation.
24 virtual bool Init(); 26 virtual bool Init();
25 virtual void RunTest(); 27 virtual void RunTest();
28 virtual bool HandleInputEvent(const pp::InputEvent& event);
26 virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip); 29 virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip);
27 30
28 private: 31 private:
29 std::string TestGetScreenSize(); 32 std::string TestGetScreenSize();
30 std::string TestNormalToFullscreenToNormal(); 33 std::string TestNormalToFullscreenToNormal();
31 34
35 void FailFullscreenTest(const std::string& error);
36
37 bool GotError();
38 std::string Error();
39
40 std::string error_;
41
32 pp::Fullscreen_Dev screen_mode_; 42 pp::Fullscreen_Dev screen_mode_;
33 pp::Size screen_size_; 43 pp::Size screen_size_;
44 pp::Rect normal_position_;
34 45
35 bool fullscreen_pending_; 46 bool fullscreen_pending_;
36 bool normal_pending_; 47 bool normal_pending_;
48 bool saw_first_fullscreen_didchangeview;
49 pp::Graphics2D graphics2d_fullscreen_;
50 pp::Graphics2D graphics2d_normal_;
51 TestCompletionCallback set_fullscreen_true_callback_;
37 TestCompletionCallback fullscreen_callback_; 52 TestCompletionCallback fullscreen_callback_;
38 TestCompletionCallback normal_callback_; 53 TestCompletionCallback normal_callback_;
39 }; 54 };
40 55
41 #endif // PAPPI_TESTS_TEST_FULLSCREEN_H_ 56 #endif // PAPPI_TESTS_TEST_FULLSCREEN_H_
OLDNEW
« no previous file with comments | « ppapi/tests/test_flash_fullscreen.cc ('k') | ppapi/tests/test_fullscreen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698