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

Side by Side Diff: content/common/indexed_db/indexed_db_dispatcher_unittest.cc

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 1 month 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) 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "content/common/indexed_db/indexed_db_dispatcher.h" 7 #include "content/common/indexed_db/indexed_db_dispatcher.h"
8 #include "content/common/indexed_db/indexed_db_key.h" 8 #include "content/common/indexed_db/indexed_db_key.h"
9 #include "content/public/common/serialized_script_value.h" 9 #include "content/public/common/serialized_script_value.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h"
14 14
15 using content::IndexedDBKey;
16 using content::SerializedScriptValue;
17 using WebKit::WebVector; 15 using WebKit::WebVector;
18 using WebKit::WebString; 16 using WebKit::WebString;
19 17
18 namespace content {
19
20 class FakeWebIDBTransaction : public WebKit::WebIDBTransaction { 20 class FakeWebIDBTransaction : public WebKit::WebIDBTransaction {
21 public: 21 public:
22 FakeWebIDBTransaction() {} 22 FakeWebIDBTransaction() {}
23 }; 23 };
24 24
25 TEST(IndexedDBDispatcherTest, ValueSizeTest) { 25 TEST(IndexedDBDispatcherTest, ValueSizeTest) {
26 string16 data; 26 string16 data;
27 data.resize(kMaxIDBValueSizeInBytes / sizeof(char16) + 1, 'x'); 27 data.resize(kMaxIDBValueSizeInBytes / sizeof(char16) + 1, 'x');
28 const bool kIsNull = false; 28 const bool kIsNull = false;
29 const bool kIsInvalid = false; 29 const bool kIsInvalid = false;
(...skipping 11 matching lines...) Expand all
41 WebKit::WebIDBObjectStore::AddOrUpdate, 41 WebKit::WebIDBObjectStore::AddOrUpdate,
42 static_cast<WebKit::WebIDBCallbacks*>(NULL), 42 static_cast<WebKit::WebIDBCallbacks*>(NULL),
43 dummy_id, 43 dummy_id,
44 FakeWebIDBTransaction(), 44 FakeWebIDBTransaction(),
45 WebVector<WebString>(), 45 WebVector<WebString>(),
46 WebVector<WebVector<WebKit::WebIDBKey> >(), 46 WebVector<WebVector<WebKit::WebIDBKey> >(),
47 &ec); 47 &ec);
48 EXPECT_NE(ec, 0); 48 EXPECT_NE(ec, 0);
49 } 49 }
50 } 50 }
51
52 } // namespace content
OLDNEW
« no previous file with comments | « content/common/indexed_db/indexed_db_dispatcher.cc ('k') | content/common/indexed_db/indexed_db_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698