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

Side by Side Diff: content/browser/indexed_db/indexed_db_backing_store_unittest.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser/indexed_db/indexed_db_backing_store.h" 5 #include "content/browser/indexed_db/indexed_db_backing_store.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 int limit = file_util::GetMaximumPathComponentLength(base_path); 412 int limit = file_util::GetMaximumPathComponentLength(base_path);
413 EXPECT_GT(limit, 0); 413 EXPECT_GT(limit, 0);
414 414
415 std::string origin(limit + 1, 'x'); 415 std::string origin(limit + 1, 'x');
416 WebSecurityOrigin too_long_origin = 416 WebSecurityOrigin too_long_origin =
417 WebSecurityOrigin::createFromString(WebKit::WebString::fromUTF8( 417 WebSecurityOrigin::createFromString(WebKit::WebString::fromUTF8(
418 std::string("http://" + origin + ":81/").c_str())); 418 std::string("http://" + origin + ":81/").c_str()));
419 scoped_refptr<IndexedDBBackingStore> diskStore1 = 419 scoped_refptr<IndexedDBBackingStore> diskStore1 =
420 factory->TestOpenBackingStore(too_long_origin, base_path); 420 factory->TestOpenBackingStore(too_long_origin, base_path);
421 EXPECT_FALSE(diskStore1); 421 EXPECT_FALSE(diskStore1.get());
422 422
423 WebSecurityOrigin ok_origin = 423 WebSecurityOrigin ok_origin =
424 WebSecurityOrigin::createFromString("http://someorigin.com:82/"); 424 WebSecurityOrigin::createFromString("http://someorigin.com:82/");
425 scoped_refptr<IndexedDBBackingStore> diskStore2 = 425 scoped_refptr<IndexedDBBackingStore> diskStore2 =
426 factory->TestOpenBackingStore(ok_origin, base_path); 426 factory->TestOpenBackingStore(ok_origin, base_path);
427 EXPECT_TRUE(diskStore2); 427 EXPECT_TRUE(diskStore2.get());
428 } 428 }
429 429
430 } // namespace 430 } // namespace
431 431
432 } // namespace content 432 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698