Lines Matching defs:URL

73   FileSystemURL URL(const std::string& path) {
74 return file_system_.URL(path);
89 // Get the changes for URL and verify.
97 // Clear the URL from the change tracker.
128 change_tracker()->OnCreateDirectory(URL(kPath));
133 EXPECT_EQ(URL(kPath), *urls.begin());
135 change_tracker()->DemoteChangesForURL(URL(kPath));
140 change_tracker()->PromoteDemotedChangesForURL(URL(kPath));
144 EXPECT_EQ(URL(kPath), *urls.begin());
146 change_tracker()->DemoteChangesForURL(URL(kPath));
147 change_tracker()->OnRemoveDirectory(URL(kPath));
165 change_tracker()->OnCreateDirectory(URL(kPath0));
166 change_tracker()->OnRemoveDirectory(URL(kPath0)); // Offset the create.
167 change_tracker()->OnRemoveDirectory(URL(kPath1));
168 change_tracker()->OnCreateDirectory(URL(kPath2));
169 change_tracker()->OnRemoveFile(URL(kPath3));
170 change_tracker()->OnModifyFile(URL(kPath4));
171 change_tracker()->OnCreateFile(URL(kPath5));
172 change_tracker()->OnRemoveFile(URL(kPath5)); // Recorded as 'delete'.
178 EXPECT_TRUE(ContainsKey(urls, URL(kPath1)));
179 EXPECT_TRUE(ContainsKey(urls, URL(kPath2)));
180 EXPECT_TRUE(ContainsKey(urls, URL(kPath3)));
181 EXPECT_TRUE(ContainsKey(urls, URL(kPath4)));
182 EXPECT_TRUE(ContainsKey(urls, URL(kPath5)));
185 EXPECT_FALSE(ContainsKey(urls, URL(kPath0)));
198 EXPECT_EQ(URL(kPath1), urls_to_process[0]);
199 EXPECT_EQ(URL(kPath2), urls_to_process[1]);
200 EXPECT_EQ(URL(kPath3), urls_to_process[2]);
201 EXPECT_EQ(URL(kPath4), urls_to_process[3]);
202 EXPECT_EQ(URL(kPath5), urls_to_process[4]);
205 change_tracker()->OnModifyFile(URL(kPath4));
211 EXPECT_EQ(URL(kPath1), urls_to_process[0]);
212 EXPECT_EQ(URL(kPath2), urls_to_process[1]);
213 EXPECT_EQ(URL(kPath3), urls_to_process[2]);
214 EXPECT_EQ(URL(kPath5), urls_to_process[3]);
215 EXPECT_EQ(URL(kPath4), urls_to_process[4]);
221 change_tracker()->DemoteChangesForURL(URL(kPath1));
222 change_tracker()->DemoteChangesForURL(URL(kPath3));
228 EXPECT_EQ(URL(kPath2), urls_to_process[0]);
229 EXPECT_EQ(URL(kPath5), urls_to_process[1]);
230 EXPECT_EQ(URL(kPath4), urls_to_process[2]);
239 EXPECT_EQ(URL(kPath1), urls_to_process[0]);
240 EXPECT_EQ(URL(kPath2), urls_to_process[1]);
241 EXPECT_EQ(URL(kPath3), urls_to_process[2]);
242 EXPECT_EQ(URL(kPath5), urls_to_process[3]);
243 EXPECT_EQ(URL(kPath4), urls_to_process[4]);
249 VerifyAndClearChange(URL(kPath1),
252 VerifyAndClearChange(URL(kPath2),
255 VerifyAndClearChange(URL(kPath3),
258 VerifyAndClearChange(URL(kPath4),
261 VerifyAndClearChange(URL(kPath5),
286 file_system_.CreateFile(URL(kPath0))); // Creates a file.
288 file_system_.CreateDirectory(URL(kPath1))); // Creates a dir.
290 file_system_.CreateDirectory(URL(kPath2))); // Creates another dir.
292 file_system_.CreateFile(URL(kPath3))); // Creates a file.
294 file_system_.TruncateFile(URL(kPath3), 1)); // Modifies the file.
296 file_system_.CreateFile(URL(kPath4))); // Creates another file.
299 URL(kPath4), blob.GetBlobDataHandle()));
318 VerifyAndClearChange(URL(kPath0),
321 VerifyAndClearChange(URL(kPath1),
324 VerifyAndClearChange(URL(kPath2),
327 VerifyAndClearChange(URL(kPath3),
330 VerifyAndClearChange(URL(kPath4),
352 file_system_.CreateFile(URL(kPath0)));
354 file_system_.Remove(URL(kPath0), false /* recursive */));
358 file_system_.CreateDirectory(URL(kPath1)));
360 file_system_.Remove(URL(kPath1), false /* recursive */));
364 file_system_.CreateDirectory(URL(kPath2)));
366 file_system_.CreateFile(URL(kPath3)));
368 file_system_.CreateDirectory(URL(kPath4)));
370 file_system_.CreateFile(URL(kPath5)));
372 file_system_.Remove(URL(kPath2), true /* recursive */));
391 VerifyAndClearChange(URL(kPath0),
394 VerifyAndClearChange(URL(kPath1),
397 VerifyAndClearChange(URL(kPath2),
400 VerifyAndClearChange(URL(kPath3),
403 VerifyAndClearChange(URL(kPath4),
406 VerifyAndClearChange(URL(kPath5),
437 file_system_.CreateFile(URL(kPath0))); // Creates a file.
439 file_system_.CreateDirectory(URL(kPath1))); // Creates a dir.
441 file_system_.CreateDirectory(URL(kPath2))); // Creates another dir.
443 file_system_.CreateFile(URL(kPath3))); // Creates a file.
445 file_system_.TruncateFile(URL(kPath3), 1)); // Modifies the file.
447 file_system_.CreateFile(URL(kPath4))); // Creates another file.
450 URL(kPath4), blob.GetBlobDataHandle()));
455 change_tracker()->ClearChangesForURL(URL(kPath0));
456 change_tracker()->ClearChangesForURL(URL(kPath1));
457 change_tracker()->ClearChangesForURL(URL(kPath2));
458 change_tracker()->ClearChangesForURL(URL(kPath3));
459 change_tracker()->ClearChangesForURL(URL(kPath4));
467 file_system_.Copy(URL(kPath0), URL(kPath0Copy))); // Copy the file.
469 file_system_.Copy(URL(kPath1), URL(kPath1Copy))); // Copy the dir.
485 VerifyAndClearChange(URL(kPath0Copy),
488 VerifyAndClearChange(URL(kPath1Copy),
491 VerifyAndClearChange(URL(kPath2Copy),
494 VerifyAndClearChange(URL(kPath3Copy),
497 VerifyAndClearChange(URL(kPath4Copy),
524 file_system_.CreateFile(URL(kPath0)));
526 file_system_.CreateDirectory(URL(kPath1)));
528 file_system_.CreateFile(URL(kPath2)));
530 file_system_.CreateDirectory(URL(kPath3)));
532 file_system_.CreateFile(URL(kPath4)));
537 change_tracker()->ClearChangesForURL(URL(kPath0));
538 change_tracker()->ClearChangesForURL(URL(kPath1));
539 change_tracker()->ClearChangesForURL(URL(kPath2));
540 change_tracker()->ClearChangesForURL(URL(kPath3));
541 change_tracker()->ClearChangesForURL(URL(kPath4));
549 file_system_.Move(URL(kPath0), URL(kPath5)));
551 file_system_.Move(URL(kPath1), URL(kPath6)));
570 VerifyAndClearChange(URL(kPath0),
573 VerifyAndClearChange(URL(kPath1),
576 VerifyAndClearChange(URL(kPath3),
579 VerifyAndClearChange(URL(kPath5),
582 VerifyAndClearChange(URL(kPath6),
585 VerifyAndClearChange(URL(kPath7),
588 VerifyAndClearChange(URL(kPath8),
591 VerifyAndClearChange(URL(kPath9),
611 file_system_.CreateDirectory(URL(kPath0)));
613 file_system_.CreateFile(URL(kPath1)));
615 file_system_.CreateDirectory(URL(kPath2)));
617 file_system_.Copy(URL(kPath0), URL(kPath0Copy)));
624 EXPECT_EQ(URL(kPath0), urls_to_process[0]);
625 EXPECT_EQ(URL(kPath1), urls_to_process[1]);
626 EXPECT_EQ(URL(kPath2), urls_to_process[2]);
630 EXPECT_EQ(URL(kPath0Copy), urls_to_process[3]);
631 EXPECT_TRUE(URL(kPath1Copy) == urls_to_process[4] ||
632 URL(kPath2Copy) == urls_to_process[4]);
633 EXPECT_TRUE(URL(kPath1Copy) == urls_to_process[5] ||
634 URL(kPath2Copy) == urls_to_process[5]);
646 file_system_.CreateDirectory(URL(kPath0)));
648 file_system_.CreateFile(URL(kPath1)));
650 file_system_.CreateFile(URL(kPath2)));
652 file_system_.Remove(URL(kPath0), true /* recursive */));
670 EXPECT_TRUE(ContainsKey(urls, URL(kPath1)));
671 EXPECT_TRUE(ContainsKey(urls, URL(kPath2)));
683 file_system_.CreateDirectory(URL(kPath0)));
685 file_system_.CreateFile(URL(kPath1)));
687 file_system_.CreateDirectory(URL(kPath2)));
689 file_system_.CreateDirectory(URL(kPath3)));
694 EXPECT_TRUE(ContainsKey(urls, URL(kPath0)));
695 EXPECT_TRUE(ContainsKey(urls, URL(kPath1)));
696 EXPECT_TRUE(ContainsKey(urls, URL(kPath2)));
697 EXPECT_TRUE(ContainsKey(urls, URL(kPath3)));