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

Unified Diff: chrome/browser/ui/views/find_bar_views_interactive_uitest.cc

Issue 2286853002: Add temporary debug logging for crbug.com/639350. (Closed)
Patch Set: Add logging for mouse moves and events. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/base/interactive_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_views_interactive_uitest.cc
diff --git a/chrome/browser/ui/views/find_bar_views_interactive_uitest.cc b/chrome/browser/ui/views/find_bar_views_interactive_uitest.cc
index 3bafc2bf7619b2762f186b4c0a6644db8cfb8d31..0af49b4793a9878be59b2f1064e5ba29200b04c8 100644
--- a/chrome/browser/ui/views/find_bar_views_interactive_uitest.cc
+++ b/chrome/browser/ui/views/find_bar_views_interactive_uitest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/auto_reset.h"
#include "base/macros.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -23,6 +24,7 @@
#include "content/public/browser/web_contents.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/base/clipboard/clipboard.h"
+#include "ui/base/test/ui_controls.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/view.h"
@@ -90,37 +92,49 @@ class FindInPageTest : public InProcessBrowserTest {
};
// Flaky because the test server fails to start? See: http://crbug.com/96594.
+// TODO(msw): Remove flaky test debug logging for http://crbug.com/639350.
IN_PROC_BROWSER_TEST_F(FindInPageTest, CrashEscHandlers) {
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers A";
ASSERT_TRUE(embedded_test_server()->Start());
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers B";
// First we navigate to our test page (tab A).
GURL url = embedded_test_server()->GetURL(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers C";
chrome::Find(browser());
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers D";
// Open another tab (tab B).
chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED);
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers E";
chrome::Find(browser());
EXPECT_TRUE(IsViewFocused(browser(), VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers F";
// Select tab A.
browser()->tab_strip_model()->ActivateTabAt(0, true);
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers G";
// Close tab B.
browser()->tab_strip_model()->CloseWebContentsAt(1,
TabStripModel::CLOSE_NONE);
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers H";
// Click on the location bar so that Find box loses focus.
ASSERT_NO_FATAL_FAILURE(ui_test_utils::ClickOnView(browser(),
VIEW_ID_OMNIBOX));
// Check the location bar is focused.
EXPECT_TRUE(IsViewFocused(browser(), VIEW_ID_OMNIBOX));
-
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers I: PRESS ESC";
+ base::AutoReset<bool> reset_a(&ui_test_utils::g_crbug_639350_logging, true);
+ base::AutoReset<bool> reset_b(&ui_controls::g_crbug_639350_logging, true);
// This used to crash until bug 1303709 was fixed.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
browser(), ui::VKEY_ESCAPE, false, false, false, false));
+ LOG(ERROR) << "crbug.com/639350 FindInPageTest.CrashEscHandlers J: TEST DONE";
}
IN_PROC_BROWSER_TEST_F(FindInPageTest, NavigationByKeyEvent) {
« no previous file with comments | « no previous file | chrome/test/base/interactive_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698