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

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

Issue 15491006: Rename PPB_Flash_DeviceID interface to PPB_Flash_DRM (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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_device_id.h ('k') | ppapi/tests/test_flash_drm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ppapi/tests/test_flash_device_id.h"
6
7 #include "ppapi/c/pp_macros.h"
8 #include "ppapi/c/private/ppb_flash_device_id.h"
9 #include "ppapi/cpp/instance.h"
10 #include "ppapi/cpp/module.h"
11 #include "ppapi/cpp/private/flash_device_id.h"
12 #include "ppapi/cpp/var.h"
13 #include "ppapi/tests/testing_instance.h"
14
15 REGISTER_TEST_CASE(FlashDeviceID);
16
17 using pp::flash::DeviceID;
18 using pp::Var;
19
20 TestFlashDeviceID::TestFlashDeviceID(TestingInstance* instance)
21 : TestCase(instance),
22 PP_ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) {
23 }
24
25 void TestFlashDeviceID::RunTests(const std::string& filter) {
26 RUN_TEST(GetDeviceID, filter);
27 }
28
29 std::string TestFlashDeviceID::TestGetDeviceID() {
30 DeviceID device_id(instance_);
31 TestCompletionCallbackWithOutput<Var> output_callback(
32 instance_->pp_instance());
33 int32_t rv = device_id.GetDeviceID(output_callback.GetCallback());
34 output_callback.WaitForResult(rv);
35 ASSERT_TRUE(output_callback.result() == PP_OK);
36 Var result = output_callback.output();
37 ASSERT_TRUE(result.is_string());
38 std::string id = result.AsString();
39 ASSERT_FALSE(id.empty());
40
41 PASS();
42 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_flash_device_id.h ('k') | ppapi/tests/test_flash_drm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698