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

Side by Side Diff: chrome/browser/views/extensions/browser_action_drag_data_unittest.cc

Issue 3129007: FBTF: Forward declare everything possible in testing_profile.h (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: argh mac problems now Created 10 years, 4 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/os_exchange_data.h" 5 #include "app/os_exchange_data.h"
6 #include "app/os_exchange_data_provider_win.h" 6 #include "app/os_exchange_data_provider_win.h"
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "chrome/browser/views/extensions/browser_action_drag_data.h" 8 #include "chrome/browser/views/extensions/browser_action_drag_data.h"
9 #include "chrome/test/testing_profile.h" 9 #include "chrome/test/testing_profile.h"
10 #include "googleurl/src/gurl.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace { 13 namespace {
13 14
14 OSExchangeData::Provider* CloneProvider(const OSExchangeData& data) { 15 OSExchangeData::Provider* CloneProvider(const OSExchangeData& data) {
15 return new OSExchangeDataProviderWin( 16 return new OSExchangeDataProviderWin(
16 OSExchangeDataProviderWin::GetIDataObject(data)); 17 OSExchangeDataProviderWin::GetIDataObject(data));
17 } 18 }
18 19
19 } // namespace 20 } // namespace
(...skipping 26 matching lines...) Expand all
46 OSExchangeData data; 47 OSExchangeData data;
47 data.SetPickledData(BrowserActionDragData::GetBrowserActionCustomFormat(), 48 data.SetPickledData(BrowserActionDragData::GetBrowserActionCustomFormat(),
48 pickle); 49 pickle);
49 50
50 BrowserActionDragData drag_data; 51 BrowserActionDragData drag_data;
51 EXPECT_TRUE(drag_data.Read(OSExchangeData(CloneProvider(data)))); 52 EXPECT_TRUE(drag_data.Read(OSExchangeData(CloneProvider(data))));
52 ASSERT_TRUE(drag_data.IsFromProfile(profile.GetOriginalProfile())); 53 ASSERT_TRUE(drag_data.IsFromProfile(profile.GetOriginalProfile()));
53 ASSERT_STREQ(extension_id.c_str(), drag_data.id().c_str()); 54 ASSERT_STREQ(extension_id.c_str(), drag_data.id().c_str());
54 ASSERT_EQ(42, drag_data.index()); 55 ASSERT_EQ(42, drag_data.index());
55 } 56 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_manager_unittest.cc ('k') | chrome/browser/web_applications/web_app_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698