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

Side by Side Diff: chrome/browser/ui/ash/launcher/browser_launcher_item_controller_unittest.cc

Issue 10868003: chromeos: Fix pixelated icons in app list and launcher (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h" 5 #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector>
9 10
10 #include "ash/launcher/launcher_model.h" 11 #include "ash/launcher/launcher_model.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 13 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
13 #include "chrome/browser/ui/tab_contents/tab_contents.h" 14 #include "chrome/browser/ui/tab_contents/tab_contents.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 15 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h" 16 #include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h"
16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 17 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
17 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
18 #include "content/public/test/test_browser_thread.h" 19 #include "content/public/test/test_browser_thread.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 int GetAndClearFetchCount() { 81 int GetAndClearFetchCount() {
81 int value = fetch_count_; 82 int value = fetch_count_;
82 fetch_count_ = 0; 83 fetch_count_ = 0;
83 return value; 84 return value;
84 } 85 }
85 86
86 // AppIconLoader implementation: 87 // AppIconLoader implementation:
87 virtual void FetchImage(const std::string& id) OVERRIDE { 88 virtual void FetchImage(const std::string& id) OVERRIDE {
88 fetch_count_++; 89 fetch_count_++;
89 } 90 }
91 virtual void ClearImage(const std::string& id) OVERRIDE {
92 }
90 93
91 private: 94 private:
92 int fetch_count_; 95 int fetch_count_;
93 96
94 DISALLOW_COPY_AND_ASSIGN(AppIconLoaderImpl); 97 DISALLOW_COPY_AND_ASSIGN(AppIconLoaderImpl);
95 }; 98 };
96 99
97 } // namespace 100 } // namespace
98 101
99 class BrowserLauncherItemControllerTest : 102 class BrowserLauncherItemControllerTest
100 public ChromeRenderViewHostTestHarness { 103 : public ChromeRenderViewHostTestHarness {
101 public: 104 public:
102 BrowserLauncherItemControllerTest() 105 BrowserLauncherItemControllerTest()
103 : browser_thread_(content::BrowserThread::UI, &message_loop_) { 106 : browser_thread_(content::BrowserThread::UI, &message_loop_) {
104 } 107 }
105 108
106 virtual void SetUp() OVERRIDE { 109 virtual void SetUp() OVERRIDE {
107 ChromeRenderViewHostTestHarness::SetUp(); 110 ChromeRenderViewHostTestHarness::SetUp();
108 111
109 activation_client_.reset( 112 activation_client_.reset(
110 new aura::test::TestActivationClient(root_window())); 113 new aura::test::TestActivationClient(root_window()));
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 EXPECT_EQ(ash::STATUS_RUNNING, app_state.GetUpdaterItem().status); 409 EXPECT_EQ(ash::STATUS_RUNNING, app_state.GetUpdaterItem().status);
407 410
408 // App window should go to attention state. 411 // App window should go to attention state.
409 app_state.window.SetProperty(aura::client::kDrawAttentionKey, true); 412 app_state.window.SetProperty(aura::client::kDrawAttentionKey, true);
410 EXPECT_EQ(ash::STATUS_ATTENTION, app_state.GetUpdaterItem().status); 413 EXPECT_EQ(ash::STATUS_ATTENTION, app_state.GetUpdaterItem().status);
411 414
412 // Activating app window should clear attention state. 415 // Activating app window should clear attention state.
413 activation_client_->ActivateWindow(&app_state.window); 416 activation_client_->ActivateWindow(&app_state.window);
414 EXPECT_EQ(ash::STATUS_ACTIVE, app_state.GetUpdaterItem().status); 417 EXPECT_EQ(ash::STATUS_ACTIVE, app_state.GetUpdaterItem().status);
415 } 418 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698