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

Side by Side Diff: content/browser/fileapi/file_system_url_unittest.cc

Issue 336193003: Make FileSystemURL::ToGURL consistent with DOMFileSystemBase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win test failure (hopefully) Created 6 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "webkit/browser/fileapi/file_system_url.h" 5 #include "webkit/browser/fileapi/file_system_url.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.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 #include "webkit/common/fileapi/file_system_types.h" 10 #include "webkit/common/fileapi/file_system_types.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 TEST(FileSystemURLTest, ToGURL) { 168 TEST(FileSystemURLTest, ToGURL) {
169 EXPECT_TRUE(FileSystemURL().ToGURL().is_empty()); 169 EXPECT_TRUE(FileSystemURL().ToGURL().is_empty());
170 const char* kTestURL[] = { 170 const char* kTestURL[] = {
171 "filesystem:http://chromium.org/persistent/directory/file0", 171 "filesystem:http://chromium.org/persistent/directory/file0",
172 "filesystem:http://chromium.org/temporary/directory/file1", 172 "filesystem:http://chromium.org/temporary/directory/file1",
173 "filesystem:http://chromium.org/isolated/directory/file2", 173 "filesystem:http://chromium.org/isolated/directory/file2",
174 "filesystem:http://chromium.org/external/directory/file2", 174 "filesystem:http://chromium.org/external/directory/file2",
175 "filesystem:http://chromium.org/test/directory/file3", 175 "filesystem:http://chromium.org/test/directory/file3",
176 "filesystem:http://chromium.org/test/plus%2B/space%20/colon%3A",
176 }; 177 };
177 178
178 for (size_t i = 0; i < arraysize(kTestURL); ++i) { 179 for (size_t i = 0; i < arraysize(kTestURL); ++i) {
179 EXPECT_EQ( 180 EXPECT_EQ(
180 kTestURL[i], 181 kTestURL[i],
181 FileSystemURL::CreateForTest(GURL(kTestURL[i])).ToGURL().spec()); 182 FileSystemURL::CreateForTest(GURL(kTestURL[i])).ToGURL().spec());
182 } 183 }
183 } 184 }
184 185
185 TEST(FileSystemURLTest, DebugString) { 186 TEST(FileSystemURLTest, DebugString) {
(...skipping 25 matching lines...) Expand all
211 base::FilePath::FromUTF8Unsafe("a")); 212 base::FilePath::FromUTF8Unsafe("a"));
212 213
213 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_a)); 214 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_a));
214 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_b)); 215 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_b));
215 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_foo_perm_a)); 216 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_foo_perm_a));
216 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_temp_a)); 217 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_temp_a));
217 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_perm_a)); 218 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_perm_a));
218 } 219 }
219 220
220 } // namespace content 221 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | webkit/browser/fileapi/file_system_url.cc » ('j') | webkit/browser/fileapi/file_system_url.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698