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

Unified Diff: content/common_child/indexed_db/indexed_db_dispatcher_unittest.cc

Issue 16325022: move content/common_child to content/child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/common_child/indexed_db/indexed_db_dispatcher_unittest.cc
diff --git a/content/common_child/indexed_db/indexed_db_dispatcher_unittest.cc b/content/common_child/indexed_db/indexed_db_dispatcher_unittest.cc
deleted file mode 100644
index f4c900cd1cadbbe7fdaaf8ddb25642c3d6a7618b..0000000000000000000000000000000000000000
--- a/content/common_child/indexed_db/indexed_db_dispatcher_unittest.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/scoped_ptr.h"
-#include "base/values.h"
-#include "content/common/indexed_db/indexed_db_key.h"
-#include "content/common_child/indexed_db/indexed_db_dispatcher.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/WebKit/public/platform/WebData.h"
-#include "third_party/WebKit/public/platform/WebIDBCallbacks.h"
-
-using WebKit::WebData;
-using WebKit::WebIDBCallbacks;
-using WebKit::WebIDBDatabase;
-using WebKit::WebIDBDatabaseError;
-using WebKit::WebIDBKey;
-using WebKit::WebVector;
-
-namespace content {
-namespace {
-
-class MockCallbacks : public WebIDBCallbacks {
- public:
- MockCallbacks() : error_seen_(false) {}
-
- virtual void onError(const WebIDBDatabaseError&) OVERRIDE {
- error_seen_ = true;
- }
-
- bool error_seen() const { return error_seen_; }
-
- private:
- bool error_seen_;
-};
-
-} // namespace
-
-TEST(IndexedDBDispatcherTest, ValueSizeTest) {
- const std::vector<char> data(kMaxIDBValueSizeInBytes + 1);
- const WebData value(&data.front(), data.size());
- const int32 ipc_dummy_id = -1;
- const int64 transaction_id = 1;
- const int64 object_store_id = 2;
-
- MockCallbacks callbacks;
- IndexedDBDispatcher dispatcher;
- IndexedDBKey key(0, WebIDBKey::NumberType);
- dispatcher.RequestIDBDatabasePut(ipc_dummy_id,
- transaction_id,
- object_store_id,
- value,
- key,
- WebIDBDatabase::AddOrUpdate,
- &callbacks,
- WebVector<long long>(),
- WebVector<WebVector<WebIDBKey> >());
-
- EXPECT_TRUE(callbacks.error_seen());
-}
-
-} // namespace content
« no previous file with comments | « content/common_child/indexed_db/indexed_db_dispatcher.cc ('k') | content/common_child/indexed_db/indexed_db_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698