OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.h" | 6 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.h" |
7 #include "storage/browser/fileapi/file_system_url.h" | 7 #include "storage/browser/fileapi/file_system_url.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
10 | 10 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 storage::FileSystemURL::CreateForTest( | 127 storage::FileSystemURL::CreateForTest( |
128 GURL(), storage::kFileSystemTypeArcDocumentsProvider, | 128 GURL(), storage::kFileSystemTypeArcDocumentsProvider, |
129 base::FilePath( | 129 base::FilePath( |
130 "/special/arc-documents-provider/cats/root/home/みけねこ.jpg")), | 130 "/special/arc-documents-provider/cats/root/home/みけねこ.jpg")), |
131 &authority, &root_document_id, &path)); | 131 &authority, &root_document_id, &path)); |
132 EXPECT_EQ("cats", authority); | 132 EXPECT_EQ("cats", authority); |
133 EXPECT_EQ("root", root_document_id); | 133 EXPECT_EQ("root", root_document_id); |
134 EXPECT_EQ(FILE_PATH_LITERAL("home/みけねこ.jpg"), path.value()); | 134 EXPECT_EQ(FILE_PATH_LITERAL("home/みけねこ.jpg"), path.value()); |
135 } | 135 } |
136 | 136 |
| 137 TEST(ArcDocumentsProviderUtilTest, BuildDocumentUrl) { |
| 138 EXPECT_EQ("content://Cat%20Provider/document/C%2B%2B", |
| 139 BuildDocumentUrl("Cat Provider", "C++").spec()); |
| 140 } |
| 141 |
137 } // namespace | 142 } // namespace |
138 | 143 |
139 } // namespace arc | 144 } // namespace arc |
OLD | NEW |