OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
6 | 6 |
7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/browser.h" |
8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
11 | 11 |
12 // Possible race in ChromeURLDataManager. http://crbug.com/59198 | 12 // Possible race in ChromeURLDataManager. http://crbug.com/59198 |
13 #if defined(OS_MACOSX) || defined(OS_LINUX) | 13 #if defined(OS_MACOSX) || defined(OS_LINUX) |
14 #define MAYBE_TabOnRemoved DISABLED_TabOnRemoved | 14 #define MAYBE_TabOnRemoved DISABLED_TabOnRemoved |
15 #else | 15 #else |
16 #define MAYBE_TabOnRemoved TabOnRemoved | 16 #define MAYBE_TabOnRemoved TabOnRemoved |
17 #endif | 17 #endif |
18 | 18 |
19 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Tabs) { | 19 // Flaky on linux views. http://crbug.com/61592 |
| 20 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) |
| 21 #define MAYBE_Tabs FLAKY_Tabs |
| 22 #else |
| 23 #define MAYBE_Tabs Tabs |
| 24 #endif |
| 25 |
| 26 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Tabs) { |
20 ASSERT_TRUE(test_server()->Start()); | 27 ASSERT_TRUE(test_server()->Start()); |
21 | 28 |
22 // The test creates a tab and checks that the URL of the new tab | 29 // The test creates a tab and checks that the URL of the new tab |
23 // is that of the new tab page. Make sure the pref that controls | 30 // is that of the new tab page. Make sure the pref that controls |
24 // this is set. | 31 // this is set. |
25 browser()->profile()->GetPrefs()->SetBoolean( | 32 browser()->profile()->GetPrefs()->SetBoolean( |
26 prefs::kHomePageIsNewTabPage, true); | 33 prefs::kHomePageIsNewTabPage, true); |
27 | 34 |
28 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "crud.html")) << message_; | 35 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "crud.html")) << message_; |
29 } | 36 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleTabPng) { | 75 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleTabPng) { |
69 ASSERT_TRUE(StartTestServer()); | 76 ASSERT_TRUE(StartTestServer()); |
70 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 77 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
71 "test_png.html")) << message_; | 78 "test_png.html")) << message_; |
72 } | 79 } |
73 | 80 |
74 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) { | 81 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) { |
75 ASSERT_TRUE(StartTestServer()); | 82 ASSERT_TRUE(StartTestServer()); |
76 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_; | 83 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_; |
77 } | 84 } |
OLD | NEW |