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

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

Issue 8879009: In ppapi/tests: |... const*| -> |const ...*| (for consistency). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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_graphics_3d.cc ('k') | ppapi/tests/test_input_event.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 #include "ppapi/tests/test_image_data.h" 5 #include "ppapi/tests/test_image_data.h"
6 6
7 #include "ppapi/cpp/graphics_2d.h" 7 #include "ppapi/cpp/graphics_2d.h"
8 #include "ppapi/cpp/image_data.h" 8 #include "ppapi/cpp/image_data.h"
9 #include "ppapi/cpp/instance.h" 9 #include "ppapi/cpp/instance.h"
10 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
11 #include "ppapi/tests/testing_instance.h" 11 #include "ppapi/tests/testing_instance.h"
12 12
13 REGISTER_TEST_CASE(ImageData); 13 REGISTER_TEST_CASE(ImageData);
14 14
15 bool TestImageData::Init() { 15 bool TestImageData::Init() {
16 image_data_interface_ = reinterpret_cast<PPB_ImageData const*>( 16 image_data_interface_ = static_cast<const PPB_ImageData*>(
17 pp::Module::Get()->GetBrowserInterface(PPB_IMAGEDATA_INTERFACE)); 17 pp::Module::Get()->GetBrowserInterface(PPB_IMAGEDATA_INTERFACE));
18 return !!image_data_interface_; 18 return !!image_data_interface_;
19 } 19 }
20 20
21 void TestImageData::RunTests(const std::string& filter) { 21 void TestImageData::RunTests(const std::string& filter) {
22 instance_->LogTest("InvalidFormat", TestInvalidFormat()); 22 instance_->LogTest("InvalidFormat", TestInvalidFormat());
23 instance_->LogTest("InvalidSize", TestInvalidSize()); 23 instance_->LogTest("InvalidSize", TestInvalidSize());
24 instance_->LogTest("HugeSize", TestHugeSize()); 24 instance_->LogTest("HugeSize", TestHugeSize());
25 instance_->LogTest("InitToZero", TestInitToZero()); 25 instance_->LogTest("InitToZero", TestInitToZero());
26 instance_->LogTest("IsImageData", TestIsImageData()); 26 instance_->LogTest("IsImageData", TestIsImageData());
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // Make a valid image resource. 133 // Make a valid image resource.
134 pp::ImageData img(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL, 134 pp::ImageData img(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
135 pp::Size(w, h), true); 135 pp::Size(w, h), true);
136 if (img.is_null()) 136 if (img.is_null())
137 return "Couldn't create image data"; 137 return "Couldn't create image data";
138 if (!image_data_interface_->IsImageData(img.pp_resource())) 138 if (!image_data_interface_->IsImageData(img.pp_resource()))
139 return "Image data should be identified as an image"; 139 return "Image data should be identified as an image";
140 140
141 PASS(); 141 PASS();
142 } 142 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_graphics_3d.cc ('k') | ppapi/tests/test_input_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698