OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 #include "platform/TestingPlatformSupport.h" | 34 #include "platform/TestingPlatformSupport.h" |
35 #include "public/platform/WebDiscardableMemory.h" | 35 #include "public/platform/WebDiscardableMemory.h" |
36 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
37 | 37 |
38 #include <algorithm> | 38 #include <algorithm> |
39 #include <cstdlib> | 39 #include <cstdlib> |
40 | 40 |
41 #include <gtest/gtest.h> | 41 #include <gtest/gtest.h> |
42 | 42 |
43 using namespace WebCore; | 43 using namespace blink; |
44 | 44 |
45 namespace { | 45 namespace { |
46 | 46 |
47 const size_t kTestSize = 32 * 1024; | 47 const size_t kTestSize = 32 * 1024; |
48 | 48 |
49 enum DiscardableMemorySupport { | 49 enum DiscardableMemorySupport { |
50 DontSupportDiscardableMemory, | 50 DontSupportDiscardableMemory, |
51 SupportDiscardableMemory, | 51 SupportDiscardableMemory, |
52 }; | 52 }; |
53 | 53 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 ASSERT_EQ(0, memcmp(purgeableVector.data(), testData.data(), testData.si
ze())); | 328 ASSERT_EQ(0, memcmp(purgeableVector.data(), testData.data(), testData.si
ze())); |
329 } | 329 } |
330 | 330 |
331 // Instantiates all the unit tests using the SharedBufferTestWithPlatformSupport
fixture both with | 331 // Instantiates all the unit tests using the SharedBufferTestWithPlatformSupport
fixture both with |
332 // and without discardable memory support. | 332 // and without discardable memory support. |
333 INSTANTIATE_TEST_CASE_P(testsWithPlatformSetUp, PurgeableVectorTestWithPlatformS
upport, | 333 INSTANTIATE_TEST_CASE_P(testsWithPlatformSetUp, PurgeableVectorTestWithPlatformS
upport, |
334 ::testing::Values(DontSupportDiscardableMemory, SupportDiscardableMemory)); | 334 ::testing::Values(DontSupportDiscardableMemory, SupportDiscardableMemory)); |
335 | 335 |
336 } // namespace | 336 } // namespace |
337 | 337 |
OLD | NEW |