OLD | NEW |
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 Loading... |
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 |
OLD | NEW |