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

Side by Side Diff: chrome/browser/cocoa/web_drop_target_unittest.mm

Issue 1596025: Move third_pary/mozilla/include up one directory. (Closed)
Patch Set: Created 10 years, 8 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
« no previous file with comments | « chrome/browser/cocoa/web_drop_target.mm ('k') | chrome/browser/shell_integration_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/scoped_nsautorelease_pool.h" 5 #include "base/scoped_nsautorelease_pool.h"
6 #include "base/sys_string_conversions.h" 6 #include "base/sys_string_conversions.h"
7 #import "chrome/browser/cocoa/cocoa_test_helper.h" 7 #import "chrome/browser/cocoa/cocoa_test_helper.h"
8 #import "chrome/browser/cocoa/web_drop_target.h" 8 #import "chrome/browser/cocoa/web_drop_target.h"
9 #include "chrome/browser/renderer_host/test/test_render_view_host.h" 9 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #import "third_party/mozilla/include/NSPasteboard+Utils.h" 11 #import "third_party/mozilla/NSPasteboard+Utils.h"
12 #include "webkit/glue/webdropdata.h" 12 #include "webkit/glue/webdropdata.h"
13 13
14 class WebDropTargetTest : public RenderViewHostTestHarness { 14 class WebDropTargetTest : public RenderViewHostTestHarness {
15 public: 15 public:
16 virtual void SetUp() { 16 virtual void SetUp() {
17 RenderViewHostTestHarness::SetUp(); 17 RenderViewHostTestHarness::SetUp();
18 CocoaTest::BootstrapCocoa(); 18 CocoaTest::BootstrapCocoa();
19 drop_target_.reset([[WebDropTarget alloc] initWithTabContents:contents()]); 19 drop_target_.reset([[WebDropTarget alloc] initWithTabContents:contents()]);
20 } 20 }
21 21
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 NSString* textString = @"hi there"; 124 NSString* textString = @"hi there";
125 [pboard setString:htmlString forType:NSHTMLPboardType]; 125 [pboard setString:htmlString forType:NSHTMLPboardType];
126 [pboard setString:textString forType:NSStringPboardType]; 126 [pboard setString:textString forType:NSStringPboardType];
127 [drop_target_ populateWebDropData:&data fromPasteboard:pboard]; 127 [drop_target_ populateWebDropData:&data fromPasteboard:pboard];
128 EXPECT_EQ(data.url.spec(), "http://www.google.com/"); 128 EXPECT_EQ(data.url.spec(), "http://www.google.com/");
129 EXPECT_EQ(data.plain_text, base::SysNSStringToUTF16(textString)); 129 EXPECT_EQ(data.plain_text, base::SysNSStringToUTF16(textString));
130 EXPECT_EQ(data.text_html, base::SysNSStringToUTF16(htmlString)); 130 EXPECT_EQ(data.text_html, base::SysNSStringToUTF16(htmlString));
131 131
132 [pboard releaseGlobally]; 132 [pboard releaseGlobally];
133 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/web_drop_target.mm ('k') | chrome/browser/shell_integration_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698