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

Unified Diff: ppapi/tests/test_flash_fullscreen_for_browser_ui.h

Issue 670653005: Fix Flash fullscreen focus regressions, and add interactive_ui_tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove consts in ObjC code. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/tests/test_flash_fullscreen_for_browser_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_flash_fullscreen_for_browser_ui.h
diff --git a/ppapi/tests/test_flash_fullscreen_for_browser_ui.h b/ppapi/tests/test_flash_fullscreen_for_browser_ui.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e253f3fdaad28b2ab4695c1bf824d7836f77889
--- /dev/null
+++ b/ppapi/tests/test_flash_fullscreen_for_browser_ui.h
@@ -0,0 +1,56 @@
+// Copyright 2014 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_FOR_BROWSER_UI_H_
+#define PPAPI_TESTS_TEST_FLASH_FULLSCREEN_FOR_BROWSER_UI_H_
+
+#include <string>
+
+#include "ppapi/cpp/compositor.h"
+#include "ppapi/cpp/compositor_layer.h"
+#include "ppapi/cpp/private/flash_fullscreen.h"
+#include "ppapi/cpp/size.h"
+#include "ppapi/tests/test_case.h"
+#include "ppapi/tests/test_utils.h"
+#include "ppapi/utility/completion_callback_factory.h"
+
+// This is a special TestCase whose purpose is *not* to test the correctness of
+// the Pepper APIs. Instead, this is a simulated Flash plugin, used to place
+// the browser window and other UI elements into Flash Fullscreen mode for
+// layout, event, focus, etc. testing. See
+// chrome/browser/ui/fullscreen/flash_fullscreen_interactive_browsertest.cc.
+//
+// At start, this simulated Flash plugin will enter fullscreen and paint a green
+// color fill. From there, it will respond to mouse clicks or key presses by
+// toggling its fill color between red and blue. The browser test reads these
+// color changes to detect the desired behavior.
+class TestFlashFullscreenForBrowserUI : public TestCase {
+ public:
+ explicit TestFlashFullscreenForBrowserUI(TestingInstance* instance);
+ virtual ~TestFlashFullscreenForBrowserUI();
+
+ // TestCase implementation.
+ virtual bool Init() override;
+ virtual void RunTests(const std::string& filter) override;
+ virtual void DidChangeView(const pp::View& view) override;
+ virtual bool HandleInputEvent(const pp::InputEvent& event) override;
+
+ private:
+ std::string TestEnterFullscreen();
+ void Paint(int32_t last_compositor_result);
+
+ pp::FlashFullscreen screen_mode_;
+ NestedEvent view_change_event_;
+
+ pp::Compositor compositor_;
+ pp::Size layer_size_;
+ pp::CompositorLayer color_layer_;
+
+ int num_trigger_events_;
+
+ pp::CompletionCallbackFactory<TestFlashFullscreenForBrowserUI>
+ callback_factory_;
+};
+
+#endif // PPAPI_TESTS_TEST_FLASH_FULLSCREEN_FOR_BROWSER_UI_H_
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/tests/test_flash_fullscreen_for_browser_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698