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

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

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 9 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.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) 2012 The Chromium Authors. All rights reserved. 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 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_flash_clipboard.h" 5 #include "ppapi/tests/test_flash_clipboard.h"
6 6
7 #include "ppapi/cpp/instance.h" 7 #include "ppapi/cpp/instance.h"
8 #include "ppapi/cpp/module.h" 8 #include "ppapi/cpp/module.h"
9 #include "ppapi/cpp/point.h" 9 #include "ppapi/cpp/point.h"
10 #include "ppapi/tests/testing_instance.h" 10 #include "ppapi/tests/testing_instance.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 PlatformSleep(kIntervalMs); 48 PlatformSleep(kIntervalMs);
49 } 49 }
50 return is_available; 50 return is_available;
51 } 51 }
52 52
53 std::string TestFlashClipboard::ReadStringVar( 53 std::string TestFlashClipboard::ReadStringVar(
54 PP_Flash_Clipboard_Format format) { 54 PP_Flash_Clipboard_Format format) {
55 std::string result_str; 55 std::string result_str;
56 pp::Var result_var( 56 pp::Var result_var(
57 pp::Var::PassRef(), 57 pp::PASS_REF,
58 clipboard_interface_->ReadData(instance_->pp_instance(), 58 clipboard_interface_->ReadData(instance_->pp_instance(),
59 PP_FLASH_CLIPBOARD_TYPE_STANDARD, 59 PP_FLASH_CLIPBOARD_TYPE_STANDARD,
60 format)); 60 format));
61 if (result_var.is_string()) 61 if (result_var.is_string())
62 result_str = result_var.AsString(); 62 result_str = result_var.AsString();
63 return result_str; 63 return result_str;
64 } 64 }
65 65
66 int32_t TestFlashClipboard::WriteStringVar(PP_Flash_Clipboard_Format format, 66 int32_t TestFlashClipboard::WriteStringVar(PP_Flash_Clipboard_Format format,
67 const std::string& input) { 67 const std::string& input) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 ASSERT_TRUE(success == PP_OK); 135 ASSERT_TRUE(success == PP_OK);
136 136
137 ASSERT_TRUE(IsFormatAvailable(PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT)); 137 ASSERT_TRUE(IsFormatAvailable(PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT));
138 ASSERT_TRUE(IsFormatAvailable(PP_FLASH_CLIPBOARD_FORMAT_HTML)); 138 ASSERT_TRUE(IsFormatAvailable(PP_FLASH_CLIPBOARD_FORMAT_HTML));
139 139
140 ASSERT_TRUE(ReadAndMatchPlainText(plain_text_var.AsString())); 140 ASSERT_TRUE(ReadAndMatchPlainText(plain_text_var.AsString()));
141 ASSERT_TRUE(ReadAndMatchHTML(html_var.AsString())); 141 ASSERT_TRUE(ReadAndMatchHTML(html_var.AsString()));
142 142
143 PASS(); 143 PASS();
144 } 144 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_flash.cc ('k') | ppapi/tests/test_input_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698