| 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 "chrome/browser/extensions/api/record/record_api.h" | 5 #include "chrome/browser/extensions/api/record/record_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 protected: | 265 protected: |
| 266 std::vector<FilePath> temp_files_; | 266 std::vector<FilePath> temp_files_; |
| 267 | 267 |
| 268 private: | 268 private: |
| 269 base::ScopedTempDir scoped_temp_user_data_dir_; | 269 base::ScopedTempDir scoped_temp_user_data_dir_; |
| 270 | 270 |
| 271 DISALLOW_COPY_AND_ASSIGN(RecordApiTest); | 271 DISALLOW_COPY_AND_ASSIGN(RecordApiTest); |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 | 274 |
| 275 IN_PROC_BROWSER_TEST_F(RecordApiTest, FLAKY_CheckCapture) { | 275 IN_PROC_BROWSER_TEST_F(RecordApiTest, DISABLED_CheckCapture) { |
| 276 base::ScopedTempDir user_data_dir; | 276 base::ScopedTempDir user_data_dir; |
| 277 scoped_ptr<base::ListValue> result; | 277 scoped_ptr<base::ListValue> result; |
| 278 | 278 |
| 279 EXPECT_TRUE(user_data_dir.CreateUniqueTempDir()); | 279 EXPECT_TRUE(user_data_dir.CreateUniqueTempDir()); |
| 280 scoped_refptr<CaptureURLsFunction> capture_URLs_function = | 280 scoped_refptr<CaptureURLsFunction> capture_URLs_function = |
| 281 RunCapture(user_data_dir.path(), &result); | 281 RunCapture(user_data_dir.path(), &result); |
| 282 | 282 |
| 283 // Check that user-data-dir switch has been properly overridden. | 283 // Check that user-data-dir switch has been properly overridden. |
| 284 const TestProcessStrategy &strategy = | 284 const TestProcessStrategy &strategy = |
| 285 static_cast<const TestProcessStrategy &>( | 285 static_cast<const TestProcessStrategy &>( |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 340 |
| 341 // Check for return value with proper stats. | 341 // Check for return value with proper stats. |
| 342 EXPECT_EQ(kTestStatistics, utils::GetString(result.get(), kStatsKey)); | 342 EXPECT_EQ(kTestStatistics, utils::GetString(result.get(), kStatsKey)); |
| 343 | 343 |
| 344 ListValue* errors = NULL; | 344 ListValue* errors = NULL; |
| 345 EXPECT_TRUE(result->GetList(kErrorsKey, &errors)); | 345 EXPECT_TRUE(result->GetList(kErrorsKey, &errors)); |
| 346 EXPECT_TRUE(VerifyURLHandling(errors, strategy)); | 346 EXPECT_TRUE(VerifyURLHandling(errors, strategy)); |
| 347 } | 347 } |
| 348 | 348 |
| 349 } // namespace extensions | 349 } // namespace extensions |
| OLD | NEW |