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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
7 #include "chrome/browser/chromeos/extensions/file_browser_handler.h" | 7 #include "chrome/browser/chromeos/extensions/file_browser_handler.h" |
8 #include "chrome/browser/chromeos/extensions/file_browser_resource_throttle.h" | 8 #include "chrome/browser/chromeos/extensions/file_browser_resource_throttle.h" |
9 #include "chrome/browser/download/download_prefs.h" | 9 #include "chrome/browser/download/download_prefs.h" |
10 #include "chrome/browser/extensions/event_router.h" | 10 #include "chrome/browser/extensions/event_router.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 flush_observer->WaitForFlush(); | 237 flush_observer->WaitForFlush(); |
238 } | 238 } |
239 | 239 |
240 protected: | 240 protected: |
241 std::string test_extension_id_; | 241 std::string test_extension_id_; |
242 // The HTTP server used in the tests. | 242 // The HTTP server used in the tests. |
243 scoped_ptr<HttpServer> test_server_; | 243 scoped_ptr<HttpServer> test_server_; |
244 base::ScopedTempDir downloads_dir_; | 244 base::ScopedTempDir downloads_dir_; |
245 }; | 245 }; |
246 | 246 |
247 // http://crbug.com/176082: This test flaky on chrome OS asan bots. | |
raymes
2013/02/13 21:28:05
nit: chrome OS -> ChromeOS
asan -> ASAN
Randy Smith (Not in Mondays)
2013/02/13 21:31:23
Done.
| |
248 #if defined(OS_CHROME) | |
raymes
2013/02/13 21:28:05
OS_CHROMEOS?
Randy Smith (Not in Mondays)
2013/02/13 21:31:23
Right you are. Sorry, coulda sworn it was OS_CHRO
| |
249 #define MAYBE_Basic DISABLED_Basic | |
250 #else | |
251 #define MAYBE_Basic Basic | |
252 #endif | |
247 // Tests that invoking FileBrowserResourceThrottle with handleable MIME type | 253 // Tests that invoking FileBrowserResourceThrottle with handleable MIME type |
248 // actually invokes the fileBrowserHandler.onExecuteContnentHandler event. | 254 // actually invokes the fileBrowserHandler.onExecuteContnentHandler event. |
249 IN_PROC_BROWSER_TEST_F(FileBrowserResourceThrottleExtensionApiTest, Basic) { | 255 IN_PROC_BROWSER_TEST_F(FileBrowserResourceThrottleExtensionApiTest, |
256 MAYBE_Basic) { | |
250 ASSERT_TRUE(LoadTestExtension()) << message_; | 257 ASSERT_TRUE(LoadTestExtension()) << message_; |
251 | 258 |
252 ResultCatcher catcher; | 259 ResultCatcher catcher; |
253 | 260 |
254 MockResourceController mock_resource_controller; | 261 MockResourceController mock_resource_controller; |
255 EXPECT_CALL(mock_resource_controller, Cancel()).Times(0); | 262 EXPECT_CALL(mock_resource_controller, Cancel()).Times(0); |
256 EXPECT_CALL(mock_resource_controller, CancelAndIgnore()).Times(1); | 263 EXPECT_CALL(mock_resource_controller, CancelAndIgnore()).Times(1); |
257 EXPECT_CALL(mock_resource_controller, CancelWithError(_)).Times(0); | 264 EXPECT_CALL(mock_resource_controller, CancelWithError(_)).Times(0); |
258 EXPECT_CALL(mock_resource_controller, Resume()).Times(0); | 265 EXPECT_CALL(mock_resource_controller, Resume()).Times(0); |
259 | 266 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
390 // The test extension should not receive any events by now. Send it an event | 397 // The test extension should not receive any events by now. Send it an event |
391 // with MIME type "test/done", so it stops waiting for the events. (If there | 398 // with MIME type "test/done", so it stops waiting for the events. (If there |
392 // was an event with MIME type 'plain/text', |catcher.GetNextResult()| will | 399 // was an event with MIME type 'plain/text', |catcher.GetNextResult()| will |
393 // fail regardless of the sent event; chrome.test.notifySuccess will not be | 400 // fail regardless of the sent event; chrome.test.notifySuccess will not be |
394 // called by the extension). | 401 // called by the extension). |
395 SendDoneEvent(); | 402 SendDoneEvent(); |
396 EXPECT_TRUE(catcher.GetNextResult()); | 403 EXPECT_TRUE(catcher.GetNextResult()); |
397 } | 404 } |
398 | 405 |
399 } // namespace | 406 } // namespace |
OLD | NEW |