| 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/common/extension.h" | 16 #include "extensions/common/extension.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 18 |
| 18 #if !defined(OS_ANDROID) | 19 #if !defined(OS_ANDROID) |
| 19 | 20 |
| 20 #define TRACE_CALL(expression) \ | 21 #define TRACE_CALL(expression) \ |
| 21 do { \ | 22 do { \ |
| 22 SCOPED_TRACE(#expression); \ | 23 SCOPED_TRACE(#expression); \ |
| 23 expression; \ | 24 expression; \ |
| 24 } while (0) | 25 } while (0) |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 229 |
| 229 // This should push the sequence number to the limit of 8, and trigger a | 230 // This should push the sequence number to the limit of 8, and trigger a |
| 230 // sequence number compaction. Expect that the sequence numbers are | 231 // sequence number compaction. Expect that the sequence numbers are |
| 231 // contiguous from 1 to 4. | 232 // contiguous from 1 to 4. |
| 232 service_->EnqueueFileEntry(extension_->id(), GenerateId(3)); | 233 service_->EnqueueFileEntry(extension_->id(), GenerateId(3)); |
| 233 TRACE_CALL(CheckRangeEnqueuedInOrder(0, 4)); | 234 TRACE_CALL(CheckRangeEnqueuedInOrder(0, 4)); |
| 234 service_->Clear(extension_->id()); | 235 service_->Clear(extension_->id()); |
| 235 TRACE_CALL(CheckRangeEnqueuedInOrder(0, 4)); | 236 TRACE_CALL(CheckRangeEnqueuedInOrder(0, 4)); |
| 236 } | 237 } |
| 237 #endif | 238 #endif |
| OLD | NEW |