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

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

Issue 8477015: Make it possible to enable/disable specific ppapi tests. Migrate PostMessage tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix license headers. Created 9 years, 1 month 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_fullscreen.h ('k') | ppapi/tests/test_graphics_2d.h » ('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 #include "ppapi/tests/test_fullscreen.h" 5 #include "ppapi/tests/test_fullscreen.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string.h> 8 #include <string.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 normal_callback_(instance->pp_instance()) { 43 normal_callback_(instance->pp_instance()) {
44 screen_mode_.GetScreenSize(&screen_size_); 44 screen_mode_.GetScreenSize(&screen_size_);
45 } 45 }
46 46
47 bool TestFullscreen::Init() { 47 bool TestFullscreen::Init() {
48 if (graphics2d_fullscreen_.is_null() && graphics2d_normal_.is_null()) 48 if (graphics2d_fullscreen_.is_null() && graphics2d_normal_.is_null())
49 return false; 49 return false;
50 return InitTestingInterface(); 50 return InitTestingInterface();
51 } 51 }
52 52
53 void TestFullscreen::RunTest() { 53 void TestFullscreen::RunTests(const std::string& filter) {
54 RUN_TEST(GetScreenSize); 54 RUN_TEST(GetScreenSize, filter);
55 RUN_TEST(NormalToFullscreenToNormal); 55 RUN_TEST(NormalToFullscreenToNormal, filter);
56 } 56 }
57 57
58 bool TestFullscreen::GotError() { 58 bool TestFullscreen::GotError() {
59 return !error_.empty(); 59 return !error_.empty();
60 } 60 }
61 61
62 std::string TestFullscreen::Error() { 62 std::string TestFullscreen::Error() {
63 std::string last_error = error_; 63 std::string last_error = error_;
64 error_.clear(); 64 error_.clear();
65 return last_error; 65 return last_error;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 pp::Module::Get()->core()->CallOnMainThread(0, fullscreen_callback_); 217 pp::Module::Get()->core()->CallOnMainThread(0, fullscreen_callback_);
218 } else if (normal_pending_) { 218 } else if (normal_pending_) {
219 normal_pending_ = false; 219 normal_pending_ = false;
220 if (screen_mode_.IsFullscreen()) 220 if (screen_mode_.IsFullscreen())
221 error_ = "DidChangeview is in fullscreen"; 221 error_ = "DidChangeview is in fullscreen";
222 else if (position != normal_position_) 222 else if (position != normal_position_)
223 error_ = "DidChangeView position is not normal"; 223 error_ = "DidChangeView position is not normal";
224 pp::Module::Get()->core()->CallOnMainThread(0, normal_callback_); 224 pp::Module::Get()->core()->CallOnMainThread(0, normal_callback_);
225 } 225 }
226 } 226 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_fullscreen.h ('k') | ppapi/tests/test_graphics_2d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698