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

Side by Side Diff: chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller_unittest.mm

Issue 186133005: Adds extension name to the screencast notification bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h" 5 #import "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/browser/media/desktop_media_list_observer.h" 10 #include "chrome/browser/media/desktop_media_list_observer.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 DesktopMediaPicker::DoneCallback callback = 51 DesktopMediaPicker::DoneCallback callback =
52 base::Bind(&DesktopMediaPickerControllerTest::OnResult, 52 base::Bind(&DesktopMediaPickerControllerTest::OnResult,
53 base::Unretained(this)); 53 base::Unretained(this));
54 54
55 controller_.reset( 55 controller_.reset(
56 [[DesktopMediaPickerController alloc] 56 [[DesktopMediaPickerController alloc]
57 initWithMediaList:scoped_ptr<DesktopMediaList>(media_list_) 57 initWithMediaList:scoped_ptr<DesktopMediaList>(media_list_)
58 parent:nil 58 parent:nil
59 callback:callback 59 callback:callback
60 appName:base::ASCIIToUTF16("Screenshare Test")]); 60 appName:base::ASCIIToUTF16("Screenshare Test")
61 targetName:base::ASCIIToUTF16("Screenshare Test")]);
Sergey Ulanov 2014/03/06 19:20:05 nit: Maybe "http://example.com" as this supposed t
jiayl 2014/03/06 22:01:31 Done.
61 } 62 }
62 63
63 virtual void TearDown() OVERRIDE { 64 virtual void TearDown() OVERRIDE {
64 controller_.reset(); 65 controller_.reset();
65 CocoaTest::TearDown(); 66 CocoaTest::TearDown();
66 } 67 }
67 68
68 bool WaitForCallback() { 69 bool WaitForCallback() {
69 if (!callback_called_) { 70 if (!callback_called_) {
70 base::RunLoop().RunUntilIdle(); 71 base::RunLoop().RunUntilIdle();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 media_list_->SetSourceName(1, base::ASCIIToUTF16("foo")); 202 media_list_->SetSourceName(1, base::ASCIIToUTF16("foo"));
202 NSArray* items = [controller_ items]; 203 NSArray* items = [controller_ items];
203 EXPECT_NSEQ(@"foo", [[items objectAtIndex:1] imageTitle]); 204 EXPECT_NSEQ(@"foo", [[items objectAtIndex:1] imageTitle]);
204 205
205 media_list_->MoveSource(1, 0); 206 media_list_->MoveSource(1, 0);
206 EXPECT_NSEQ(@"foo", [[items objectAtIndex:0] imageTitle]); 207 EXPECT_NSEQ(@"foo", [[items objectAtIndex:0] imageTitle]);
207 208
208 media_list_->MoveSource(0, 1); 209 media_list_->MoveSource(0, 1);
209 EXPECT_NSEQ(@"foo", [[items objectAtIndex:1] imageTitle]); 210 EXPECT_NSEQ(@"foo", [[items objectAtIndex:1] imageTitle]);
210 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698