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

Unified Diff: chrome/browser/ui/native_window_tracker_browsertest.cc

Issue 662073002: Fix crash when user closes window prior to the "Confirm Install" prompt showing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/install_prompt_navigator
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/native_window_tracker_browsertest.cc
diff --git a/chrome/browser/ui/native_window_tracker_browsertest.cc b/chrome/browser/ui/native_window_tracker_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5458db27e450e8cf63b8ac819c0e1550ac010238
--- /dev/null
+++ b/chrome/browser/ui/native_window_tracker_browsertest.cc
@@ -0,0 +1,26 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/native_window_tracker.h"
+
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_window.h"
+#include "chrome/test/base/in_process_browser_test.h"
+#include "content/public/test/test_utils.h"
+
+typedef InProcessBrowserTest NativeWindowTrackerTest;
+
+IN_PROC_BROWSER_TEST_F(NativeWindowTrackerTest, Basic) {
+ // Create a second browser to prevent the app from exiting when the browser is
+ // closed.
+ CreateBrowser(browser()->profile());
+
+ scoped_ptr<NativeWindowTracker> tracker =
+ NativeWindowTracker::Create(browser()->window()->GetNativeWindow());
+ EXPECT_FALSE(tracker->WasNativeWindowClosed());
+
+ browser()->window()->Close();
+ content::RunAllPendingInMessageLoop();
+ EXPECT_TRUE(tracker->WasNativeWindowClosed());
+}
« no previous file with comments | « chrome/browser/ui/native_window_tracker.h ('k') | chrome/browser/ui/views/extensions/extension_install_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698