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

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

Issue 8982006: Add GetLiveVars to PPB_Testing_Dev. Fix leaks it uncovered. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged 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_udp_socket_private_shared.cc ('k') | ppapi/tests/test_var.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_url_loader.h" 5 #include "ppapi/tests/test_url_loader.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 } // namespace 57 } // namespace
58 58
59 TestURLLoader::TestURLLoader(TestingInstance* instance) 59 TestURLLoader::TestURLLoader(TestingInstance* instance)
60 : TestCase(instance), 60 : TestCase(instance),
61 file_io_trusted_interface_(NULL), 61 file_io_trusted_interface_(NULL),
62 url_loader_trusted_interface_(NULL) { 62 url_loader_trusted_interface_(NULL) {
63 } 63 }
64 64
65 bool TestURLLoader::Init() { 65 bool TestURLLoader::Init() {
66 if (!InitTestingInterface()) { 66 if (!CheckTestingInterface()) {
67 instance_->AppendError("Testing interface not available"); 67 instance_->AppendError("Testing interface not available");
68 return false; 68 return false;
69 } 69 }
70 70
71 const PPB_FileIO* file_io_interface = static_cast<const PPB_FileIO*>( 71 const PPB_FileIO* file_io_interface = static_cast<const PPB_FileIO*>(
72 pp::Module::Get()->GetBrowserInterface(PPB_FILEIO_INTERFACE)); 72 pp::Module::Get()->GetBrowserInterface(PPB_FILEIO_INTERFACE));
73 if (!file_io_interface) 73 if (!file_io_interface)
74 instance_->AppendError("FileIO interface not available"); 74 instance_->AppendError("FileIO interface not available");
75 75
76 file_io_trusted_interface_ = static_cast<const PPB_FileIOTrusted*>( 76 file_io_trusted_interface_ = static_cast<const PPB_FileIOTrusted*>(
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 return error; 867 return error;
868 if (body != "hello\n") 868 if (body != "hello\n")
869 return ReportError("Couldn't read data", rv); 869 return ReportError("Couldn't read data", rv);
870 870
871 PASS(); 871 PASS();
872 } 872 }
873 873
874 // TODO(viettrungluu): Add tests for Get{Upload,Download}Progress, Close 874 // TODO(viettrungluu): Add tests for Get{Upload,Download}Progress, Close
875 // (including abort tests if applicable). 875 // (including abort tests if applicable).
876 876
OLDNEW
« no previous file with comments | « ppapi/tests/test_udp_socket_private_shared.cc ('k') | ppapi/tests/test_var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698