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

Side by Side Diff: content/child/fileapi/webfilewriter_base_unittest.cc

Issue 23762002: Make WebFileSystemCallbacks not self-destruct (Chrome-side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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 | « content/child/fileapi/webfilewriter_base.cc ('k') | webkit/common/fileapi/file_system_util.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 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 "content/child/fileapi/webfilewriter_base.h" 5 #include "content/child/fileapi/webfilewriter_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/WebKit/public/platform/WebFileError.h"
13 #include "third_party/WebKit/public/platform/WebFileWriterClient.h"
12 #include "third_party/WebKit/public/platform/WebURL.h" 14 #include "third_party/WebKit/public/platform/WebURL.h"
13 #include "third_party/WebKit/public/web/WebFileError.h"
14 #include "third_party/WebKit/public/web/WebFileWriterClient.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 namespace { 19 namespace {
20 20
21 // We use particular offsets to trigger particular behaviors 21 // We use particular offsets to trigger particular behaviors
22 // in the TestableFileWriter. 22 // in the TestableFileWriter.
23 const int kNoOffset = -1; 23 const int kNoOffset = -1;
24 const int kBasicFileTruncate_Offset = 1; 24 const int kBasicFileTruncate_Offset = 1;
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 402
403 reset(); 403 reset();
404 delete_in_client_callback_ = true; 404 delete_in_client_callback_ = true;
405 writer()->truncate(kErrorFileTruncate_Offset); 405 writer()->truncate(kErrorFileTruncate_Offset);
406 EXPECT_FALSE(testable_writer_.get()); 406 EXPECT_FALSE(testable_writer_.get());
407 407
408 // Not crashing counts as passing. 408 // Not crashing counts as passing.
409 } 409 }
410 410
411 } // namespace content 411 } // namespace content
OLDNEW
« no previous file with comments | « content/child/fileapi/webfilewriter_base.cc ('k') | webkit/common/fileapi/file_system_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698