| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "apps/saved_files_service.h" | 7 #include "apps/saved_files_service.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/test/values_test_util.h" | 10 #include "base/test/values_test_util.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/extensions/test_extension_environment.h" | 12 #include "chrome/browser/extensions/test_extension_environment.h" |
| 13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
| 14 #include "extensions/browser/extension_prefs.h" | 14 #include "extensions/browser/extension_prefs.h" |
| 15 #include "extensions/browser/extension_system.h" | 15 #include "extensions/browser/extension_system.h" |
| 16 #include "extensions/common/extension.h" | 16 #include "extensions/common/extension.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 #if !defined(OS_ANDROID) | |
| 20 | |
| 21 #define TRACE_CALL(expression) \ | 19 #define TRACE_CALL(expression) \ |
| 22 do { \ | 20 do { \ |
| 23 SCOPED_TRACE(#expression); \ | 21 SCOPED_TRACE(#expression); \ |
| 24 expression; \ | 22 expression; \ |
| 25 } while (0) | 23 } while (0) |
| 26 | 24 |
| 27 using apps::SavedFileEntry; | 25 using apps::SavedFileEntry; |
| 28 using apps::SavedFilesService; | 26 using apps::SavedFilesService; |
| 29 | 27 |
| 30 namespace { | 28 namespace { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 TRACE_CALL(CheckEntrySequenceNumber(3, 6)); | 226 TRACE_CALL(CheckEntrySequenceNumber(3, 6)); |
| 229 | 227 |
| 230 // This should push the sequence number to the limit of 8, and trigger a | 228 // This should push the sequence number to the limit of 8, and trigger a |
| 231 // sequence number compaction. Expect that the sequence numbers are | 229 // sequence number compaction. Expect that the sequence numbers are |
| 232 // contiguous from 1 to 4. | 230 // contiguous from 1 to 4. |
| 233 service_->EnqueueFileEntry(extension_->id(), GenerateId(3)); | 231 service_->EnqueueFileEntry(extension_->id(), GenerateId(3)); |
| 234 TRACE_CALL(CheckRangeEnqueuedInOrder(0, 4)); | 232 TRACE_CALL(CheckRangeEnqueuedInOrder(0, 4)); |
| 235 service_->Clear(extension_->id()); | 233 service_->Clear(extension_->id()); |
| 236 TRACE_CALL(CheckRangeEnqueuedInOrder(0, 4)); | 234 TRACE_CALL(CheckRangeEnqueuedInOrder(0, 4)); |
| 237 } | 235 } |
| 238 #endif | |
| OLD | NEW |