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

Side by Side Diff: webkit/fileapi/syncable/local_file_sync_status_unittest.cc

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test on Win Created 7 years, 11 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 (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 "webkit/fileapi/syncable/local_file_sync_status.h" 5 #include "webkit/fileapi/syncable/local_file_sync_status.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace fileapi { 11 namespace fileapi {
12 12
13 namespace { 13 namespace {
14 14
15 const char kParent[] = "filesystem:http://foo.com/test/dir a"; 15 const char kParent[] = "filesystem:http://foo.com/test/dir a";
16 const char kFile[] = "filesystem:http://foo.com/test/dir a/dir b"; 16 const char kFile[] = "filesystem:http://foo.com/test/dir a/dir b";
17 const char kChild[] = "filesystem:http://foo.com/test/dir a/dir b/file"; 17 const char kChild[] = "filesystem:http://foo.com/test/dir a/dir b/file";
18 18
19 const char kOther1[] = "filesystem:http://foo.com/test/dir b"; 19 const char kOther1[] = "filesystem:http://foo.com/test/dir b";
20 const char kOther2[] = "filesystem:http://foo.com/temporary/dir a"; 20 const char kOther2[] = "filesystem:http://foo.com/temporary/dir a";
21 21
22 FileSystemURL URL(const char* spec) { 22 FileSystemURL URL(const char* spec) {
23 return FileSystemURL(GURL(spec)); 23 return FileSystemURL::CreateForTest((GURL(spec)));
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 TEST(LocalFileSyncStatusTest, WritingSimple) { 28 TEST(LocalFileSyncStatusTest, WritingSimple) {
29 LocalFileSyncStatus status; 29 LocalFileSyncStatus status;
30 30
31 status.StartWriting(URL(kFile)); 31 status.StartWriting(URL(kFile));
32 status.StartWriting(URL(kFile)); 32 status.StartWriting(URL(kFile));
33 status.EndWriting(URL(kFile)); 33 status.EndWriting(URL(kFile));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 EXPECT_TRUE(status.IsSyncable(URL(kOther2))); 78 EXPECT_TRUE(status.IsSyncable(URL(kOther2)));
79 79
80 status.EndSyncing(URL(kFile)); 80 status.EndSyncing(URL(kFile));
81 81
82 EXPECT_TRUE(status.IsWritable(URL(kFile))); 82 EXPECT_TRUE(status.IsWritable(URL(kFile)));
83 EXPECT_TRUE(status.IsWritable(URL(kParent))); 83 EXPECT_TRUE(status.IsWritable(URL(kParent)));
84 EXPECT_TRUE(status.IsWritable(URL(kChild))); 84 EXPECT_TRUE(status.IsWritable(URL(kChild)));
85 } 85 }
86 86
87 } // namespace fileapi 87 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/syncable/canned_syncable_file_system.cc ('k') | webkit/fileapi/syncable/syncable_file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698