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

Side by Side Diff: native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc

Issue 2156503002: [NaCl SDK] Expose Google Drive to nacl_io. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <errno.h> 5 #include <errno.h>
6 #include <fcntl.h> 6 #include <fcntl.h>
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 EXPECT_EQ(EISDIR, node->Write(attr, &buffer[0], sizeof(buffer), &bytes_read)); 362 EXPECT_EQ(EISDIR, node->Write(attr, &buffer[0], sizeof(buffer), &bytes_read));
363 } 363 }
364 364
365 TEST_F(Html5FsTest, GetStat) { 365 TEST_F(Html5FsTest, GetStat) {
366 const int creation_time = 1000; 366 const int creation_time = 1000;
367 const int access_time = 2000; 367 const int access_time = 2000;
368 const int modified_time = 3000; 368 const int modified_time = 3000;
369 const char* contents = "contents"; 369 const char* contents = "contents";
370 370
371 // Create fake file. 371 // Create fake file.
372 FakeHtml5FsNode* fake_node; 372 FakeNode* fake_node;
373 EXPECT_TRUE(ppapi_html5_.filesystem_template()->AddFile( 373 EXPECT_TRUE(ppapi_html5_.filesystem_template()->AddFile(
374 "/file", contents, &fake_node)); 374 "/file", contents, &fake_node));
375 fake_node->set_creation_time(creation_time); 375 fake_node->set_creation_time(creation_time);
376 fake_node->set_last_access_time(access_time); 376 fake_node->set_last_access_time(access_time);
377 fake_node->set_last_modified_time(modified_time); 377 fake_node->set_last_modified_time(modified_time);
378 378
379 // Create fake directory. 379 // Create fake directory.
380 EXPECT_TRUE( 380 EXPECT_TRUE(
381 ppapi_html5_.filesystem_template()->AddDirectory("/dir", &fake_node)); 381 ppapi_html5_.filesystem_template()->AddDirectory("/dir", &fake_node));
382 fake_node->set_creation_time(creation_time); 382 fake_node->set_creation_time(creation_time);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 EXPECT_EQ(dirents[i].d_ino, file2_ino); 547 EXPECT_EQ(dirents[i].d_ino, file2_ino);
548 } 548 }
549 } 549 }
550 550
551 EXPECT_EQ(1, dirnames.count("file")); 551 EXPECT_EQ(1, dirnames.count("file"));
552 EXPECT_EQ(1, dirnames.count("file2")); 552 EXPECT_EQ(1, dirnames.count("file2"));
553 EXPECT_EQ(1, dirnames.count(".")); 553 EXPECT_EQ(1, dirnames.count("."));
554 EXPECT_EQ(1, dirnames.count("..")); 554 EXPECT_EQ(1, dirnames.count(".."));
555 } 555 }
556 } 556 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698