OLD | NEW |
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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 9 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
36 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
37 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
38 | 38 |
39 using content::WebContents; | 39 using content::WebContents; |
40 | 40 |
41 // Tests are flaky on Linux because of http://crbug.com/80118. | 41 // Tests are flaky on Linux because of http://crbug.com/80118. |
42 #if defined(OS_LINUX) && !defined(USE_ASH) | 42 #if defined(OS_LINUX) && !defined(USE_ASH) |
43 #define MAYBE(TestName) DISABLED_ ## TestName | 43 #define MAYBE(TestName) DISABLED_ ## TestName |
44 #elif defined(OS_WIN) | 44 #elif defined(OS_WIN) |
45 #define MAYBE(TestName) FLAKY ## TestName | 45 #define MAYBE(TestName) FLAKY_ ## TestName |
46 #else | 46 #else |
47 #define MAYBE(TestName) TestName | 47 #define MAYBE(TestName) TestName |
48 #endif | 48 #endif |
49 | 49 |
50 class InstantTest : public InProcessBrowserTest { | 50 class InstantTest : public InProcessBrowserTest { |
51 public: | 51 public: |
52 InstantTest() { | 52 InstantTest() { |
53 EnableDOMAutomation(); | 53 EnableDOMAutomation(); |
54 } | 54 } |
55 | 55 |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 // Press <Enter> in the omnibox, causing the preview to be committed. | 1005 // Press <Enter> in the omnibox, causing the preview to be committed. |
1006 WebContents* preview_tab = preview()->web_contents(); | 1006 WebContents* preview_tab = preview()->web_contents(); |
1007 ASSERT_TRUE(PressEnter()); | 1007 ASSERT_TRUE(PressEnter()); |
1008 | 1008 |
1009 // The preview contents should now be the active tab contents. | 1009 // The preview contents should now be the active tab contents. |
1010 EXPECT_FALSE(preview()); | 1010 EXPECT_FALSE(preview()); |
1011 EXPECT_FALSE(instant()->is_displayable()); | 1011 EXPECT_FALSE(instant()->is_displayable()); |
1012 EXPECT_FALSE(instant()->IsCurrent()); | 1012 EXPECT_FALSE(instant()->IsCurrent()); |
1013 EXPECT_EQ(preview_tab, browser()->GetSelectedWebContents()); | 1013 EXPECT_EQ(preview_tab, browser()->GetSelectedWebContents()); |
1014 } | 1014 } |
OLD | NEW |