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

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

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 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 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 } 676 }
677 virtual ~WebContentsDestroyedWatcher() {} 677 virtual ~WebContentsDestroyedWatcher() {}
678 678
679 // Waits until the WebContents is destroyed. 679 // Waits until the WebContents is destroyed.
680 void Wait() { 680 void Wait() {
681 message_loop_runner_->Run(); 681 message_loop_runner_->Run();
682 } 682 }
683 683
684 private: 684 private:
685 // Overridden WebContentsObserver methods. 685 // Overridden WebContentsObserver methods.
686 virtual void WebContentsDestroyed( 686 virtual void WebContentsDestroyed() OVERRIDE {
687 content::WebContents* web_contents) OVERRIDE {
688 message_loop_runner_->Quit(); 687 message_loop_runner_->Quit();
689 } 688 }
690 689
691 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; 690 scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
692 691
693 DISALLOW_COPY_AND_ASSIGN(WebContentsDestroyedWatcher); 692 DISALLOW_COPY_AND_ASSIGN(WebContentsDestroyedWatcher);
694 }; 693 };
695 694
696 // A V1 windowed application. 695 // A V1 windowed application.
697 class V1App : public TestBrowserWindow { 696 class V1App : public TestBrowserWindow {
(...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after
2699 2698
2700 EXPECT_EQ(1, app_icon_loader->fetch_count()); 2699 EXPECT_EQ(1, app_icon_loader->fetch_count());
2701 ASSERT_EQ(initial_size + 1, model_->items().size()); 2700 ASSERT_EQ(initial_size + 1, model_->items().size());
2702 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); 2701 EXPECT_TRUE(launcher_controller_->IsAppPinned("1"));
2703 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); 2702 EXPECT_FALSE(launcher_controller_->IsAppPinned("0"));
2704 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); 2703 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type);
2705 2704
2706 launcher_controller_->UnpinAppWithID("1"); 2705 launcher_controller_->UnpinAppWithID("1");
2707 ASSERT_EQ(initial_size, model_->items().size()); 2706 ASSERT_EQ(initial_size, model_->items().size());
2708 } 2707 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/browser_status_monitor.cc ('k') | chrome/browser/ui/auto_login_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698