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_file_ref.h" | 5 #include "ppapi/tests/test_file_ref.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 std::string ReportMismatch(const std::string& method_name, | 34 std::string ReportMismatch(const std::string& method_name, |
35 const std::string& returned_result, | 35 const std::string& returned_result, |
36 const std::string& expected_result) { | 36 const std::string& expected_result) { |
37 return method_name + " returned '" + returned_result + "'; '" + | 37 return method_name + " returned '" + returned_result + "'; '" + |
38 expected_result + "' expected."; | 38 expected_result + "' expected."; |
39 } | 39 } |
40 | 40 |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 bool TestFileRef::Init() { | 43 bool TestFileRef::Init() { |
44 return InitTestingInterface() && EnsureRunningOverHTTP(); | 44 return CheckTestingInterface() && EnsureRunningOverHTTP(); |
45 } | 45 } |
46 | 46 |
47 void TestFileRef::RunTests(const std::string& filter) { | 47 void TestFileRef::RunTests(const std::string& filter) { |
48 RUN_TEST_FORCEASYNC_AND_NOT(Create, filter); | 48 RUN_TEST_FORCEASYNC_AND_NOT(Create, filter); |
49 RUN_TEST_FORCEASYNC_AND_NOT(GetFileSystemType, filter); | 49 RUN_TEST_FORCEASYNC_AND_NOT(GetFileSystemType, filter); |
50 RUN_TEST_FORCEASYNC_AND_NOT(GetName, filter); | 50 RUN_TEST_FORCEASYNC_AND_NOT(GetName, filter); |
51 RUN_TEST_FORCEASYNC_AND_NOT(GetPath, filter); | 51 RUN_TEST_FORCEASYNC_AND_NOT(GetPath, filter); |
52 RUN_TEST_FORCEASYNC_AND_NOT(GetParent, filter); | 52 RUN_TEST_FORCEASYNC_AND_NOT(GetParent, filter); |
53 RUN_TEST_FORCEASYNC_AND_NOT(MakeDirectory, filter); | 53 RUN_TEST_FORCEASYNC_AND_NOT(MakeDirectory, filter); |
54 RUN_TEST_FORCEASYNC_AND_NOT(QueryAndTouchFile, filter); | 54 RUN_TEST_FORCEASYNC_AND_NOT(QueryAndTouchFile, filter); |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 if (rv == PP_OK_COMPLETIONPENDING) { | 663 if (rv == PP_OK_COMPLETIONPENDING) { |
664 rv = callback.WaitForResult(); | 664 rv = callback.WaitForResult(); |
665 if (rv != PP_ERROR_ABORTED) | 665 if (rv != PP_ERROR_ABORTED) |
666 return "FileSystem::Rename not aborted."; | 666 return "FileSystem::Rename not aborted."; |
667 } else if (rv != PP_OK) { | 667 } else if (rv != PP_OK) { |
668 return ReportError("FileSystem::Rename", rv); | 668 return ReportError("FileSystem::Rename", rv); |
669 } | 669 } |
670 | 670 |
671 PASS(); | 671 PASS(); |
672 } | 672 } |
OLD | NEW |