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

Side by Side Diff: ppapi/tests/test_post_message.cc

Issue 2297043002: Web expose FileSystemFileEntry, FileSystemDirectoryEntry and friends (Closed)
Patch Set: Rebased Created 4 years 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
« no previous file with comments | « extensions/common/api/runtime.json ('k') | storage/common/fileapi/file_system_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/tests/test_post_message.h" 5 #include "ppapi/tests/test_post_message.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 0, kTestString, content_length, callback.GetCallback())); 601 0, kTestString, content_length, callback.GetCallback()));
602 CHECK_CALLBACK_BEHAVIOR(callback); 602 CHECK_CALLBACK_BEHAVIOR(callback);
603 ASSERT_EQ(callback.result(), content_length); 603 ASSERT_EQ(callback.result(), content_length);
604 write_file_io.Close(); 604 write_file_io.Close();
605 605
606 // Pass the file system to JavaScript and have the listener test some 606 // Pass the file system to JavaScript and have the listener test some
607 // properties of the file system. 607 // properties of the file system.
608 pp::Var file_system_var(file_system); 608 pp::Var file_system_var(file_system);
609 std::vector<std::string> properties_to_check; 609 std::vector<std::string> properties_to_check;
610 properties_to_check.push_back( 610 properties_to_check.push_back(
611 "message_event.data.constructor.name === 'DOMFileSystem'"); 611 "message_event.data.constructor.name === 'FileSystem'");
612 properties_to_check.push_back( 612 properties_to_check.push_back(
613 "message_event.data.root.constructor.name === 'DirectoryEntry'"); 613 "message_event.data.root.constructor.name === "
614 "'FileSystemDirectoryEntry'");
614 properties_to_check.push_back( 615 properties_to_check.push_back(
615 "message_event.data.name.indexOf(" 616 "message_event.data.name.indexOf("
616 " ':Temporary'," 617 " ':Temporary',"
617 " message_event.data.name.length - ':Temporary'.length) !== -1"); 618 " message_event.data.name.length - ':Temporary'.length) !== -1");
618 ASSERT_SUBTEST_SUCCESS(CheckMessageProperties(file_system_var, 619 ASSERT_SUBTEST_SUCCESS(CheckMessageProperties(file_system_var,
619 properties_to_check)); 620 properties_to_check));
620 621
621 // Set up the JavaScript message event listener to echo the data part of the 622 // Set up the JavaScript message event listener to echo the data part of the
622 // message event back to us. 623 // message event back to us.
623 ASSERT_TRUE(AddEchoingListener("message_event.data")); 624 ASSERT_TRUE(AddEchoingListener("message_event.data"));
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 ASSERT_TRUE(received_value <= kThreadsToRun); 895 ASSERT_TRUE(received_value <= kThreadsToRun);
895 ++received_counts[received_value]; 896 ++received_counts[received_value];
896 } 897 }
897 ASSERT_EQ(expected_counts, received_counts); 898 ASSERT_EQ(expected_counts, received_counts);
898 899
899 message_data_.clear(); 900 message_data_.clear();
900 ASSERT_TRUE(ClearListeners()); 901 ASSERT_TRUE(ClearListeners());
901 902
902 PASS(); 903 PASS();
903 } 904 }
OLDNEW
« no previous file with comments | « extensions/common/api/runtime.json ('k') | storage/common/fileapi/file_system_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698