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

Side by Side Diff: chrome/browser/ui/panels/panel_browsertest.cc

Issue 11312184: interactive_ui_tests:PanelBrowserTest.AutoResize marked as FLAKY. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/debugger/devtools_window.h" 8 #include "chrome/browser/debugger/devtools_window.h"
9 #include "chrome/browser/net/url_request_mock_util.h" 9 #include "chrome/browser/net/url_request_mock_util.h"
10 #include "chrome/browser/prefs/browser_prefs.h" 10 #include "chrome/browser/prefs/browser_prefs.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 virtual ~WaitForAutoResizeNarrower() {} 389 virtual ~WaitForAutoResizeNarrower() {}
390 390
391 protected: 391 protected:
392 virtual bool AtExpectedState() OVERRIDE { 392 virtual bool AtExpectedState() OVERRIDE {
393 return panel_->GetBounds().width() < initial_size_.width(); 393 return panel_->GetBounds().width() < initial_size_.width();
394 } 394 }
395 Panel* panel_; 395 Panel* panel_;
396 gfx::Size initial_size_; 396 gfx::Size initial_size_;
397 }; 397 };
398 398
399 399 // crbug.com/160504
400 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, AutoResize) { 400 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, FLAKY_AutoResize) {
401 PanelManager* panel_manager = PanelManager::GetInstance(); 401 PanelManager* panel_manager = PanelManager::GetInstance();
402 panel_manager->enable_auto_sizing(true); 402 panel_manager->enable_auto_sizing(true);
403 // Bigger space is needed by this test. 403 // Bigger space is needed by this test.
404 SetTestingAreas(gfx::Rect(0, 0, 1200, 900), gfx::Rect()); 404 SetTestingAreas(gfx::Rect(0, 0, 1200, 900), gfx::Rect());
405 405
406 // Create a test panel with web contents loaded. 406 // Create a test panel with web contents loaded.
407 CreatePanelParams params("PanelTest1", gfx::Rect(), SHOW_AS_ACTIVE); 407 CreatePanelParams params("PanelTest1", gfx::Rect(), SHOW_AS_ACTIVE);
408 GURL url(ui_test_utils::GetTestUrl( 408 GURL url(ui_test_utils::GetTestUrl(
409 FilePath(kTestDir), 409 FilePath(kTestDir),
410 FilePath(FILE_PATH_LITERAL("update-preferred-size.html")))); 410 FilePath(FILE_PATH_LITERAL("update-preferred-size.html"))));
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 ::MSG key_msg = { NULL, WM_KEYDOWN, ui::VKEY_W, 0 }; 1684 ::MSG key_msg = { NULL, WM_KEYDOWN, ui::VKEY_W, 0 };
1685 content::NativeWebKeyboardEvent key_event(key_msg); 1685 content::NativeWebKeyboardEvent key_event(key_msg);
1686 key_event.modifiers = content::NativeWebKeyboardEvent::ControlKey; 1686 key_event.modifiers = content::NativeWebKeyboardEvent::ControlKey;
1687 #else 1687 #else
1688 content::NativeWebKeyboardEvent key_event; 1688 content::NativeWebKeyboardEvent key_event;
1689 #endif 1689 #endif
1690 panel->HandleKeyboardEvent(key_event); 1690 panel->HandleKeyboardEvent(key_event);
1691 signal.Wait(); 1691 signal.Wait();
1692 EXPECT_EQ(0, panel_manager->num_panels()); 1692 EXPECT_EQ(0, panel_manager->num_panels());
1693 } 1693 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698