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

Side by Side Diff: chrome/browser/devtools/devtools_sanity_browsertest.cc

Issue 1778873002: Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KAObserver
Patch Set: Created 4 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 (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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 chrome::CloseWindow(browser()); 764 chrome::CloseWindow(browser());
765 AcceptModalDialog(); 765 AcceptModalDialog();
766 CancelModalDialog(); 766 CancelModalDialog();
767 cancel_browser.Wait(); 767 cancel_browser.Wait();
768 } 768 }
769 // Try to exit application. 769 // Try to exit application.
770 { 770 {
771 content::WindowedNotificationObserver close_observer( 771 content::WindowedNotificationObserver close_observer(
772 chrome::NOTIFICATION_BROWSER_CLOSED, 772 chrome::NOTIFICATION_BROWSER_CLOSED,
773 content::Source<Browser>(browser())); 773 content::Source<Browser>(browser()));
774 chrome::IncrementKeepAliveCount();
sky 2016/03/10 04:18:20 Why is this no longer necessary?
dgn 2016/03/10 18:31:51 That was added to unflake the test a long time ago
775 chrome::CloseAllBrowsers(); 774 chrome::CloseAllBrowsers();
776 AcceptModalDialog(); 775 AcceptModalDialog();
777 AcceptModalDialog(); 776 AcceptModalDialog();
778 close_observer.Wait(); 777 close_observer.Wait();
779 } 778 }
780 for (size_t i = 0; i < close_observers.size(); ++i) { 779 for (size_t i = 0; i < close_observers.size(); ++i) {
781 close_observers[i]->Wait(); 780 close_observers[i]->Wait();
782 delete close_observers[i]; 781 delete close_observers[i];
783 } 782 }
784 } 783 }
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 1241
1243 SimulateTapAt(web_contents, gfx::Point(30, 60)); 1242 SimulateTapAt(web_contents, gfx::Point(30, 60));
1244 DispatchInPageAndWait("waitForEvent", "gesturetap"); 1243 DispatchInPageAndWait("waitForEvent", "gesturetap");
1245 1244
1246 DispatchAndWait("stopTimeline"); 1245 DispatchAndWait("stopTimeline");
1247 RunTestMethod("checkInputEventsPresent", "MouseMove", "MouseDown", 1246 RunTestMethod("checkInputEventsPresent", "MouseMove", "MouseDown",
1248 "MouseWheel", "GestureTap"); 1247 "MouseWheel", "GestureTap");
1249 1248
1250 CloseDevToolsWindow(); 1249 CloseDevToolsWindow();
1251 } 1250 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698