| OLD | NEW |
| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 bool TestFullscreen::Init() { | 64 bool TestFullscreen::Init() { |
| 65 if (screen_size_.IsEmpty()) { | 65 if (screen_size_.IsEmpty()) { |
| 66 instance_->AppendError("Failed to initialize screen_size_"); | 66 instance_->AppendError("Failed to initialize screen_size_"); |
| 67 return false; | 67 return false; |
| 68 } | 68 } |
| 69 graphics2d_ = pp::Graphics2D(instance_, screen_size_, true); | 69 graphics2d_ = pp::Graphics2D(instance_, screen_size_, true); |
| 70 if (!instance_->BindGraphics(graphics2d_)) { | 70 if (!instance_->BindGraphics(graphics2d_)) { |
| 71 instance_->AppendError("Failed to initialize graphics2d_"); | 71 instance_->AppendError("Failed to initialize graphics2d_"); |
| 72 return false; | 72 return false; |
| 73 } | 73 } |
| 74 return InitTestingInterface(); | 74 return CheckTestingInterface(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void TestFullscreen::RunTests(const std::string& filter) { | 77 void TestFullscreen::RunTests(const std::string& filter) { |
| 78 RUN_TEST(GetScreenSize, filter); | 78 RUN_TEST(GetScreenSize, filter); |
| 79 RUN_TEST(NormalToFullscreenToNormal, filter); | 79 RUN_TEST(NormalToFullscreenToNormal, filter); |
| 80 } | 80 } |
| 81 | 81 |
| 82 bool TestFullscreen::GotError() { | 82 bool TestFullscreen::GotError() { |
| 83 return !error_.empty(); | 83 return !error_.empty(); |
| 84 } | 84 } |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 else if (position != normal_position_) | 335 else if (position != normal_position_) |
| 336 FailNormalTest("DidChangeView position is not normal"); | 336 FailNormalTest("DidChangeView position is not normal"); |
| 337 else if (!instance_->BindGraphics(graphics2d_)) | 337 else if (!instance_->BindGraphics(graphics2d_)) |
| 338 FailNormalTest("Failed to BindGraphics() in normal"); | 338 FailNormalTest("Failed to BindGraphics() in normal"); |
| 339 else if (!PaintPlugin(position.size(), kSheerBlue)) | 339 else if (!PaintPlugin(position.size(), kSheerBlue)) |
| 340 FailNormalTest("Failed to paint plugin image in normal"); | 340 FailNormalTest("Failed to paint plugin image in normal"); |
| 341 else | 341 else |
| 342 PassNormalTest(); | 342 PassNormalTest(); |
| 343 } | 343 } |
| 344 } | 344 } |
| OLD | NEW |