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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/media_indicator_view_unittest.mm

Issue 688523002: [Cocoa] Tab audio mute control, behind a switch (off by default). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Prevent TabStripController from unconditionally causing creation of MediaIndicatorButton. Created 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "chrome/browser/ui/cocoa/tabs/media_indicator_view.h"
6
7 #include "base/mac/scoped_nsobject.h"
8 #include "base/message_loop/message_loop.h"
9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "testing/platform_test.h"
12
13 namespace {
14
15 class MediaIndicatorViewTest : public CocoaTest {
16 public:
17 MediaIndicatorViewTest() {
18 view_.reset([[MediaIndicatorView alloc] init]);
19 EXPECT_TRUE(view_ != nil);
20 EXPECT_EQ(TAB_MEDIA_STATE_NONE, [view_ animatingMediaState]);
21
22 [[test_window() contentView] addSubview:view_.get()];
23
24 [view_ updateIndicator:TAB_MEDIA_STATE_AUDIO_PLAYING];
25 EXPECT_EQ(TAB_MEDIA_STATE_AUDIO_PLAYING, [view_ animatingMediaState]);
26 }
27
28 base::scoped_nsobject<MediaIndicatorView> view_;
29 base::MessageLoopForUI message_loop_; // Needed for gfx::Animation.
30 };
31
32 TEST_VIEW(MediaIndicatorViewTest, view_)
33
34 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698