Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/prefs/pref_service.h" | 7 #include "chrome/browser/prefs/pref_service.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabConnect) { | 90 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabConnect) { |
| 91 ASSERT_TRUE(StartTestServer()); | 91 ASSERT_TRUE(StartTestServer()); |
| 92 ASSERT_TRUE(RunExtensionTest("tabs/connect")) << message_; | 92 ASSERT_TRUE(RunExtensionTest("tabs/connect")) << message_; |
| 93 } | 93 } |
| 94 | 94 |
| 95 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_TabOnRemoved) { | 95 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_TabOnRemoved) { |
| 96 ASSERT_TRUE(StartTestServer()); | 96 ASSERT_TRUE(StartTestServer()); |
| 97 ASSERT_TRUE(RunExtensionTest("tabs/on_removed")) << message_; | 97 ASSERT_TRUE(RunExtensionTest("tabs/on_removed")) << message_; |
| 98 } | 98 } |
| 99 | 99 |
| 100 // Test is timing out on cros and flaky on others. See http://crbug.com/83876 | 100 // Test is timing out on linux and cros and flaky on others. |
| 101 #if defined(OS_CHROMEOS) | 101 // See http://crbug.com/83876 |
| 102 #if defined(OS_LINUX) | |
|
msw
2011/05/26 07:24:43
If Jpeg is still timing out on cros, perhaps you s
| |
| 102 #define MAYBE_CaptureVisibleTabJpeg DISABLED_CaptureVisibleTabJpeg | 103 #define MAYBE_CaptureVisibleTabJpeg DISABLED_CaptureVisibleTabJpeg |
| 103 #else | 104 #else |
| 104 #define MAYBE_CaptureVisibleTabJpeg FLAKY_CaptureVisibleTabJpeg | 105 #define MAYBE_CaptureVisibleTabJpeg FLAKY_CaptureVisibleTabJpeg |
| 105 #endif | 106 #endif |
| 106 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_CaptureVisibleTabJpeg) { | 107 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_CaptureVisibleTabJpeg) { |
| 107 host_resolver()->AddRule("a.com", "127.0.0.1"); | 108 host_resolver()->AddRule("a.com", "127.0.0.1"); |
| 108 host_resolver()->AddRule("b.com", "127.0.0.1"); | 109 host_resolver()->AddRule("b.com", "127.0.0.1"); |
| 109 ASSERT_TRUE(StartTestServer()); | 110 ASSERT_TRUE(StartTestServer()); |
| 110 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 111 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 111 "test_jpeg.html")) << message_; | 112 "test_jpeg.html")) << message_; |
| 112 } | 113 } |
| 113 | 114 |
| 114 // Test is flaky. See http://crbug.com/83876 | 115 // Test is timing out on cros and flaky on others. See http://crbug.com/83876 |
| 115 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FLAKY_CaptureVisibleTabPng) { | 116 #if defined(OS_CHROMEOS) |
| 117 #define MAYBE_CaptureVisibleTabPng DISABLED_CaptureVisibleTabPng | |
| 118 #else | |
| 119 #define MAYBE_CaptureVisibleTabPng FLAKY_CaptureVisibleTabPng | |
| 120 #endif | |
| 121 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_CaptureVisibleTabPng) { | |
| 116 host_resolver()->AddRule("a.com", "127.0.0.1"); | 122 host_resolver()->AddRule("a.com", "127.0.0.1"); |
| 117 host_resolver()->AddRule("b.com", "127.0.0.1"); | 123 host_resolver()->AddRule("b.com", "127.0.0.1"); |
| 118 ASSERT_TRUE(StartTestServer()); | 124 ASSERT_TRUE(StartTestServer()); |
| 119 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 125 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 120 "test_png.html")) << message_; | 126 "test_png.html")) << message_; |
| 121 } | 127 } |
| 122 | 128 |
| 123 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_CaptureVisibleTabRace) { | 129 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_CaptureVisibleTabRace) { |
| 124 ASSERT_TRUE(StartTestServer()); | 130 ASSERT_TRUE(StartTestServer()); |
| 125 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 131 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetViewsOfCreatedPopup) { | 175 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetViewsOfCreatedPopup) { |
| 170 ASSERT_TRUE(StartTestServer()); | 176 ASSERT_TRUE(StartTestServer()); |
| 171 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_popup.html")) | 177 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_popup.html")) |
| 172 << message_; | 178 << message_; |
| 173 } | 179 } |
| 174 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetViewsOfCreatedWindow) { | 180 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetViewsOfCreatedWindow) { |
| 175 ASSERT_TRUE(StartTestServer()); | 181 ASSERT_TRUE(StartTestServer()); |
| 176 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) | 182 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) |
| 177 << message_; | 183 << message_; |
| 178 } | 184 } |
| OLD | NEW |