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

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

Issue 197203004: Fix "unreachable code" warnings (MSVC warning 4702) in ppapi/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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
« no previous file with comments | « ppapi/proxy/serialized_var.cc ('k') | ppapi/tests/test_talk_private.cc » ('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 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 "ppapi/tests/test_file_mapping.h" 5 #include "ppapi/tests/test_file_mapping.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 instance_->pp_instance(), 491 instance_->pp_instance(),
492 file_io2.pp_resource(), 492 file_io2.pp_resource(),
493 page_size, 493 page_size,
494 PP_FILEMAPPROTECTION_WRITE | PP_FILEMAPPROTECTION_READ, 494 PP_FILEMAPPROTECTION_WRITE | PP_FILEMAPPROTECTION_READ,
495 PP_FILEMAPFLAG_SHARED | PP_FILEMAPFLAG_FIXED, 495 PP_FILEMAPFLAG_SHARED | PP_FILEMAPFLAG_FIXED,
496 0, 496 0,
497 &address_of_middle_page, 497 &address_of_middle_page,
498 callback.GetCallback().pp_completion_callback())); 498 callback.GetCallback().pp_completion_callback()));
499 CHECK_CALLBACK_BEHAVIOR(callback); 499 CHECK_CALLBACK_BEHAVIOR(callback);
500 ASSERT_EQ(PP_OK, callback.result()); 500 ASSERT_EQ(PP_OK, callback.result());
501 PASS();
502 501
503 // Write something else to the mapped region, then unmap, and see if it 502 // Write something else to the mapped region, then unmap, and see if it
504 // gets written to both files. (Note we have to Unmap to make sure that the 503 // gets written to both files. (Note we have to Unmap to make sure that the
505 // write is committed). 504 // write is committed).
506 memset(address, 'c', kNumPages * page_size); 505 memset(address, 'c', kNumPages * page_size);
507 callback.WaitForResult( 506 callback.WaitForResult(
508 file_mapping_if_->Unmap( 507 file_mapping_if_->Unmap(
509 instance_->pp_instance(), address, kNumPages * page_size, 508 instance_->pp_instance(), address, kNumPages * page_size,
510 callback.GetCallback().pp_completion_callback())); 509 callback.GetCallback().pp_completion_callback()));
511 CHECK_CALLBACK_BEHAVIOR(callback); 510 CHECK_CALLBACK_BEHAVIOR(callback);
(...skipping 19 matching lines...) Expand all
531 0, 530 0,
532 &new_file_contents2, 531 &new_file_contents2,
533 callback_type())); 532 callback_type()));
534 ASSERT_EQ(expected_file_contents2, new_file_contents2); 533 ASSERT_EQ(expected_file_contents2, new_file_contents2);
535 534
536 // TODO(dmichael): Test non-zero offset 535 // TODO(dmichael): Test non-zero offset
537 536
538 PASS(); 537 PASS();
539 } 538 }
540 539
OLDNEW
« no previous file with comments | « ppapi/proxy/serialized_var.cc ('k') | ppapi/tests/test_talk_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698